mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
drm/i915: Disable the plane if initial plane config readout failed
Properly turn off the plane if it is enabled but .get_initial_plane_config() failed for whatever reason. The hardware does (or at least did) perform some kind of automagic plane disable when the pipe gets disabled, but we don't rely on that anywhere else either. Also the GGTT/actual memory may get clobbered afterwards, so leaving the plane enabled here could result in visual corruption/GTT faults/etc. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patch.msgid.link/20260511214122.8468-2-ville.syrjala@linux.intel.com Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
This commit is contained in:
parent
0c59cc7824
commit
466fa6902e
|
|
@ -128,11 +128,10 @@ intel_find_initial_plane_obj(struct intel_crtc *crtc,
|
|||
|
||||
/*
|
||||
* TODO:
|
||||
* Disable planes if get_initial_plane_config() failed.
|
||||
* Make sure things work if the surface base is not page aligned.
|
||||
*/
|
||||
if (!plane_config->fb)
|
||||
return;
|
||||
goto nofb;
|
||||
|
||||
if (intel_alloc_initial_plane_obj(display, plane_config)) {
|
||||
fb = plane_config->fb;
|
||||
|
|
@ -184,7 +183,8 @@ intel_find_initial_plane_obj(struct intel_crtc *crtc,
|
|||
* simplest solution is to just disable the primary plane now and
|
||||
* pretend the BIOS never had it enabled.
|
||||
*/
|
||||
intel_plane_disable_noatomic(crtc, plane);
|
||||
if (plane_state->uapi.visible)
|
||||
intel_plane_disable_noatomic(crtc, plane);
|
||||
}
|
||||
|
||||
static void plane_config_fini(struct intel_display *display,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user