dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] gpu: ipu-v3: pre: add double buffer status readback
@ 2018-09-14 16:59 Lucas Stach
  2018-09-14 16:59 ` [PATCH 2/4] gpu: ipu-v3: prg: add function to get channel configure status Lucas Stach
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Lucas Stach @ 2018-09-14 16:59 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: kernel, dri-devel, patchwork-lst

This allows the upper layers to check if a double buffer update has
been applied by the PRE or is still pending.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/gpu/ipu-v3/ipu-pre.c | 6 ++++++
 drivers/gpu/ipu-v3/ipu-prv.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/drivers/gpu/ipu-v3/ipu-pre.c b/drivers/gpu/ipu-v3/ipu-pre.c
index 2f8db9d62551..7389ad157fd6 100644
--- a/drivers/gpu/ipu-v3/ipu-pre.c
+++ b/drivers/gpu/ipu-v3/ipu-pre.c
@@ -259,6 +259,12 @@ void ipu_pre_update(struct ipu_pre *pre, unsigned int bufaddr)
 	writel(IPU_PRE_CTRL_SDW_UPDATE, pre->regs + IPU_PRE_CTRL_SET);
 }
 
+bool ipu_pre_update_done(struct ipu_pre *pre)
+{
+	return !(readl_relaxed(pre->regs + IPU_PRE_CTRL) &
+		 IPU_PRE_CTRL_SDW_UPDATE);
+}
+
 u32 ipu_pre_get_baddr(struct ipu_pre *pre)
 {
 	return (u32)pre->buffer_paddr;
diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h
index d6beee99b6b8..215d342d8441 100644
--- a/drivers/gpu/ipu-v3/ipu-prv.h
+++ b/drivers/gpu/ipu-v3/ipu-prv.h
@@ -272,6 +272,7 @@ void ipu_pre_configure(struct ipu_pre *pre, unsigned int width,
 		       unsigned int height, unsigned int stride, u32 format,
 		       uint64_t modifier, unsigned int bufaddr);
 void ipu_pre_update(struct ipu_pre *pre, unsigned int bufaddr);
+bool ipu_pre_update_done(struct ipu_pre *pre);
 
 struct ipu_prg *ipu_prg_lookup_by_phandle(struct device *dev, const char *name,
 					  int ipu_id);
-- 
2.19.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-01-23 13:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-14 16:59 [PATCH 1/4] gpu: ipu-v3: pre: add double buffer status readback Lucas Stach
2018-09-14 16:59 ` [PATCH 2/4] gpu: ipu-v3: prg: add function to get channel configure status Lucas Stach
2018-10-05 14:16   ` Philipp Zabel
2018-09-14 16:59 ` [PATCH 3/4] drm/imx: ipuv3-plane: add function to query atomic update status Lucas Stach
2018-10-05 14:16   ` Philipp Zabel
2018-09-14 16:59 ` [PATCH 4/4] drm/imx: only send commit done event when all state has been applied Lucas Stach
2018-10-05 15:11   ` Philipp Zabel
2019-01-23 11:35     ` Philipp Zabel
2019-01-23 13:04       ` Daniel Vetter
2018-10-05 14:16 ` [PATCH 1/4] gpu: ipu-v3: pre: add double buffer status readback Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox