1
0
Fork 0

gpu: imx: dpu: extdst: Add extdst_pixengcfg_syncmode_master() helper

This patch adds extdst_pixengcfg_syncmode_master() helper support
so that the callers may control if a extdst is master or slave
when it works in sync mode.  The bit16 of extdst's PIXENGCFG_STATIC
register controls this and it's a part of sync mode fixup logic.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Liu Ying 2018-08-30 15:46:56 +08:00 committed by Dong Aisheng
parent 5705389c71
commit 1a04cd435d
2 changed files with 16 additions and 0 deletions

View File

@ -170,6 +170,21 @@ void extdst_pixengcfg_div(struct dpu_extdst *ed, u16 div)
}
EXPORT_SYMBOL_GPL(extdst_pixengcfg_div);
void extdst_pixengcfg_syncmode_master(struct dpu_extdst *ed, bool enable)
{
u32 val;
mutex_lock(&ed->mutex);
val = dpu_pec_ed_read(ed, PIXENGCFG_STATIC);
if (enable)
val |= BIT(16);
else
val &= ~BIT(16);
dpu_pec_ed_write(ed, PIXENGCFG_STATIC, val);
mutex_unlock(&ed->mutex);
}
EXPORT_SYMBOL_GPL(extdst_pixengcfg_syncmode_master);
int extdst_pixengcfg_src_sel(struct dpu_extdst *ed, extdst_src_sel_t src)
{
mutex_lock(&ed->mutex);

View File

@ -413,6 +413,7 @@ void extdst_pixengcfg_powerdown(struct dpu_extdst *ed, bool powerdown);
void extdst_pixengcfg_sync_mode(struct dpu_extdst *ed, ed_sync_mode_t mode);
void extdst_pixengcfg_reset(struct dpu_extdst *ed, bool reset);
void extdst_pixengcfg_div(struct dpu_extdst *ed, u16 div);
void extdst_pixengcfg_syncmode_master(struct dpu_extdst *ed, bool enable);
int extdst_pixengcfg_src_sel(struct dpu_extdst *ed, extdst_src_sel_t src);
void extdst_pixengcfg_sel_shdldreq(struct dpu_extdst *ed);
void extdst_pixengcfg_shdldreq(struct dpu_extdst *ed, u32 req_mask);