Skip to content

Commit 0a29b1a

Browse files
lynxeye-devpH5
authored andcommitted
gpu: ipu-v3: pre: add double buffer status readback
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> [p.zabel@pengutronix.de: inverted logic: done -> pending] Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent a3b22b9 commit 0a29b1a

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎drivers/gpu/ipu-v3/ipu-pre.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,12 @@ void ipu_pre_update(struct ipu_pre *pre, unsigned int bufaddr)
265265
writel(IPU_PRE_CTRL_SDW_UPDATE, pre->regs + IPU_PRE_CTRL_SET);
266266
}
267267

268+
bool ipu_pre_update_pending(struct ipu_pre *pre)
269+
{
270+
return !!(readl_relaxed(pre->regs + IPU_PRE_CTRL) &
271+
IPU_PRE_CTRL_SDW_UPDATE);
272+
}
273+
268274
u32 ipu_pre_get_baddr(struct ipu_pre *pre)
269275
{
270276
return (u32)pre->buffer_paddr;

‎drivers/gpu/ipu-v3/ipu-prv.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ void ipu_pre_configure(struct ipu_pre *pre, unsigned int width,
272272
unsigned int height, unsigned int stride, u32 format,
273273
uint64_t modifier, unsigned int bufaddr);
274274
void ipu_pre_update(struct ipu_pre *pre, unsigned int bufaddr);
275+
bool ipu_pre_update_pending(struct ipu_pre *pre);
275276

276277
struct ipu_prg *ipu_prg_lookup_by_phandle(struct device *dev, const char *name,
277278
int ipu_id);

0 commit comments

Comments
 (0)