* [PATCH v2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp
@ 2020-08-17 13:06 Jitao Shi
2020-08-17 23:42 ` Chun-Kuang Hu
0 siblings, 1 reply; 5+ messages in thread
From: Jitao Shi @ 2020-08-17 13:06 UTC (permalink / raw)
To: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
David Airlie, dri-devel, linux-kernel
Cc: linux-mediatek, devicetree, linux-arm-kernel, srv_heupstream,
yingjoe.chen, eddie.huang, cawa.cheng, bibby.hsieh, ck.hu,
stonea168, huijuan.xie, Jitao Shi
horizontal_backporch_byte should be hbp * bpp - hbp extra bytes.
So remove the wrong subtraction 10.
Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
---
drivers/gpu/drm/mediatek/mtk_dsi.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 270bf22c98fe..5d031e634571 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -473,14 +473,13 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
horizontal_sync_active_byte = (vm->hsync_len * dsi_tmp_buf_bpp - 10);
if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE)
- horizontal_backporch_byte =
- (vm->hback_porch * dsi_tmp_buf_bpp - 10);
+ horizontal_backporch_byte = vm->hback_porch * dsi_tmp_buf_bpp;
else
- horizontal_backporch_byte = ((vm->hback_porch + vm->hsync_len) *
- dsi_tmp_buf_bpp - 10);
+ horizontal_backporch_byte = (vm->hback_porch + vm->hsync_len) *
+ dsi_tmp_buf_bpp;
data_phy_cycles = timing->lpx + timing->da_hs_prepare +
- timing->da_hs_zero + timing->da_hs_exit + 3;
+ timing->da_hs_zero + timing->da_hs_exit;
if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
if ((vm->hfront_porch + vm->hback_porch) * dsi_tmp_buf_bpp >
--
2.12.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp
2020-08-17 13:06 [PATCH v2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp Jitao Shi
@ 2020-08-17 23:42 ` Chun-Kuang Hu
2020-08-18 2:41 ` Jitao Shi
0 siblings, 1 reply; 5+ messages in thread
From: Chun-Kuang Hu @ 2020-08-17 23:42 UTC (permalink / raw)
To: Jitao Shi
Cc: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
David Airlie, DRI Development, linux-kernel, devicetree,
srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
moderated list:ARM/Mediatek SoC support, Bibby Hsieh, CK Hu,
yingjoe.chen, eddie.huang, Linux ARM
Hi, Jitao:
Jitao Shi <jitao.shi@mediatek.com> 於 2020年8月17日 週一 下午9:07寫道:
>
> horizontal_backporch_byte should be hbp * bpp - hbp extra bytes.
> So remove the wrong subtraction 10.
>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dsi.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index 270bf22c98fe..5d031e634571 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -473,14 +473,13 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
> horizontal_sync_active_byte = (vm->hsync_len * dsi_tmp_buf_bpp - 10);
So this subtraction 10 is correct?
Regards,
Chun-Kuang.
>
> if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE)
> - horizontal_backporch_byte =
> - (vm->hback_porch * dsi_tmp_buf_bpp - 10);
> + horizontal_backporch_byte = vm->hback_porch * dsi_tmp_buf_bpp;
> else
> - horizontal_backporch_byte = ((vm->hback_porch + vm->hsync_len) *
> - dsi_tmp_buf_bpp - 10);
> + horizontal_backporch_byte = (vm->hback_porch + vm->hsync_len) *
> + dsi_tmp_buf_bpp;
>
> data_phy_cycles = timing->lpx + timing->da_hs_prepare +
> - timing->da_hs_zero + timing->da_hs_exit + 3;
> + timing->da_hs_zero + timing->da_hs_exit;
>
> if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
> if ((vm->hfront_porch + vm->hback_porch) * dsi_tmp_buf_bpp >
> --
> 2.12.5
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp
2020-08-17 23:42 ` Chun-Kuang Hu
@ 2020-08-18 2:41 ` Jitao Shi
2020-08-18 14:45 ` Chun-Kuang Hu
0 siblings, 1 reply; 5+ messages in thread
From: Jitao Shi @ 2020-08-18 2:41 UTC (permalink / raw)
To: Chun-Kuang Hu
Cc: Rob Herring, Mark Rutland, Matthias Brugger, Daniel Vetter,
David Airlie, DRI Development, linux-kernel, devicetree,
srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
moderated list:ARM/Mediatek SoC support, Bibby Hsieh, CK Hu,
yingjoe.chen, eddie.huang, Linux ARM
On Tue, 2020-08-18 at 07:42 +0800, Chun-Kuang Hu wrote:
> Hi, Jitao:
>
> Jitao Shi <jitao.shi@mediatek.com> 於 2020年8月17日 週一 下午9:07寫道:
> >
> > horizontal_backporch_byte should be hbp * bpp - hbp extra bytes.
> > So remove the wrong subtraction 10.
> >
> > Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> > ---
> > drivers/gpu/drm/mediatek/mtk_dsi.c | 9 ++++-----
> > 1 file changed, 4 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> > index 270bf22c98fe..5d031e634571 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> > @@ -473,14 +473,13 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
> > horizontal_sync_active_byte = (vm->hsync_len * dsi_tmp_buf_bpp - 10);
>
> So this subtraction 10 is correct?
>
> Regards,
> Chun-Kuang.
>
Yes, It is right.
In the cea861 and dmt spec the mini hsync is 40 pixels.
So the vm->hsync_len * dsi_tmp_buf_bpp >= 120 > 10
Best Regards
jitao
> >
> > if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE)
> > - horizontal_backporch_byte =
> > - (vm->hback_porch * dsi_tmp_buf_bpp - 10);
> > + horizontal_backporch_byte = vm->hback_porch * dsi_tmp_buf_bpp;
> > else
> > - horizontal_backporch_byte = ((vm->hback_porch + vm->hsync_len) *
> > - dsi_tmp_buf_bpp - 10);
> > + horizontal_backporch_byte = (vm->hback_porch + vm->hsync_len) *
> > + dsi_tmp_buf_bpp;
> >
> > data_phy_cycles = timing->lpx + timing->da_hs_prepare +
> > - timing->da_hs_zero + timing->da_hs_exit + 3;
> > + timing->da_hs_zero + timing->da_hs_exit;
> >
> > if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
> > if ((vm->hfront_porch + vm->hback_porch) * dsi_tmp_buf_bpp >
> > --
> > 2.12.5
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp
2020-08-18 2:41 ` Jitao Shi
@ 2020-08-18 14:45 ` Chun-Kuang Hu
2020-08-26 23:01 ` Chun-Kuang Hu
0 siblings, 1 reply; 5+ messages in thread
From: Chun-Kuang Hu @ 2020-08-18 14:45 UTC (permalink / raw)
To: Jitao Shi
Cc: Chun-Kuang Hu, Rob Herring, Mark Rutland, Matthias Brugger,
Daniel Vetter, David Airlie, DRI Development, linux-kernel,
devicetree, srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
moderated list:ARM/Mediatek SoC support, Bibby Hsieh, CK Hu,
yingjoe.chen, eddie.huang, Linux ARM
Hi, Jitao:
Jitao Shi <jitao.shi@mediatek.com> 於 2020年8月18日 週二 上午10:41寫道:
>
> On Tue, 2020-08-18 at 07:42 +0800, Chun-Kuang Hu wrote:
> > Hi, Jitao:
> >
> > Jitao Shi <jitao.shi@mediatek.com> 於 2020年8月17日 週一 下午9:07寫道:
> > >
> > > horizontal_backporch_byte should be hbp * bpp - hbp extra bytes.
> > > So remove the wrong subtraction 10.
> > >
> > > Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> > > ---
> > > drivers/gpu/drm/mediatek/mtk_dsi.c | 9 ++++-----
> > > 1 file changed, 4 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> > > index 270bf22c98fe..5d031e634571 100644
> > > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> > > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> > > @@ -473,14 +473,13 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
> > > horizontal_sync_active_byte = (vm->hsync_len * dsi_tmp_buf_bpp - 10);
> >
> > So this subtraction 10 is correct?
> >
> > Regards,
> > Chun-Kuang.
> >
>
> Yes, It is right.
>
> In the cea861 and dmt spec the mini hsync is 40 pixels.
> So the vm->hsync_len * dsi_tmp_buf_bpp >= 120 > 10
>
OK, so
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
> Best Regards
> jitao
> > >
> > > if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE)
> > > - horizontal_backporch_byte =
> > > - (vm->hback_porch * dsi_tmp_buf_bpp - 10);
> > > + horizontal_backporch_byte = vm->hback_porch * dsi_tmp_buf_bpp;
> > > else
> > > - horizontal_backporch_byte = ((vm->hback_porch + vm->hsync_len) *
> > > - dsi_tmp_buf_bpp - 10);
> > > + horizontal_backporch_byte = (vm->hback_porch + vm->hsync_len) *
> > > + dsi_tmp_buf_bpp;
> > >
> > > data_phy_cycles = timing->lpx + timing->da_hs_prepare +
> > > - timing->da_hs_zero + timing->da_hs_exit + 3;
> > > + timing->da_hs_zero + timing->da_hs_exit;
> > >
> > > if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
> > > if ((vm->hfront_porch + vm->hback_porch) * dsi_tmp_buf_bpp >
> > > --
> > > 2.12.5
> > > _______________________________________________
> > > Linux-mediatek mailing list
> > > Linux-mediatek@lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/linux-mediatek
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp
2020-08-18 14:45 ` Chun-Kuang Hu
@ 2020-08-26 23:01 ` Chun-Kuang Hu
0 siblings, 0 replies; 5+ messages in thread
From: Chun-Kuang Hu @ 2020-08-26 23:01 UTC (permalink / raw)
To: Chun-Kuang Hu
Cc: Jitao Shi, Rob Herring, Mark Rutland, Matthias Brugger,
Daniel Vetter, David Airlie, DRI Development, linux-kernel,
devicetree, srv_heupstream, huijuan.xie, stonea168, cawa.cheng,
moderated list:ARM/Mediatek SoC support, Bibby Hsieh, CK Hu,
yingjoe.chen, eddie.huang, Linux ARM
Hi, Jitao:
Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年8月18日 週二 下午10:45寫道:
>
> Hi, Jitao:
>
> Jitao Shi <jitao.shi@mediatek.com> 於 2020年8月18日 週二 上午10:41寫道:
> >
> > On Tue, 2020-08-18 at 07:42 +0800, Chun-Kuang Hu wrote:
> > > Hi, Jitao:
> > >
> > > Jitao Shi <jitao.shi@mediatek.com> 於 2020年8月17日 週一 下午9:07寫道:
> > > >
> > > > horizontal_backporch_byte should be hbp * bpp - hbp extra bytes.
> > > > So remove the wrong subtraction 10.
> > > >
> > > > Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> > > > ---
> > > > drivers/gpu/drm/mediatek/mtk_dsi.c | 9 ++++-----
> > > > 1 file changed, 4 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> > > > index 270bf22c98fe..5d031e634571 100644
> > > > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> > > > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> > > > @@ -473,14 +473,13 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
> > > > horizontal_sync_active_byte = (vm->hsync_len * dsi_tmp_buf_bpp - 10);
> > >
> > > So this subtraction 10 is correct?
> > >
> > > Regards,
> > > Chun-Kuang.
> > >
> >
> > Yes, It is right.
> >
> > In the cea861 and dmt spec the mini hsync is 40 pixels.
> > So the vm->hsync_len * dsi_tmp_buf_bpp >= 120 > 10
> >
>
> OK, so
>
> Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
>
Applied to mediatek-drm-fixes [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-fixes
Regards,
Chun-Kuang.
> > Best Regards
> > jitao
> > > >
> > > > if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE)
> > > > - horizontal_backporch_byte =
> > > > - (vm->hback_porch * dsi_tmp_buf_bpp - 10);
> > > > + horizontal_backporch_byte = vm->hback_porch * dsi_tmp_buf_bpp;
> > > > else
> > > > - horizontal_backporch_byte = ((vm->hback_porch + vm->hsync_len) *
> > > > - dsi_tmp_buf_bpp - 10);
> > > > + horizontal_backporch_byte = (vm->hback_porch + vm->hsync_len) *
> > > > + dsi_tmp_buf_bpp;
> > > >
> > > > data_phy_cycles = timing->lpx + timing->da_hs_prepare +
> > > > - timing->da_hs_zero + timing->da_hs_exit + 3;
> > > > + timing->da_hs_zero + timing->da_hs_exit;
> > > >
> > > > if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
> > > > if ((vm->hfront_porch + vm->hback_porch) * dsi_tmp_buf_bpp >
> > > > --
> > > > 2.12.5
> > > > _______________________________________________
> > > > Linux-mediatek mailing list
> > > > Linux-mediatek@lists.infradead.org
> > > > http://lists.infradead.org/mailman/listinfo/linux-mediatek
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-26 23:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 13:06 [PATCH v2] drm/mediatek: dsi: fix scrolling of panel with small hfp or hbp Jitao Shi
2020-08-17 23:42 ` Chun-Kuang Hu
2020-08-18 2:41 ` Jitao Shi
2020-08-18 14:45 ` Chun-Kuang Hu
2020-08-26 23:01 ` Chun-Kuang Hu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).