dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Hsin-Yi Wang <hsinyi@chromium.org>
To: CK Hu <ck.hu@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Devicetree List <devicetree@vger.kernel.org>,
	David Airlie <airlied@linux.ie>,
	lkml <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Yongqiang Niu <yongqiang.niu@mediatek.com>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v11 3/9] drm/mediatek: add RDMA fifo size error handle
Date: Thu, 28 Jan 2021 19:12:20 +0800	[thread overview]
Message-ID: <CAJMQK-igcZXrnTb6pA3S6X_uTF6aGhKFLAHtdet62od9vVx4rg@mail.gmail.com> (raw)
In-Reply-To: <1611820251.16091.7.camel@mtksdaap41>

On Thu, Jan 28, 2021 at 3:52 PM CK Hu <ck.hu@mediatek.com> wrote:
>
> Hi, Hsin-Yi:
>
> On Thu, 2021-01-28 at 15:27 +0800, Hsin-Yi Wang wrote:
> > From: Yongqiang Niu <yongqiang.niu@mediatek.com>
> >
> > This patch add RDMA fifo size error handle
> > rdma fifo size will not always bigger than the calculated threshold
> > if that case happened, we need set fifo size as the threshold
> >
> > Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
> > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> > ---
> >  drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c
> > index b84004394970f..04b9542010b00 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c
> > @@ -168,6 +168,10 @@ void mtk_rdma_config(struct device *dev, unsigned int width,
> >        * account for blanking, and with a pixel depth of 4 bytes:
> >        */
> >       threshold = width * height * vrefresh * 4 * 7 / 1000000;
> > +
> > +     if (threshold > rdma_fifo_size)
> > +             threshold = rdma_fifo_size;
> > +
>
> Please see the discussion in [1].
>
> [1]
> https://patchwork.kernel.org/project/linux-mediatek/patch/1607591262-21736-6-git-send-email-yongqiang.niu@mediatek.com/
>
> Regards,
> CK
>

Hi CK,

Even if we set threshold to
threshold = RDMA_FIFO_PSEUDO_SIZE(rdma_fifo_size) * width * height *
vrefresh / 2 / MAX_WIDTH / MAX_HEIGHT / MAX_VREFRESH;

I'm not sure what value MAX_WIDTH, MAX_HEIGHT, and MAX_VREFRESH should
set to for each SoC.
Since there's no conclusion yet, I'll drop this patch in the series,
as this seems not an mt8183 specific fix.


> >       reg = RDMA_FIFO_UNDERFLOW_EN |
> >             RDMA_FIFO_PSEUDO_SIZE(rdma_fifo_size) |
> >             RDMA_OUTPUT_VALID_FIFO_THRESHOLD(threshold);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-01-28 19:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28  7:27 [PATCH v11 0/9] drm/mediatek: add support for mediatek SOC MT8183 Hsin-Yi Wang
2021-01-28  7:27 ` [PATCH v11 1/9] arm64: dts: mt8183: rename rdma fifo size Hsin-Yi Wang
2021-01-28 10:24   ` Enric Balletbo Serra
2021-01-28  7:27 ` [PATCH v11 2/9] arm64: dts: mt8183: refine gamma compatible name Hsin-Yi Wang
2021-01-28  9:11   ` Enric Balletbo Serra
2021-01-28  7:27 ` [PATCH v11 3/9] drm/mediatek: add RDMA fifo size error handle Hsin-Yi Wang
2021-01-28  7:50   ` CK Hu
2021-01-28 11:12     ` Hsin-Yi Wang [this message]
2021-01-28  7:27 ` [PATCH v11 4/9] drm/mediatek: add mtk_dither_set_common() function Hsin-Yi Wang
2021-01-28  7:39   ` CK Hu
2021-01-28  7:27 ` [PATCH v11 5/9] drm/mediatek: separate gamma module Hsin-Yi Wang
2021-01-28  7:27 ` [PATCH v11 6/9] drm/mediatek: add has_dither private data for gamma Hsin-Yi Wang
2021-01-28  7:28 ` [PATCH v11 7/9] drm/mediatek: enable dither function Hsin-Yi Wang
2021-01-28  7:42   ` CK Hu
2021-01-28  7:59     ` Yongqiang Niu
2021-01-28  8:07       ` CK Hu
2021-01-28  8:09         ` Yongqiang Niu
2021-01-28  8:18           ` Hsin-Yi Wang
2021-01-28  8:28             ` Yongqiang Niu
2021-01-28  8:28             ` CK Hu
2021-01-28  8:32               ` Yongqiang Niu
2021-01-28  8:41                 ` Hsin-Yi Wang
2021-01-28  7:28 ` [PATCH v11 8/9] soc: mediatek: add mtk mutex support for MT8183 Hsin-Yi Wang
2021-01-28  7:46   ` CK Hu
2021-01-28  7:28 ` [PATCH v11 9/9] drm/mediatek: add support for mediatek SOC MT8183 Hsin-Yi Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJMQK-igcZXrnTb6pA3S6X_uTF6aGhKFLAHtdet62od9vVx4rg@mail.gmail.com \
    --to=hsinyi@chromium.org \
    --cc=airlied@linux.ie \
    --cc=ck.hu@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=yongqiang.niu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).