From: Yuchou Gan Date: Fri, 27 Apr 2018 10:14:07 +0000 (+0800) Subject: MLK-18101-5 gpu: imx: imx8_prg: Add prg_put_auxiliary() helper support X-Git-Tag: C0P2-H0.0--20200415~43 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=7ad1d6c8bd0471c2264ee63b6955ca670e8428b5;p=linux.git MLK-18101-5 gpu: imx: imx8_prg: Add prg_put_auxiliary() helper support This patch adds prg_put_auxiliary() helper support so that users may set a particular PRG not serve as an auxiliary one. Signed-off-by: Yuchou Gan --- diff --git a/drivers/gpu/imx/imx8_prg.c b/drivers/gpu/imx/imx8_prg.c index 3d5d8231f47e..bd3543c92ef3 100644 --- a/drivers/gpu/imx/imx8_prg.c +++ b/drivers/gpu/imx/imx8_prg.c @@ -250,11 +250,18 @@ void prg_set_auxiliary(struct prg *prg) { if (WARN_ON(!prg)) return; - prg->is_auxiliary = true; } EXPORT_SYMBOL_GPL(prg_set_auxiliary); +void prg_put_auxiliary(struct prg *prg) +{ + if (WARN_ON(!prg)) + return; + prg->is_auxiliary = false; +} +EXPORT_SYMBOL_GPL(prg_put_auxiliary); + struct prg * prg_lookup_by_phandle(struct device *dev, const char *name, int index) { diff --git a/include/video/imx8-prefetch.h b/include/video/imx8-prefetch.h index 849ef52c9fb6..3eee7267bb4f 100644 --- a/include/video/imx8-prefetch.h +++ b/include/video/imx8-prefetch.h @@ -42,6 +42,7 @@ bool prg_stride_supported(struct prg *prg, unsigned int stride); bool prg_stride_double_check(struct prg *prg, unsigned int stride, dma_addr_t baddr); void prg_set_auxiliary(struct prg *prg); +void prg_put_auxiliary(struct prg *prg); struct dprc; struct dprc *