diff options
author | Liu Ying <victor.liu@nxp.com> | 2018-08-17 11:00:59 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:58:19 +0800 |
commit | 698aeb479bfe79d79475e907e25b295b9c8514dd (patch) | |
tree | 05472623f5b9976013c0d6d1068f23e7c58f96d5 | |
parent | 3baeefbcaee16023050ea6b3f1ff4b745cfa21f4 (diff) |
gpu: imx: dpu: extdst: Add extdst_is_master() helper support
This patch adds extdst_is_master() helper support so that
callers may know if a extdst is a master extdst or not.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
-rw-r--r-- | drivers/gpu/imx/dpu/dpu-extdst.c | 8 | ||||
-rw-r--r-- | include/video/dpu.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/imx/dpu/dpu-extdst.c b/drivers/gpu/imx/dpu/dpu-extdst.c index 09191b6d5769..b70affc50d3c 100644 --- a/drivers/gpu/imx/dpu/dpu-extdst.c +++ b/drivers/gpu/imx/dpu/dpu-extdst.c @@ -380,6 +380,14 @@ u32 extdst_perfresult(struct dpu_extdst *ed) } EXPORT_SYMBOL_GPL(extdst_perfresult); +bool extdst_is_master(struct dpu_extdst *ed) +{ + const struct dpu_data *data = ed->dpu->data; + + return ed->id == data->master_stream_id; +} +EXPORT_SYMBOL_GPL(extdst_is_master); + struct dpu_extdst *dpu_ed_get(struct dpu_soc *dpu, int id) { struct dpu_extdst *ed; diff --git a/include/video/dpu.h b/include/video/dpu.h index 47ed3a3de0d2..656ec850d715 100644 --- a/include/video/dpu.h +++ b/include/video/dpu.h @@ -431,6 +431,7 @@ u32 extdst_last_control_word(struct dpu_extdst *ed); void extdst_pixel_cnt(struct dpu_extdst *ed, u16 *x, u16 *y); void extdst_last_pixel_cnt(struct dpu_extdst *ed, u16 *x, u16 *y); u32 extdst_perfresult(struct dpu_extdst *ed); +bool extdst_is_master(struct dpu_extdst *ed); struct dpu_extdst *dpu_ed_get(struct dpu_soc *dpu, int id); void dpu_ed_put(struct dpu_extdst *ed); struct dpu_extdst *dpu_aux_ed_peek(struct dpu_extdst *ed); |