MLK-19413-27 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>pull/10/head
parent
68b2c08cc2
commit
f2cabde17f
|
@ -178,6 +178,25 @@ 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)
|
||||
{
|
||||
struct dpu_soc *dpu = ed->dpu;
|
||||
u32 val;
|
||||
|
||||
if (!dpu->devtype->has_syncmode_fixup)
|
||||
return;
|
||||
|
||||
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, val, PIXENGCFG_STATIC);
|
||||
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)
|
||||
{
|
||||
struct dpu_soc *dpu = ed->dpu;
|
||||
|
|
|
@ -529,6 +529,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);
|
||||
|
|
Loading…
Reference in New Issue