lkml.org 
[lkml]   [2019]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] drm/mediatek: add ctm property support
From
Date
Hi, Yongqiang:

On Mon, 2019-12-02 at 17:03 +0800, yongqiang.niu@mediatek.com wrote:
> From: Yongqiang Niu <yongqiang.niu@mediatek.com>
>
> add ctm property support
>
> Change-Id: I8111da7b309b1809c6302e7748dd9fd06dc97bde
> Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 15 ++++++-
> drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 61 ++++++++++++++++++++++++++++-
> drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 11 ++++++
> 3 files changed, 84 insertions(+), 3 deletions(-)
>

[snip]


> @@ -870,6 +875,12 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
> }
>
> mtk_crtc->ddp_comp[i] = comp;
> +
> + if (comp_id == DDP_COMPONENT_CCORR)
> + has_ctm = true;
> +
> + if (comp_id == DDP_COMPONENT_GAMMA)

Not only DDP_COMPONENT_GAMMA has gamma function, but also
DDP_COMPONENT_AAL0 and DDP_COMPONENT_AAL1. I think it's no good to use
comp_id to decide what function of this component has. The easy way is
just to check weather the function point exist.

Regards,
CK

> + gamma_lut_size = MTK_LUT_SIZE;
> }
>
> for (i = 0; i < mtk_crtc->ddp_comp_nr; i++)
> @@ -891,7 +902,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
> if (ret < 0)
> return ret;
> drm_mode_crtc_set_gamma_size(&mtk_crtc->base, MTK_LUT_SIZE);
> - drm_crtc_enable_color_mgmt(&mtk_crtc->base, 0, false, MTK_LUT_SIZE);
> + drm_crtc_enable_color_mgmt(&mtk_crtc->base, 0, has_ctm, gamma_lut_size);
> priv->num_pipes++;
> #ifdef CONFIG_MTK_CMDQ
> mtk_crtc->cmdq_client =

\
 
 \ /
  Last update: 2019-12-05 09:09    [W:0.030 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site