Skip to content

Commit 4bfbd56

Browse files
lynxeye-devpH5
authored andcommitted
gpu: ipu-v3: prg: add function to get channel configure status
This allows channels using the PRG to check if a requested configuration update has been applied 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 0a29b1a commit 4bfbd56

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,22 @@ int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan,
347347
}
348348
EXPORT_SYMBOL_GPL(ipu_prg_channel_configure);
349349

350+
bool ipu_prg_channel_configure_pending(struct ipuv3_channel *ipu_chan)
351+
{
352+
int prg_chan = ipu_prg_ipu_to_prg_chan(ipu_chan->num);
353+
struct ipu_prg *prg = ipu_chan->ipu->prg_priv;
354+
struct ipu_prg_channel *chan;
355+
356+
if (prg_chan < 0)
357+
return false;
358+
359+
chan = &prg->chan[prg_chan];
360+
WARN_ON(!chan->enabled);
361+
362+
return ipu_pre_update_pending(prg->pres[chan->used_pre]);
363+
}
364+
EXPORT_SYMBOL_GPL(ipu_prg_channel_configure_pending);
365+
350366
static int ipu_prg_probe(struct platform_device *pdev)
351367
{
352368
struct device *dev = &pdev->dev;

‎include/video/imx-ipu-v3.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan,
348348
unsigned int axi_id, unsigned int width,
349349
unsigned int height, unsigned int stride,
350350
u32 format, uint64_t modifier, unsigned long *eba);
351+
bool ipu_prg_channel_configure_pending(struct ipuv3_channel *ipu_chan);
351352

352353
/*
353354
* IPU CMOS Sensor Interface (csi) functions

0 commit comments

Comments
 (0)