From: Maxime Ripard <mripard@kernel.org>
To: Jayesh Choudhary <j-choudhary@ti.com>
Cc: linux-kernel@vger.kernel.org, dmitry.baryshkov@linaro.org,
andrzej.hajda@intel.com, neil.armstrong@linaro.org,
rfoss@kernel.org, Laurent.pinchart@ideasonboard.com,
sam@ravnborg.org, jonas@kwiboo.se, jernej.skrabec@gmail.com,
maarten.lankhorst@linux.intel.com, tzimmermann@suse.de,
airlied@gmail.com, daniel@ffwll.ch, a-bhatia1@ti.com,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 2/2] drm/bridge: Add pixel clock check in atomic_check
Date: Thu, 30 May 2024 11:34:24 +0200 [thread overview]
Message-ID: <20240530-spiked-psychedelic-monkey-ddd0b0@houat> (raw)
In-Reply-To: <20240530092930.434026-3-j-choudhary@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]
Hi,
On Thu, May 30, 2024 at 02:59:30PM GMT, Jayesh Choudhary wrote:
> Check the pixel clock for the mode in atomic_check and ensure that
> it is within the range supported by the bridge.
>
> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index 6a6055a4ccf9..1bf2f14a772d 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -494,6 +494,12 @@ static int sii902x_bridge_atomic_check(struct drm_bridge *bridge,
> struct drm_crtc_state *crtc_state,
> struct drm_connector_state *conn_state)
> {
> + if (crtc_state->mode.clock < SII902X_MIN_PIXEL_CLOCK_KHZ)
> + return MODE_CLOCK_LOW;
> +
> + if (crtc_state->mode.clock > SII902X_MAX_PIXEL_CLOCK_KHZ)
> + return MODE_CLOCK_HIGH;
> +
atomic_check doesn't return drm_mode_status but regular error codes (0
on success, negative error code on failure)
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2024-05-30 9:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 9:29 [PATCH v4 0/2] Add mode_valid and atomic_check hooks for sii902x bridge Jayesh Choudhary
2024-05-30 9:29 ` [PATCH v4 1/2] drm/bridge: sii902x: Fix mode_valid hook Jayesh Choudhary
2024-05-30 23:30 ` Dmitry Baryshkov
2024-05-31 13:20 ` [v4,1/2] " Sui Jingfeng
2024-05-31 13:33 ` Sam Ravnborg
2024-05-31 14:04 ` Sui Jingfeng
2024-06-12 5:21 ` Jayesh Choudhary
2024-05-30 9:29 ` [PATCH v4 2/2] drm/bridge: Add pixel clock check in atomic_check Jayesh Choudhary
2024-05-30 9:34 ` Maxime Ripard [this message]
2024-05-30 9:50 ` Jayesh Choudhary
2024-05-31 12:55 ` [PATCH v4 0/2] Add mode_valid and atomic_check hooks for sii902x bridge Sui Jingfeng
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=20240530-spiked-psychedelic-monkey-ddd0b0@houat \
--to=mripard@kernel.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a-bhatia1@ti.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=j-choudhary@ti.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=sam@ravnborg.org \
--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 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.