[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0fdcd88c-7940-45f4-98e1-39ad84f63389@ti.com>
Date: Mon, 24 Nov 2025 17:16:32 +0530
From: Harikrishna shenoy <h-shenoy@...com>
To: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
CC: <Laurent.pinchart@...asonboard.com>, <airlied@...il.com>,
<andrzej.hajda@...el.com>, <andy.yan@...k-chips.com>,
<aradhya.bhatia@...ux.dev>, <devarsht@...com>, <dianders@...omium.org>,
<dri-devel@...ts.freedesktop.org>, <javierm@...hat.com>,
<jernej.skrabec@...il.com>, <jonas@...boo.se>,
<linux-kernel@...r.kernel.org>, <linux@...blig.org>,
<luca.ceresoli@...tlin.com>, <lumag@...nel.org>, <lyude@...hat.com>,
<maarten.lankhorst@...ux.intel.com>, <mordan@...ras.ru>,
<mripard@...nel.org>, <neil.armstrong@...aro.org>, <rfoss@...nel.org>,
<s-jain1@...com>, <simona@...ll.ch>, <tzimmermann@...e.de>, <u-kumar1@...com>
Subject: Re: [PATCH RESEND v9 3/6] drm/bridge: cadence: cdns-mhdp8546-core:
Handle HDCP state in bridge atomic check
On 21/11/25 18:16, Tomi Valkeinen wrote:
> Hi,
>
> On 20/11/2025 14:14, Harikrishna Shenoy wrote:
>> Now that we have DRM_BRIDGE_ATTACH_NO_CONNECTOR framework, handle the
>> HDCP state change inbridge atomic check as well to enable correct
>
> "in bridge's"
>
>> functioning for HDCP in both DRM_BRIDGE_ATTACH_NO_CONNECTOR and
>> !DRM_BRIDGE_ATTACH_NO_CONNECTOR case.
>
> Same thing here. What is the issue? What behavior do you see without
> this patch?
>
> Tomi
>
Hi Tomi,
This patch update the HDCP state in bridge hooks, as connector hooks
are not used with DBANC, so essentially helps correct functioning of
HDCP by updating its state.
Regards.
>> Fixes: 6a3608eae6d33 ("drm: bridge: cdns-mhdp8546: Enable HDCP")
>> Signed-off-by: Harikrishna Shenoy <h-shenoy@...com>
>> ---
>> .../drm/bridge/cadence/cdns-mhdp8546-core.c | 23 +++++++++++++++++++
>> 1 file changed, 23 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>> index 7178a01e4d4d8..d944095da4722 100644
>> --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>> +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>> @@ -2123,6 +2123,10 @@ static int cdns_mhdp_atomic_check(struct drm_bridge *bridge,
>> {
>> struct cdns_mhdp_device *mhdp = bridge_to_mhdp(bridge);
>> const struct drm_display_mode *mode = &crtc_state->adjusted_mode;
>> + struct drm_connector_state *old_state, *new_state;
>> + struct drm_atomic_state *state = crtc_state->state;
>> + struct drm_connector *conn = mhdp->connector_ptr;
>> + u64 old_cp, new_cp;
>>
>> mutex_lock(&mhdp->link_mutex);
>>
>> @@ -2142,6 +2146,25 @@ static int cdns_mhdp_atomic_check(struct drm_bridge *bridge,
>> if (mhdp->info)
>> bridge_state->input_bus_cfg.flags = *mhdp->info->input_bus_flags;
>>
>> + if (conn && mhdp->hdcp_supported) {
>> + old_state = drm_atomic_get_old_connector_state(state, conn);
>> + new_state = drm_atomic_get_new_connector_state(state, conn);
>> + old_cp = old_state->content_protection;
>> + new_cp = new_state->content_protection;
>> +
>> + if (old_state->hdcp_content_type != new_state->hdcp_content_type &&
>> + new_cp != DRM_MODE_CONTENT_PROTECTION_UNDESIRED) {
>> + new_state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED;
>> + crtc_state = drm_atomic_get_new_crtc_state(state, new_state->crtc);
>> + crtc_state->mode_changed = true;
>> + }
>> +
>> + if (!new_state->crtc) {
>> + if (old_cp == DRM_MODE_CONTENT_PROTECTION_ENABLED)
>> + new_state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED;
>> + }
>> + }
>> +
>> mutex_unlock(&mhdp->link_mutex);
>> return 0;
>> }
>
Powered by blists - more mailing lists