MLK-21525 drm/imx: dpu: kms: Disallow primary plane on-the-fly disablement
authorLiu Ying <victor.liu@nxp.com>
Tue, 23 Apr 2019 11:25:24 +0000 (19:25 +0800)
committerLiu Ying <victor.liu@nxp.com>
Wed, 24 Apr 2019 06:22:30 +0000 (14:22 +0800)
commit6477bb1492b7ac89678891447f3d794e4fdb6df6
treeb897852e6f65ce723d6ea1a01d36bd1843f39fc1
parentbe4ba211d259781211f74710a9d19c9a4607ea7a
MLK-21525 drm/imx: dpu: kms: Disallow primary plane on-the-fly disablement

The below commit introduced in v4.16 reveals the fact that the DPU KMS
driver doesn't support primary plane on-the-fly disablement.  This may
cause display issue when we restart weston with 4kp60 display for i.MX8QM.
To support this, we need considerable driver change, but doesn't make
too much sense, because disabling primary plane on an active CRTC doesn't
often happen for real graphics update.  In order not to run into this problem,
we can explicitly disallow this use case in ->atomic_check().  This rejection
makes us fall back to disable CRTC when removing the primary plane's
framebuffer according to the below commit's rationale, which is the original
behavior of atomic_remove_fb().

commit 846c7dfc1193 ("drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2.")

Signed-off-by: Liu Ying <victor.liu@nxp.com>
drivers/gpu/drm/imx/dpu/dpu-kms.c