aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoliy Klymenko <[email protected]>2024-05-23 16:49:28 -0700
committerTomi Valkeinen <[email protected]>2024-06-17 10:37:14 +0300
commitfea7fad8512f4fbe0e47d9bcc84034a4c1d2f223 (patch)
treee1167b5f163f126b8827db713b1a12a00003ce0e
parent4ea3deda1341fef7b923ad9cfe5dd46b1b51bfa8 (diff)
drm: xlnx: zynqmp_dpsub: Enable plane in atomic update
Unconditionally enable the DPSUB layer in the corresponding atomic plane update callback. Setting the new display mode may require disabling and re-enabling the CRTC. This effectively resets DPSUB to the default state with all layers disabled. The original implementation of the plane atomic update enables the corresponding DPSUB layer only if the framebuffer format has changed. This would leave the layer disabled after switching to a different display mode with the same framebuffer format. Signed-off-by: Anatoliy Klymenko <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/xlnx/zynqmp_kms.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xlnx/zynqmp_kms.c b/drivers/gpu/drm/xlnx/zynqmp_kms.c
index 43bf416b33d5..0b57ab5451a9 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_kms.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_kms.c
@@ -120,9 +120,13 @@ static void zynqmp_dpsub_plane_atomic_update(struct drm_plane *plane,
zynqmp_disp_blend_set_global_alpha(dpsub->disp, true,
plane->state->alpha >> 8);
- /* Enable or re-enable the plane if the format has changed. */
- if (format_changed)
- zynqmp_disp_layer_enable(layer);
+ /*
+ * Unconditionally enable the layer, as it may have been disabled
+ * previously either explicitly to reconfigure layer format, or
+ * implicitly after DPSUB reset during display mode change. DRM
+ * framework calls this callback for enabled planes only.
+ */
+ zynqmp_disp_layer_enable(layer);
}
static const struct drm_plane_helper_funcs zynqmp_dpsub_plane_helper_funcs = {