diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2018-09-11 09:26:54 -0400 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2019-02-22 05:58:45 -0500 |
commit | 4bfbd561fc7d3758873ebfc38b0043065acb77f1 (patch) | |
tree | adf56aa76403c11da1e6823e3ac21fd19904f09d | |
parent | 0a29b1abaf5ba86b2ef5da5a1403ff64dc0d9449 (diff) |
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>
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-prg.c | 16 | ||||
-rw-r--r-- | include/video/imx-ipu-v3.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-prg.c b/drivers/gpu/ipu-v3/ipu-prg.c index 38a3a9764e49..94b76badf677 100644 --- a/drivers/gpu/ipu-v3/ipu-prg.c +++ b/drivers/gpu/ipu-v3/ipu-prg.c | |||
@@ -347,6 +347,22 @@ int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan, | |||
347 | } | 347 | } |
348 | EXPORT_SYMBOL_GPL(ipu_prg_channel_configure); | 348 | EXPORT_SYMBOL_GPL(ipu_prg_channel_configure); |
349 | 349 | ||
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 | |||
350 | static int ipu_prg_probe(struct platform_device *pdev) | 366 | static int ipu_prg_probe(struct platform_device *pdev) |
351 | { | 367 | { |
352 | struct device *dev = &pdev->dev; | 368 | struct device *dev = &pdev->dev; |
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index e582e8e7527a..b80b85f0d9d8 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h | |||
@@ -348,6 +348,7 @@ int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan, | |||
348 | unsigned int axi_id, unsigned int width, | 348 | unsigned int axi_id, unsigned int width, |
349 | unsigned int height, unsigned int stride, | 349 | unsigned int height, unsigned int stride, |
350 | u32 format, uint64_t modifier, unsigned long *eba); | 350 | u32 format, uint64_t modifier, unsigned long *eba); |
351 | bool ipu_prg_channel_configure_pending(struct ipuv3_channel *ipu_chan); | ||
351 | 352 | ||
352 | /* | 353 | /* |
353 | * IPU CMOS Sensor Interface (csi) functions | 354 | * IPU CMOS Sensor Interface (csi) functions |