MLK-16075-17 gpu: imx: dpu: fetchdecode: Add helper fetchdecode_need_fetcheco()
This patch adds helper fetchdecode_need_fetcheco() so that users may check if a fetchdecode needs to use fetcheco for a specific pixel format. Signed-off-by: Liu Ying <victor.liu@nxp.com>pull/10/head
parent
11e86b5056
commit
5945f5dda9
|
@ -523,6 +523,27 @@ struct dpu_fetcheco *fetchdecode_get_fetcheco(struct dpu_fetchdecode *fd)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(fetchdecode_get_fetcheco);
|
||||
|
||||
bool fetchdecode_need_fetcheco(struct dpu_fetchdecode *fd, u32 fmt)
|
||||
{
|
||||
struct dpu_fetcheco *fe = fetchdecode_get_fetcheco(fd);
|
||||
|
||||
if (IS_ERR_OR_NULL(fe))
|
||||
return false;
|
||||
|
||||
switch (fmt) {
|
||||
case DRM_FORMAT_NV12:
|
||||
case DRM_FORMAT_NV21:
|
||||
case DRM_FORMAT_NV16:
|
||||
case DRM_FORMAT_NV61:
|
||||
case DRM_FORMAT_NV24:
|
||||
case DRM_FORMAT_NV42:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fetchdecode_need_fetcheco);
|
||||
|
||||
struct dpu_hscaler *fetchdecode_get_hscaler(struct dpu_fetchdecode *fd)
|
||||
{
|
||||
struct dpu_soc *dpu = fd->dpu;
|
||||
|
|
|
@ -497,6 +497,7 @@ void fetchdecode_controltrigger(struct dpu_fetchdecode *fd, bool trigger);
|
|||
int fetchdecode_fetchtype(struct dpu_fetchdecode *fd, fetchtype_t *type);
|
||||
shadow_load_req_t fetchdecode_to_shdldreq_t(struct dpu_fetchdecode *fd);
|
||||
u32 fetchdecode_get_vproc_mask(struct dpu_fetchdecode *fd);
|
||||
bool fetchdecode_need_fetcheco(struct dpu_fetchdecode *fd, u32 fmt);
|
||||
unsigned int fetchdecode_get_stream_id(struct dpu_fetchdecode *fd);
|
||||
void fetchdecode_set_stream_id(struct dpu_fetchdecode *fd, unsigned int id);
|
||||
struct dpu_fetchdecode *dpu_fd_get(struct dpu_soc *dpu, int id);
|
||||
|
|
Loading…
Reference in New Issue