From: Ville Syrjälä <[email protected]> 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ä <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Maarten Lankhorst <[email protected]> --- drivers/gpu/drm/i915/display/intel_initial_plane.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_initial_plane.c b/drivers/gpu/drm/i915/display/intel_initial_plane.c index e414b5d1085c0..7427f41e4d7e1 100644 --- a/drivers/gpu/drm/i915/display/intel_initial_plane.c +++ b/drivers/gpu/drm/i915/display/intel_initial_plane.c @@ -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, -- 2.53.0
