All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: Marek Vasut <marex@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>, Liu Ying <victor.liu@nxp.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	dri-devel@lists.freedesktop.org,
	Martyn Welch <martyn.welch@collabora.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sam Ravnborg <sam@ravnborg.org>, "jian.li" <jian.li@nxp.com>
Subject: Re: [PATCH] drm: lcdif: Set and enable FIFO Panic threshold
Date: Tue, 1 Nov 2022 17:51:28 +0100	[thread overview]
Message-ID: <20221101165128.s7d3eqtjd6wbbhc5@pengutronix.de> (raw)
In-Reply-To: <adfa959a-cf94-d815-a5b2-9de157f0a6ca@denx.de>

On 22-11-01, Marek Vasut wrote:
> On 11/1/22 17:06, Marco Felsch wrote:
> 
> Hi,
> 
> > > > Also I understood the thresholds in such a way, that the FIFO watermark
> > > > must be higher but there is no place left when it is set to 3/3. In such
> > > > case this means that the PANIC will never left once it was entered.
> > > 
> > > I think this part is wrong.
> > > 
> > > Consider that the FIFO fill drops below 2/3 so PANIC signal asserts.
> > 
> > ? I thought the PANIC is triggered if the FIFO drops below the 1/3
> > threshold and is active till the 2/3 threshold.
> 
> Yes, although I think the ASSERT/DEASSERT are one-way switches.
> 
> > > After a bit of time, the FIFO fill reaches full 3/3 (maybe during
> > > blanking period, where the data can be read in quickly without being
> > > scanned out again), and the PANIC signal de-asserts.
> > > 
> > > So the LCDIF won't be in constant PANIC asserted, but it will be there for
> > > quite a bit longer.
> > > 
> > > > > > It also seems to me that tuning these thresholds might be related to
> > > > > > some special use-case of the SoC, and it is most likely not just the
> > > > > > LCDIF thresholds which have been adjusted in such case, I would
> > > > > > expect
> > > > > > the NOC and GPV NIC priorities to be adjusted at that point too.
> > > > 
> > > > As far as I understood, the PANIC signal triggers the NOC to use the
> > > > PANIC signal priorities instead of the normal ones. I found a patch
> > > > laying in our downstream [1] repo which configures the threshold. This
> > > > raises the question which PANIC prio do you use? Do you have a patch for
> > > > this? If I remember correctly some TF-A's like the NXP downstream one
> > > > configure this but the upstream TF-A don't. Which TF-A do you use?
> > > 
> > > Upstream 2.6 or 2.7 , so this tuning does not apply.
> > 
> > So your panic priority is what?
> 
> If you tell me which register (physical address) to read, I will do that on
> this board right now.

According our patch it is:

#define HDMI_TX_CONTROL0       0x200
#define HDMI_LCDIF_NOC_HURRY_PRIO_MASK GENMASK(14, 12)
#define HDMI_LCDIF_NOC_HURRY_PRIO(p)   (((p) << 12) & HDMI_LCDIF_NOC_HURRY_PRIO_MASK)

and we set it within imx8mp_hdmi_blk_ctrl_power_on() by:

regmap_set_bits(bc->regmap, HDMI_TX_CONTROL0,
                HDMI_LCDIF_NOC_HURRY_PRIO(7));

imx8mp_hdmi_blk_ctrl_power_off():

regmap_clear_bits(bc->regmap, HDMI_TX_CONTROL0,
                HDMI_LCDIF_NOC_HURRY_PRIO(7));

> 
> > > > > > So unless there are further details for that use-case which justify
> > > > > > making this somehow configurable, then maybe we should just stick to
> > > > > > 1/3 and 2/3 for now. And once there is a valid use-case which does
> > > > > > justify making this configurable, then we can add the DT properties
> > > > > > and all.
> > > > > > 
> > > > > > What do you think ?
> > > > > 
> > > > > No strong opinion from me on using LOW=1/3 and HIGH=2/3 thresholds for
> > > > > now if they satisfy all current users of the upstream kernel.  Tuning
> > > > > them in a certain way will be indeed needed once an usecase comes along
> > > > > and still suffers from the FIFO underflows with those thresholds.
> > > > 
> > > > I think that 1/3 and 2/3 should be fine for now too.
> > > 
> > > All right, lemme re-test this, send V2, and then we can go from there.
> > 
> > Okay :)
> > 
> > > btw. can you resend that [PATCH] drm: lcdif: change burst size to 256B with
> > > Fixes tag , so it can trickle into stable releases ?
> > 
> > Shure I will resend it with the tag added.
> 
> Thanks, I'll pick it via drm-misc then.

Send it as v2.

Regards,
  Marco

  reply	other threads:[~2022-11-01 16:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 21:20 [PATCH] drm: lcdif: Set and enable FIFO Panic threshold Marek Vasut
2022-10-27  5:45 ` Liu Ying
2022-10-27 10:03   ` Marek Vasut
2022-10-27 13:57     ` Liu Ying
2022-10-27 17:47       ` Marco Felsch
2022-10-28  0:03         ` Marek Vasut
2022-10-28  2:33           ` Liu Ying
2022-11-01 14:04             ` Marco Felsch
2022-11-01 15:24               ` Marek Vasut
2022-11-01 16:06                 ` Marco Felsch
2022-11-01 16:26                   ` Marek Vasut
2022-11-01 16:51                     ` Marco Felsch [this message]
2022-11-01 17:01                       ` Marek Vasut
2022-11-01 17:06                         ` Marco Felsch
2022-11-03  8:56               ` Liu Ying
2022-10-27  5:47 ` kernel test robot
2022-10-27  5:47   ` kernel test robot
2022-10-27  8:13 ` Marco Felsch
2022-10-27  8:19   ` Marek Vasut
2022-10-27  8:32     ` Marco Felsch
2022-10-27  9:09       ` Marek Vasut

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=20221101165128.s7d3eqtjd6wbbhc5@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jian.li@nxp.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=marex@denx.de \
    --cc=martyn.welch@collabora.com \
    --cc=peng.fan@nxp.com \
    --cc=sam@ravnborg.org \
    --cc=victor.liu@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.