From: Harikrishna shenoy <h-shenoy@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: <Laurent.pinchart@ideasonboard.com>, <airlied@gmail.com>,
<andrzej.hajda@intel.com>, <andy.yan@rock-chips.com>,
<aradhya.bhatia@linux.dev>, <devarsht@ti.com>,
<dianders@chromium.org>, <dri-devel@lists.freedesktop.org>,
<javierm@redhat.com>, <jernej.skrabec@gmail.com>,
<jonas@kwiboo.se>, <linux-kernel@vger.kernel.org>,
<linux@treblig.org>, <luca.ceresoli@bootlin.com>,
<lumag@kernel.org>, <lyude@redhat.com>,
<maarten.lankhorst@linux.intel.com>, <mordan@ispras.ru>,
<mripard@kernel.org>, <neil.armstrong@linaro.org>,
<rfoss@kernel.org>, <s-jain1@ti.com>, <simona@ffwll.ch>,
<tzimmermann@suse.de>, <u-kumar1@ti.com>
Subject: Re: [PATCH RESEND v9 2/6] drm/bridge: cadence: cdns-mhdp8546-core: Add mode_valid hook to drm_bridge_funcs
Date: Mon, 24 Nov 2025 15:00:46 +0530 [thread overview]
Message-ID: <1863b264-98fe-42c6-ba0a-c9e1ba74774b@ti.com> (raw)
In-Reply-To: <8c97c5e9-7705-4368-a3a9-45e209582c3f@ideasonboard.com>
On 21/11/25 18:13, Tomi Valkeinen wrote:
> Hi,
>
> On 20/11/2025 14:14, Harikrishna Shenoy wrote:
>> From: Jayesh Choudhary <j-choudhary@ti.com>
>>
>> Add cdns_mhdp_bridge_mode_valid() to check if specific mode is valid for
>> this bridge or not. In the legacy usecase with
>> !DRM_BRIDGE_ATTACH_NO_CONNECTOR we were using the hook from
>> drm_connector_helper_funcs but with DRM_BRIDGE_ATTACH_NO_CONNECTOR
>> we need to have mode_valid() in drm_bridge_funcs.
>
> This looks fine, but a fix should always explain what the issue is. What
> is the behavior without this patch, if DRM_BRIDGE_ATTACH_NO_CONNECTOR is
> set?
>
> Tomi
Hi Tomi,
Without this patch some modes which should get rejected based on
bandwidth requirement will not be rejected as mode check/validation will
not hit 'cdns_mhdp_bandwidth_ok'as with DRM_BRIDGE_ATTACH_NO_CONNECTOR
flag set we use hooks from drm_bridge_funcs.
will include this in commit message.
Regards,
Hari
>
>> Fixes: c932ced6b585 ("drm/tidss: Update encoder/bridge chain connect model")
>> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
>> Signed-off-by: Harikrishna Shenoy <h-shenoy@ti.com>
>> ---
>> .../drm/bridge/cadence/cdns-mhdp8546-core.c | 20 +++++++++++++++++++
>> 1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>> index f3076e9cdabbe..7178a01e4d4d8 100644
>> --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>> +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>> @@ -2162,6 +2162,25 @@ static const struct drm_edid *cdns_mhdp_bridge_edid_read(struct drm_bridge *brid
>> return cdns_mhdp_edid_read(mhdp, connector);
>> }
>>
>> +static enum drm_mode_status
>> +cdns_mhdp_bridge_mode_valid(struct drm_bridge *bridge,
>> + const struct drm_display_info *info,
>> + const struct drm_display_mode *mode)
>> +{
>> + struct cdns_mhdp_device *mhdp = bridge_to_mhdp(bridge);
>> +
>> + mutex_lock(&mhdp->link_mutex);
>> +
>> + if (!cdns_mhdp_bandwidth_ok(mhdp, mode, mhdp->link.num_lanes,
>> + mhdp->link.rate)) {
>> + mutex_unlock(&mhdp->link_mutex);
>> + return MODE_CLOCK_HIGH;
>> + }
>> +
>> + mutex_unlock(&mhdp->link_mutex);
>> + return MODE_OK;
>> +}
>> +
>> static const struct drm_bridge_funcs cdns_mhdp_bridge_funcs = {
>> .atomic_enable = cdns_mhdp_atomic_enable,
>> .atomic_disable = cdns_mhdp_atomic_disable,
>> @@ -2176,6 +2195,7 @@ static const struct drm_bridge_funcs cdns_mhdp_bridge_funcs = {
>> .edid_read = cdns_mhdp_bridge_edid_read,
>> .hpd_enable = cdns_mhdp_bridge_hpd_enable,
>> .hpd_disable = cdns_mhdp_bridge_hpd_disable,
>> + .mode_valid = cdns_mhdp_bridge_mode_valid,
>> };
>>
>> static bool cdns_mhdp_detect_hpd(struct cdns_mhdp_device *mhdp, bool *hpd_pulse)
>
next prev parent reply other threads:[~2025-11-24 9:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 12:14 [PATCH RESEND v9 0/6] MHDP8546 fixes related to DRM_BRIDGE_ATTACH_NO_CONNECTOR usecase Harikrishna Shenoy
2025-11-20 12:14 ` [PATCH RESEND v9 1/6] drm/bridge: cadence: cdns-mhdp8546-core: Set the mhdp connector earlier in atomic_enable() Harikrishna Shenoy
2025-11-21 12:41 ` Tomi Valkeinen
2025-11-24 11:34 ` Harikrishna shenoy
2025-11-21 13:12 ` Tomi Valkeinen
2025-11-24 11:44 ` Harikrishna shenoy
2025-11-20 12:14 ` [PATCH RESEND v9 2/6] drm/bridge: cadence: cdns-mhdp8546-core: Add mode_valid hook to drm_bridge_funcs Harikrishna Shenoy
2025-11-21 12:43 ` Tomi Valkeinen
2025-11-24 9:30 ` Harikrishna shenoy [this message]
2025-11-20 12:14 ` [PATCH RESEND v9 3/6] drm/bridge: cadence: cdns-mhdp8546-core: Handle HDCP state in bridge atomic check Harikrishna Shenoy
2025-11-21 12:46 ` Tomi Valkeinen
2025-11-24 11:46 ` Harikrishna shenoy
2025-11-20 12:14 ` [PATCH RESEND v9 4/6] drm/bridge: cadence: cdns-mhdp8546-core: Remove legacy support for connector initialisation in bridge Harikrishna Shenoy
2025-11-21 13:21 ` Tomi Valkeinen
2025-11-20 12:14 ` [PATCH RESEND v9 5/6] cadence: cdns-mhdp8546*: Change drm_connector from structure to pointer Harikrishna Shenoy
2025-11-21 12:02 ` Tomi Valkeinen
2025-11-21 12:11 ` Harikrishna shenoy
2025-11-20 12:14 ` [PATCH RESEND v9 6/6] drm/bridge: cadence: cdns-mhdp8546-core: Reduce log level for DPCD read/write Harikrishna Shenoy
2025-11-21 12:07 ` [PATCH RESEND v9 0/6] MHDP8546 fixes related to DRM_BRIDGE_ATTACH_NO_CONNECTOR usecase Tomi Valkeinen
2025-11-24 9:57 ` Harikrishna shenoy
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=1863b264-98fe-42c6-ba0a-c9e1ba74774b@ti.com \
--to=h-shenoy@ti.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=aradhya.bhatia@linux.dev \
--cc=devarsht@ti.com \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@treblig.org \
--cc=luca.ceresoli@bootlin.com \
--cc=lumag@kernel.org \
--cc=lyude@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mordan@ispras.ru \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=s-jain1@ti.com \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
--cc=u-kumar1@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®