From 4ac76ffacb54712b0361e51d0b7156e53d062e3c Mon Sep 17 00:00:00 2001 From: Hyun Kwon Date: Tue, 10 Apr 2018 09:22:21 -0700 Subject: [PATCH] drm: xlnx: zynqmp: Disable a plane when the fb format changes The drm core doesn't explicitly disable a plane when format changes. So add a check in the plane update functions if the new framebuffer format has changed, and disable the plane for the format change. Signed-off-by: Hyun Kwon Tested-by: Kuldeep Dave Signed-off-by: Michal Simek --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index 01749b5bceaa..fc0423b37c18 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -2567,6 +2567,10 @@ zynqmp_disp_plane_atomic_update(struct drm_plane *plane, if (!plane->state->crtc || !plane->state->fb) return; + if (old_state->fb && + old_state->fb->format->format != plane->state->fb->format->format) + zynqmp_disp_plane_disable(plane); + ret = zynqmp_disp_plane_mode_set(plane, plane->state->fb, plane->state->crtc_x, plane->state->crtc_y, -- 2.39.2