[PATCH v1 11/17] drm/mediatek: add COLOR support for MT8195

Jason-JH Lin jason-jh.lin at mediatek.com
Sat Jul 10 00:21:46 PDT 2021


On Wed, 2021-07-07 at 14:01 +0800, CK Hu wrote:
> Hi, Jason:
> 
> On Wed, 2021-07-07 at 12:12 +0800, jason-jh.lin wrote:
> > Add COLOR support for MT8195.
> > 
> > Signed-off-by: jason-jh.lin <jason-jh.lin at mediatek.com>
> > ---
> >  drivers/gpu/drm/mediatek/mtk_disp_color.c | 6 ++++++
> >  drivers/gpu/drm/mediatek/mtk_drm_drv.c    | 2 ++
> >  2 files changed, 8 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_color.c
> > b/drivers/gpu/drm/mediatek/mtk_disp_color.c
> > index 63f411ab393b..ce2cf9f504cc 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_disp_color.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_disp_color.c
> > @@ -149,6 +149,10 @@ static const struct mtk_disp_color_data
> > mt8173_color_driver_data = {
> >  	.color_offset = DISP_COLOR_START_MT8173,
> >  };
> >  
> > +static const struct mtk_disp_color_data mt8195_color_driver_data =
> > {
> > +	.color_offset = DISP_COLOR_START_MT8173,
> > +};
> 
> mt8195_color_driver_data is identical to mt8173_color_driver_data, so
> use mt8173_color_driver_data and remove mt8195_color_driver_data.
> 
> > +
> >  static const struct of_device_id mtk_disp_color_driver_dt_match[]
> > = {
> >  	{ .compatible = "mediatek,mt2701-disp-color",
> >  	  .data = &mt2701_color_driver_data},
> > @@ -156,6 +160,8 @@ static const struct of_device_id
> > mtk_disp_color_driver_dt_match[] = {
> >  	  .data = &mt8167_color_driver_data},
> >  	{ .compatible = "mediatek,mt8173-disp-color",
> >  	  .data = &mt8173_color_driver_data},
> > +	{ .compatible = "mediatek,mt8195-disp-color",
> > +	  .data = &mt8195_color_driver_data},
> >  	{},
> >  };
> >  MODULE_DEVICE_TABLE(of, mtk_disp_color_driver_dt_match);
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > index 8b24623dcd91..28bf4a11efb0 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > @@ -444,6 +444,8 @@ static const struct of_device_id
> > mtk_ddp_comp_dt_ids[] = {
> >  	  .data = (void *)MTK_DISP_COLOR },
> >  	{ .compatible = "mediatek,mt8173-disp-color",
> >  	  .data = (void *)MTK_DISP_COLOR },
> > +	{ .compatible = "mediatek,mt8195-disp-color",
> > +	  .data = (void *)MTK_DISP_COLOR },
> 
> Is mediatek,mt8195-disp-color identical to
> mediatek,mt8173-disp-color in hardware function? If so, use the
> compatible
> as
> 
> compatible = "mediatek,mt8195-disp-color", "mediatek,mt8173-disp-
> color";
> 
> And driver just keep "mediatek,mt8173-disp-color" and remove
> "mediatek,mt8195-disp-color".
> 
> If the hardware function has some different, just forget this.
> 
> Regards,
> CK
> 
Hi CK,

OK, I'll remove this patch at the next version.

Regard,
Jason-JH.Lin
> >  	{ .compatible = "mediatek,mt8173-disp-aal",
> >  	  .data = (void *)MTK_DISP_AAL},
> >  	{ .compatible = "mediatek,mt8173-disp-gamma",
> 
> 


More information about the Linux-mediatek mailing list