1
0
Fork 0

MLK-16075-16 gpu: imx: dpu: fetchdecode: Add helper fetchdecode_get_fetcheco()

This patch adds helper fetchdecode_get_fetcheco() so that users may
get the relevant fetcheco via fetchdecode.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
pull/10/head
Liu Ying 2017-07-24 13:59:25 +08:00 committed by Jason Liu
parent 378082ed85
commit 11e86b5056
2 changed files with 21 additions and 0 deletions

View File

@ -503,6 +503,26 @@ u32 fetchdecode_get_vproc_mask(struct dpu_fetchdecode *fd)
}
EXPORT_SYMBOL_GPL(fetchdecode_get_vproc_mask);
struct dpu_fetcheco *fetchdecode_get_fetcheco(struct dpu_fetchdecode *fd)
{
struct dpu_soc *dpu = fd->dpu;
switch (fd->id) {
case 0:
case 1:
return dpu->fe_priv[fd->id];
case 2:
case 3:
/* TODO: for DPU v1, add FetchEco2 support */
return dpu->fe_priv[fd->id - 2];
default:
WARN_ON(1);
}
return ERR_PTR(-EINVAL);
}
EXPORT_SYMBOL_GPL(fetchdecode_get_fetcheco);
struct dpu_hscaler *fetchdecode_get_hscaler(struct dpu_fetchdecode *fd)
{
struct dpu_soc *dpu = fd->dpu;

View File

@ -631,6 +631,7 @@ void vscaler_set_stream_id(struct dpu_vscaler *vs, unsigned int id);
struct dpu_vscaler *dpu_vs_get(struct dpu_soc *dpu, int id);
void dpu_vs_put(struct dpu_vscaler *vs);
struct dpu_fetcheco *fetchdecode_get_fetcheco(struct dpu_fetchdecode *fd);
struct dpu_hscaler *fetchdecode_get_hscaler(struct dpu_fetchdecode *fd);
struct dpu_vscaler *fetchdecode_get_vscaler(struct dpu_fetchdecode *fd);