From: Jayesh Choudhary <j-choudhary@ti.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: <jyri.sarha@iki.fi>, <dri-devel@lists.freedesktop.org>,
<devarsht@ti.com>, <tomi.valkeinen@ideasonboard.com>,
<maarten.lankhorst@linux.intel.com>, <tzimmermann@suse.de>,
<airlied@gmail.com>, <simona@ffwll.ch>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/tidss: Decouple max_pclk from tidss feats to remove clock dependency
Date: Wed, 18 Jun 2025 14:19:39 +0530 [thread overview]
Message-ID: <0d72844f-fdc3-4fcb-8590-ee8512179d8f@ti.com> (raw)
In-Reply-To: <20250618-groovy-stereotyped-aardwolf-27bb40@houat>
Hello Maxime,
On 18/06/25 14:02, Maxime Ripard wrote:
> Hi,
>
> On Wed, Jun 18, 2025 at 01:28:04PM +0530, Jayesh Choudhary wrote:
>> TIDSS hardware by itself does not have variable max_pclk for each VP.
>> Each VP supports a fixed maximum pixel clock. K2 devices and AM62*
>> devices uses "ultra-light" version where each VP supports a max of
>> 300MHz whereas J7* devices uses TIDSS where all VP can support a
>> max pclk of 600MHz.
>> The limitation that has been modeled till now comes from the clock
>> (PLL can only be programmed to a particular max value). Due to this
>> we end up using different compatible for each SoC when the clocking
>> architecture changes for VPs, even when the hardware is essentially
>> the same.
>> max_pclk cannot be entirely removed since the display controller
>> should tell if a particular mode clock can be supported or not in crtc's
>> "mode_valid()" call. So remove "max_pclk_khz" from the static display
>> feat and add it to "tidss_device" structure which would be modified in
>> runtime. In mode_valid() call, check if a best frequency match for mode
>> clock can be found or not using "clk_round_rate()". Based on that,
>> propagate "max_pclk" and check max_clk again only if the requested mode
>> clock is greater than saved value. (As the preferred display mode is
>> usually the max resolution, driver ends up checking the maximum clock
>> the first time itself which is used in subsequent checks)
>> Since TIDSS display controller provides clock tolerance of 5%, we use
>> this while checking the max_pclk. Also, move up "dispc_pclk_diff()"
>> before it is called.
>>
>> This will make the existing compatibles reusable.
>>
>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>
> We've generally used 0.5% in drivers with similar requirements, because
> that's what VESA requires for some mode generation techniques (and
> what's required by HDMI too iirc).
>
> We've never had to revisit it on any driver afaik, so unless you have a
> specific reason to do so, I'd really prefer if you stuck with that as
> well.
I agree with 0.5% but I was just trying to keep it in sync with existing
tidss tolerance.
In tidss_crtc.c when we set the clk rate in crtc_atomic_enable() using
dispc_vp_set_clk_rate(), we are giving it 5% tolerance:
https://web.git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/gpu/drm/tidss/tidss_dispc.c#n1446
So I kept it 5%.
Warm Regards,
Jayesh
>
> Maxime
next prev parent reply other threads:[~2025-06-18 8:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 7:58 Jayesh Choudhary
2025-06-18 8:32 ` Maxime Ripard
2025-06-18 8:49 ` Jayesh Choudhary [this message]
2025-06-18 9:22 ` Jayesh Choudhary
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=0d72844f-fdc3-4fcb-8590-ee8512179d8f@ti.com \
--to=j-choudhary@ti.com \
--cc=airlied@gmail.com \
--cc=devarsht@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jyri.sarha@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®