From: Swamil Jain <s-jain1@ti.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: <jyri.sarha@iki.fi>, <tomi.valkeinen@ideasonboard.com>,
<maarten.lankhorst@linux.intel.com>, <tzimmermann@suse.de>,
<airlied@gmail.com>, <simona@ffwll.ch>,
<aradhya.bhatia@linux.dev>, <h-shenoy@ti.com>, <devarsht@ti.com>,
<vigneshr@ti.com>, <praneeth@ti.com>, <u-kumar1@ti.com>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 3/3] drm/tidss: oldi: Add atomic_check hook for oldi bridge
Date: Mon, 15 Sep 2025 14:25:27 +0530 [thread overview]
Message-ID: <4f0a00d9-4edc-4114-aca6-70d6bb654767@ti.com> (raw)
In-Reply-To: <20250915-benevolent-military-penguin-d64871@penduick>
Hi,
On 9/15/25 13:27, Maxime Ripard wrote:
> On Thu, Sep 11, 2025 at 04:37:15PM +0530, Swamil Jain wrote:
>> From: Jayesh Choudhary <j-choudhary@ti.com>
>>
>> Since OLDI consumes DSS VP clock directly as serial clock, mode_valid()
>> check cannot be performed in tidss driver which should be checked
>> in OLDI driver.
>>
>> Fixes: 7246e0929945 ("drm/tidss: Add OLDI bridge support")
>> Tested-by: Michael Walle <mwalle@kernel.org>
>> Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>> Signed-off-by: Swamil Jain <s-jain1@ti.com>
>> ---
>> drivers/gpu/drm/tidss/tidss_oldi.c | 21 +++++++++++++++++++++
>> 1 file changed, 21 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/tidss/tidss_oldi.c b/drivers/gpu/drm/tidss/tidss_oldi.c
>> index 7ecbb2c3d0a2..ada691839ef3 100644
>> --- a/drivers/gpu/drm/tidss/tidss_oldi.c
>> +++ b/drivers/gpu/drm/tidss/tidss_oldi.c
>> @@ -309,6 +309,26 @@ static u32 *tidss_oldi_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
>> return input_fmts;
>> }
>>
>> +static int tidss_oldi_atomic_check(struct drm_bridge *bridge,
>> + struct drm_bridge_state *bridge_state,
>> + struct drm_crtc_state *crtc_state,
>> + struct drm_connector_state *conn_state)
>> +{
>> + struct tidss_oldi *oldi = drm_bridge_to_tidss_oldi(bridge);
>> + struct drm_display_mode *adjusted_mode;
>> + unsigned long round_clock;
>> +
>> + adjusted_mode = &crtc_state->adjusted_mode;
>> + round_clock = clk_round_rate(oldi->serial, adjusted_mode->clock * 7 * 1000);
>> + /*
>> + * To keep the check consistent with dispc_vp_set_clk_rate(),
>> + * we use the same 5% check here.
>> + */
>> + if (dispc_pclk_diff(adjusted_mode->clock * 7 * 1000, round_clock) > 5)
>> + return -EINVAL;
>> + return 0;
>> +}
>> +
>
> If you're introducing that check to tidss, please use .5% like everyone
> else. I understand that you don't want to change tilcdc to avoid any
> regression, but that's not the case here
>
This is just to make the tolerance check consistent for mode validation
and setting clock rate. This patch isn't introducing anything new, we
are following this as dispc_vp_set_clk_rate() and
tidss_oldi_set_serial_clk() are already checking for 5% tolerance while
setting clock. To remove/modify, this needs extensive testing with other
K3 and K2G SoCs and can be handled as a separate patch.
Regards,
Swamil
> Maxime
next prev parent reply other threads:[~2025-09-15 8:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 11:07 [PATCH v6 0/3] Decouple max_pclk check from constant display feats Swamil Jain
2025-09-11 11:07 ` [PATCH v6 1/3] drm/tidss: oldi: Add property to identify OLDI supported VP Swamil Jain
2025-09-16 11:40 ` Tomi Valkeinen
2025-09-17 13:32 ` Swamil Jain
2025-09-17 13:48 ` Tomi Valkeinen
2025-09-11 11:07 ` [PATCH v6 2/3] drm/tidss: Remove max_pclk_khz from tidss display features: Swamil Jain
2025-09-16 11:53 ` Tomi Valkeinen
2025-09-16 11:55 ` Tomi Valkeinen
2025-09-11 11:07 ` [PATCH v6 3/3] drm/tidss: oldi: Add atomic_check hook for oldi bridge Swamil Jain
2025-09-15 7:57 ` Maxime Ripard
2025-09-15 8:55 ` Swamil Jain [this message]
2025-09-15 10:17 ` Tomi Valkeinen
2025-09-15 12:24 ` Maxime Ripard
2025-09-16 11:58 ` Tomi Valkeinen
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=4f0a00d9-4edc-4114-aca6-70d6bb654767@ti.com \
--to=s-jain1@ti.com \
--cc=airlied@gmail.com \
--cc=aradhya.bhatia@linux.dev \
--cc=devarsht@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=h-shenoy@ti.com \
--cc=jyri.sarha@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=praneeth@ti.com \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
--cc=u-kumar1@ti.com \
--cc=vigneshr@ti.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