From: Hyun Kwon Date: Tue, 10 Apr 2018 16:22:21 +0000 (-0700) Subject: drm: xlnx: zynqmp: Disable a plane when the fb format changes X-Git-Tag: xilinx-v2018.1^0 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/zynq/linux.git/commitdiff_plain/15b23f7fa80ed8166af46fb4dd971dbc12d46ad2 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 --- 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,