]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
drm: xlnx: zynqmp: Disable a plane when the fb format changes xilinx-v2018.1
authorHyun Kwon <hyun.kwon@xilinx.com>
Tue, 10 Apr 2018 16:22:21 +0000 (09:22 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 11 Apr 2018 12:36:37 +0000 (14:36 +0200)
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 <hyun.kwon@xilinx.com>
Tested-by: Kuldeep Dave <kuldeepd@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/gpu/drm/xlnx/zynqmp_disp.c

index 01749b5bceaaa33f7c409465dd5de079bf96d247..fc0423b37c186eaa99f933d3ad8672961b02083b 100644 (file)
@@ -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,