drm: xlnx: zynqmp_dpsub: Enable plane in atomic update
Subsystems (4)
PATCH v2 1/1 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.
---
Changes in v2:
- Added comment around DPSUB layer enablement explaining why it should be done unconditionally.
- Link to v1: https://lore.kernel.org/r/[email protected]
--- drivers/gpu/drm/xlnx/zynqmp_kms.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/xlnx/zynqmp_kms.c +7 -3
@@ -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 = {
---
base-commit: 673087d8b023faf34b84e8faf63bbeea3da87bab
change-id: 20240520-dp-layer-enable-7b561af29ca8
Best regards,
Signature · 1 line
Anatoliy Klymenko <[email protected]>
Tomi Valkeinen
maintainerHi,
Quoted 44 lines · Anatoliy Klymenko
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]>---
Changes in v2:
- Added comment around DPSUB layer enablement explaining why it should be done unconditionally.
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/xlnx/zynqmp_kms.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/gpu/drm/xlnx/zynqmp_kms.c +7
-4@@ -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 = { ---base-commit:
673087d8b023faf34b84e8faf63bbeea3da87bab
change-id: 20240520-dp-layer-enable-7b561af29ca8
Quoted 1 line
Best regards,
Thanks, I have pushed this to drm-misc-next.
Tomi
Quoted 76 lines
-----Original Message-----
From: Tomi Valkeinen <[email protected]>
Sent: Monday, June 17, 2024 12:44 AM
To: Klymenko, Anatoliy <[email protected]>; Laurent Pinchart <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Simek, Michal <[email protected]>
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2] drm: xlnx:zynqmp_dpsub: Enable plane in atomic updateCaution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Hi,
Quoted 1 line · Anatoliy Klymenko
Unconditionally enable the DPSUB layer in the corresponding atomic
plane
Quoted 1 line
update callback. Setting the new display mode may require disabling
and
Quoted 2 lines
re-enabling the CRTC. This effectively resets DPSUB to the default state with all layers disabled. The original implementation of the plane
atomic
Quoted 2 lines
update enables the corresponding DPSUB layer only if the framebuffer format has changed. This would leave the layer disabled after switching
to
Quoted 6 lines
a different display mode with the same framebuffer format.
Signed-off-by Anatoliy Klymenko <[email protected]>---
Changes in v2:
- Added comment around DPSUB layer enablement explaining why itshould be
Quoted 2 lines
done unconditionally.
- Link to v1: https://lore.kernel.org/r/20240520-dp-layer-enable-v1-1-Review
Quoted 5 lines
--- drivers/gpu/drm/xlnx/zynqmp_kms.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/xlnx/zynqmp_kms.cdrivers/gpu/drm/xlnx/zynqmp_kms.c static void
Quoted 4 lines
index
43bf416b33d5..0b57ab5451a9100644drivers/gpu/drm/xlnx/zynqmp_kms.c +0
-0@@ -120,9 +120,13 @@ static voidzynqmp_dpsub_plane_atomic_update(struct
drm_plane*plane,Quoted 6 lines
drivers/gpu/drm/xlnx/zynqmp_kms.c +0
-3zynqmp_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);drivers/gpu/drm/xlnx/zynqmp_kms.c static void zynqmp_dpsub_plane_atomic_update(struct drm_plane *plane,
Quoted 10 lines
drivers/gpu/drm/xlnx/zynqmp_kms.c +7
-0+/* +* 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= {Quoted 5 lines
---
base-commit:673087d8b023faf34b84e8faf63bbeea3da87bab
change-id: 20240520-dp-layer-enable-7b561af29ca8
Quoted 5 lines
Quoted 1 line
Best regards,
Thanks, I have pushed this to drm-misc-next.
Tomi
Thank you,
Anatoliy