From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Swamil Jain <s-jain1@ti.com>
Cc: 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,
jyri.sarha@iki.fi, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
simona@ffwll.ch, aradhya.bhatia@linux.dev
Subject: Re: [PATCH v6 3/3] drm/tidss: oldi: Add atomic_check hook for oldi bridge
Date: Tue, 16 Sep 2025 14:58:56 +0300 [thread overview]
Message-ID: <b82accff-d43d-4cac-a97a-764d0b31501c@ideasonboard.com> (raw)
In-Reply-To: <20250911110715.2873596-4-s-jain1@ti.com>
Hi,
On 11/09/2025 14:07, 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.
Please explain here a bit more what's going on here. You say
mode_valid() cannot be done in tidss. Why not? Then you add atomic_check
to oldi driver here, why is that the same as model_valid in tidss?
> Fixes: 7246e0929945 ("drm/tidss: Add OLDI bridge support")
What bug does this fix?
> 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;
> +}
> +
> static const struct drm_bridge_funcs tidss_oldi_bridge_funcs = {
> .attach = tidss_oldi_bridge_attach,
> .atomic_pre_enable = tidss_oldi_atomic_pre_enable,
> @@ -317,6 +337,7 @@ static const struct drm_bridge_funcs tidss_oldi_bridge_funcs = {
> .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
> .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
> .atomic_reset = drm_atomic_helper_bridge_reset,
> + .atomic_check = tidss_oldi_atomic_check,
> };
>
> static int get_oldi_mode(struct device_node *oldi_tx, int *companion_instance)
prev parent reply other threads:[~2025-09-16 11:59 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
2025-09-15 10:17 ` Tomi Valkeinen
2025-09-15 12:24 ` Maxime Ripard
2025-09-16 11:58 ` Tomi Valkeinen [this message]
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=b82accff-d43d-4cac-a97a-764d0b31501c@ideasonboard.com \
--to=tomi.valkeinen@ideasonboard.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=s-jain1@ti.com \
--cc=simona@ffwll.ch \
--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
all inboxes | Powered by JetHome®