All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: rcar-du: Re-update the DSYSR register value for start/stop
@ 2018-10-22  6:30 Nguyen An Hoan
  2018-10-22  8:21 ` Sergei Shtylyov
  2018-10-22 11:23 ` Laurent Pinchart
  0 siblings, 2 replies; 8+ messages in thread
From: Nguyen An Hoan @ 2018-10-22  6:30 UTC (permalink / raw)
  To: linux-renesas-soc, geert+renesas
  Cc: laurent.pinchart, kuninori.morimoto.gx, yoshihiro.shimoda.uh,
	h-inayoshi, nv-dung, cv-dong, na-hoan

From: Hoan Nguyen An <na-hoan@jinso.co.jp>

>From previous commit 0521ccb "drm: rcar-du: Cache DSYSR value to ensure known initial value"
We only need to update DSYSR0, DSYSR2 for start/stop. So using rgrp-> mmio_offset is enough,
the change back from rcar_du_crtc -> rcar_du_group -> rcar_du_crtc leading to
mmio addresses for DSYSR may be different.

Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
---
 drivers/gpu/drm/rcar-du/rcar_du_group.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c b/drivers/gpu/drm/rcar-du/rcar_du_group.c
index d85f0a1..a5f7eed 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_group.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c
@@ -202,10 +202,9 @@ void rcar_du_group_put(struct rcar_du_group *rgrp)
 
 static void __rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start)
 {
-	struct rcar_du_crtc *rcrtc = &rgrp->dev->crtcs[rgrp->index * 2];
-
-	rcar_du_crtc_dsysr_clr_set(rcrtc, DSYSR_DRES | DSYSR_DEN,
-				   start ? DSYSR_DEN : DSYSR_DRES);
+	rcar_du_group_write(rgrp, DSYSR,
+			(rcar_du_group_read(rgrp, DSYSR) & ~(DSYSR_DRES | DSYSR_DEN)) |
+			(start ? DSYSR_DEN : DSYSR_DRES));
 }
 
 void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-11-23 10:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22  6:30 [PATCH] drm: rcar-du: Re-update the DSYSR register value for start/stop Nguyen An Hoan
2018-10-22  8:21 ` Sergei Shtylyov
2018-10-23  0:59   ` Hoan
2018-10-22 11:23 ` Laurent Pinchart
2018-10-23  1:01   ` Hoan
2018-11-22 23:29     ` Laurent Pinchart
2018-10-23 10:10   ` Hoan
2018-10-24  0:16   ` Hoan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.