From: Jayesh Choudhary <j-choudhary@ti.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <linux-kernel@vger.kernel.org>, <andrzej.hajda@intel.com>,
<neil.armstrong@linaro.org>, <rfoss@kernel.org>,
<Laurent.pinchart@ideasonboard.com>, <sam@ravnborg.org>,
<mripard@kernel.org>, <dri-devel@lists.freedesktop.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>
Subject: Re: [PATCH v3 1/2] drm/bridge: sii902x: Fix mode_valid hook
Date: Fri, 24 May 2024 17:54:02 +0530 [thread overview]
Message-ID: <4cd64cf5-d2b0-4aa9-b958-6b6fc54f0bf2@ti.com> (raw)
In-Reply-To: <y6ersd72tp2d6k4i2hja7bg37lahnvye2qion67urxeakw6rju@dher7oomt2ks>
Hello Dmitry,
On 24/05/24 15:11, Dmitry Baryshkov wrote:
> On Fri, May 24, 2024 at 03:05:08PM +0530, Jayesh Choudhary wrote:
>> Currently, mode_valid hook returns all mode as valid and it is
>> defined only in drm_connector_helper_funcs. With the introduction of
>> 'DRM_BRIDGE_ATTACH_NO_CONNECTOR', connector is not initialized in
>> bridge_attach call for cases when the encoder has this flag enabled.
>> So add the mode_valid hook in drm_bridge_funcs as well with proper
>> clock checks for maximum and minimum pixel clock supported by the
>> bridge.
>>
>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
[...]
>> +
>> static enum drm_mode_status sii902x_mode_valid(struct drm_connector *connector,
>> struct drm_display_mode *mode)
>> {
>> - /* TODO: check mode */
>> + struct sii902x *sii902x = connector_to_sii902x(connector);
>> + const struct drm_display_mode *mod = mode;
>>
>> - return MODE_OK;
>> + return sii902x_validate(sii902x, mod);
>
> There is no need to. The drm_bridge_chain_mode_valid() should take care
> of calling bridge's mode_valid callback and rejecting the mode if it is
> not accepted.
I need some clarity here.
IIRC, if the bridge does initialize the connector in case
where the encoder does not attach the bridge with the
DRM_BRIDGE_ATTACH_NO_CONNECTOR (DBANC) flag (referring to tidss
encoder before we implemented the DBANC feature), then
drm_connector_helper_func are called and drm_bridge_funcs
are NOT called (atleast from what I have seen in detect
hook for cdns-mhdp-8546 driver which is there in both
structures).
I do not have any platform to test non-DBANC encoders.
And I did not want to break any platform that were still using
bridge_attach without DBANC flag.
That is why I kept mode_valid hook in both structures.
Are you implying that if connector_helper_funcs are not there
then there will be some sort of fallback to bridge_funcs instead
of passthrough for mode_valid check? Because that goes against my
previous observations.
Thanks,
Jayesh
next prev parent reply other threads:[~2024-05-24 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 9:35 [PATCH v3 0/2] Add mode_valid hook for sii902x bridge Jayesh Choudhary
2024-05-24 9:35 ` [PATCH v3 1/2] drm/bridge: sii902x: Fix mode_valid hook Jayesh Choudhary
2024-05-24 9:41 ` Dmitry Baryshkov
2024-05-24 12:24 ` Jayesh Choudhary [this message]
2024-05-24 19:46 ` Dmitry Baryshkov
2024-05-27 7:23 ` Jayesh Choudhary
2024-05-24 9:35 ` [PATCH v3 2/2] drm/bridge: Add pixel clock check in atomic_check 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=4cd64cf5-d2b0-4aa9-b958-6b6fc54f0bf2@ti.com \
--to=j-choudhary@ti.com \
--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=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--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 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®