[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1637680811-90510-1-git-send-email-mrodin@de.adit-jv.com>
Date: Tue, 23 Nov 2021 16:20:11 +0100
From: Michael Rodin <mrodin@...adit-jv.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
<dri-devel@...ts.freedesktop.org>,
<linux-renesas-soc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Michael Rodin <mrodin@...adit-jv.com>, <michael@...in.online>,
<efriedrich@...adit-jv.com>, <erosca@...adit-jv.com>
Subject: [PATCH] drm: rcar-du: do not restart rcar-du groups on gen3
Restarting a display unit group can cause a visible flicker on the display.
Particularly when a LVDS display is connected to a Salvator board and an
HDMI display is (re)connected, then there will be 2 visible flickers on the
LVDS display:
1. during atomic_flush (The need_restart flag is set in this case by
rcar_du_vsp_enable.):
rcar_du_crtc_atomic_flush
rcar_du_crtc_update_planes
...
...
/* Restart the group if plane sources have changed. */
if (rcrtc->group->need_restart)
rcar_du_group_restart(rcrtc->group);
2. during atomic_enable:
rcar_du_crtc_atomic_enable
rcar_du_crtc_start
rcar_du_group_start_stop(rcrtc->group, true);
To avoid flickers in all use cases, do not restart DU groups on the Gen3
SoCs at all, since it is not required any more.
Signed-off-by: Michael Rodin <mrodin@...adit-jv.com>
---
drivers/gpu/drm/rcar-du/rcar_du_group.c | 5 ++++-
drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 2 --
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c b/drivers/gpu/drm/rcar-du/rcar_du_group.c
index 8665a1d..ff0a1c8 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_group.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c
@@ -250,7 +250,7 @@ void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start)
* when the display controller will have to be restarted.
*/
if (start) {
- if (rgrp->used_crtcs++ != 0)
+ if (rgrp->used_crtcs++ != 0 && rgrp->dev->info->gen != 3)
__rcar_du_group_start_stop(rgrp, false);
__rcar_du_group_start_stop(rgrp, true);
} else {
@@ -263,6 +263,9 @@ void rcar_du_group_restart(struct rcar_du_group *rgrp)
{
rgrp->need_restart = false;
+ if (rgrp->dev->info->gen == 3)
+ return;
+
__rcar_du_group_start_stop(rgrp, false);
__rcar_du_group_start_stop(rgrp, true);
}
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
index b7fc5b0..a652c06 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c
@@ -88,8 +88,6 @@ void rcar_du_vsp_enable(struct rcar_du_crtc *crtc)
* Ensure that the plane source configuration takes effect by requesting
* a restart of the group. See rcar_du_plane_atomic_update() for a more
* detailed explanation.
- *
- * TODO: Check whether this is still needed on Gen3.
*/
crtc->group->need_restart = true;
--
2.7.4
Powered by blists - more mailing lists