Message ID | 1607746317-4696-13-git-send-email-yongqiang.niu@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/mediatek: add support for mediatek SOC MT8192 | expand |
Hi, Yongqiang: Yongqiang Niu <yongqiang.niu@mediatek.com> 於 2020年12月12日 週六 下午12:13寫道: > > fix gamma size config I would like you to provide more information. The original code works in mt8173, why do you modify this? The description may be something like this: According to data sheet, the width is in bits [31, 16] and height is in bits [15, 0]. Even though wrong setting may works in some SoC such as mt8173, but it does not work in mt8192. Regards, Chun-Kuang. > > Fixes: e0a5d3370245 (drm/mediatek: Add GAMMA engine basic function) > Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com> > --- > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > index 00d5687..52b6fc7 100644 > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > @@ -297,7 +297,7 @@ static void mtk_gamma_config(struct mtk_ddp_comp *comp, unsigned int w, > unsigned int h, unsigned int vrefresh, > unsigned int bpc, struct cmdq_pkt *cmdq_pkt) > { > - mtk_ddp_write(cmdq_pkt, h << 16 | w, comp, DISP_GAMMA_SIZE); > + mtk_ddp_write(cmdq_pkt, w << 16 | h, comp, DISP_GAMMA_SIZE); > mtk_dither_set(comp, bpc, DISP_GAMMA_CFG, cmdq_pkt); > } > > -- > 1.8.1.1.dirty > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek
On Tue, 2020-12-15 at 07:40 +0800, Chun-Kuang Hu wrote: > Hi, Yongqiang: > > Yongqiang Niu <yongqiang.niu@mediatek.com> 於 2020年12月12日 週六 下午12:13寫道: > > > > fix gamma size config > > I would like you to provide more information. The original code works > in mt8173, why do you modify this? The description may be something > like this: > > According to data sheet, the width is in bits [31, 16] and height is > in bits [15, 0]. Even though wrong setting may works in some SoC such > as mt8173, but it does not work in mt8192. > > Regards, > Chun-Kuang. it still works in mt8192. just modify this follow data sheet > > > > > Fixes: e0a5d3370245 (drm/mediatek: Add GAMMA engine basic function) > > Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com> > > --- > > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > > index 00d5687..52b6fc7 100644 > > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > > @@ -297,7 +297,7 @@ static void mtk_gamma_config(struct mtk_ddp_comp *comp, unsigned int w, > > unsigned int h, unsigned int vrefresh, > > unsigned int bpc, struct cmdq_pkt *cmdq_pkt) > > { > > - mtk_ddp_write(cmdq_pkt, h << 16 | w, comp, DISP_GAMMA_SIZE); > > + mtk_ddp_write(cmdq_pkt, w << 16 | h, comp, DISP_GAMMA_SIZE); > > mtk_dither_set(comp, bpc, DISP_GAMMA_CFG, cmdq_pkt); > > } > > > > -- > > 1.8.1.1.dirty > > _______________________________________________ > > Linux-mediatek mailing list > > Linux-mediatek@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-mediatek
Hi, Yongqiang: Yongqiang Niu <yongqiang.niu@mediatek.com> 於 2020年12月23日 週三 上午9:37寫道: > > On Tue, 2020-12-15 at 07:40 +0800, Chun-Kuang Hu wrote: > > Hi, Yongqiang: > > > > Yongqiang Niu <yongqiang.niu@mediatek.com> 於 2020年12月12日 週六 下午12:13寫道: > > > > > > fix gamma size config > > > > I would like you to provide more information. The original code works > > in mt8173, why do you modify this? The description may be something > > like this: > > > > According to data sheet, the width is in bits [31, 16] and height is > > in bits [15, 0]. Even though wrong setting may works in some SoC such > > as mt8173, but it does not work in mt8192. > > > > Regards, > > Chun-Kuang. > > it still works in mt8192. > just modify this follow data sheet This patch is not strongly related to MT8192, so move this patch out of this series. Regards, Chun-Kuang. > > > > > > > > > Fixes: e0a5d3370245 (drm/mediatek: Add GAMMA engine basic function) > > > Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com> > > > --- > > > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > > > index 00d5687..52b6fc7 100644 > > > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > > > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > > > @@ -297,7 +297,7 @@ static void mtk_gamma_config(struct mtk_ddp_comp *comp, unsigned int w, > > > unsigned int h, unsigned int vrefresh, > > > unsigned int bpc, struct cmdq_pkt *cmdq_pkt) > > > { > > > - mtk_ddp_write(cmdq_pkt, h << 16 | w, comp, DISP_GAMMA_SIZE); > > > + mtk_ddp_write(cmdq_pkt, w << 16 | h, comp, DISP_GAMMA_SIZE); > > > mtk_dither_set(comp, bpc, DISP_GAMMA_CFG, cmdq_pkt); > > > } > > > > > > -- > > > 1.8.1.1.dirty > > > _______________________________________________ > > > Linux-mediatek mailing list > > > Linux-mediatek@lists.infradead.org > > > http://lists.infradead.org/mailman/listinfo/linux-mediatek >
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c index 00d5687..52b6fc7 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c @@ -297,7 +297,7 @@ static void mtk_gamma_config(struct mtk_ddp_comp *comp, unsigned int w, unsigned int h, unsigned int vrefresh, unsigned int bpc, struct cmdq_pkt *cmdq_pkt) { - mtk_ddp_write(cmdq_pkt, h << 16 | w, comp, DISP_GAMMA_SIZE); + mtk_ddp_write(cmdq_pkt, w << 16 | h, comp, DISP_GAMMA_SIZE); mtk_dither_set(comp, bpc, DISP_GAMMA_CFG, cmdq_pkt); }
fix gamma size config Fixes: e0a5d3370245 (drm/mediatek: Add GAMMA engine basic function) Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com> --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)