drm/bridge:anx7625: Update HDCP status at atomic_disable()
Subsystems (3)
PATCH 1/1 drm/bridge:anx7625: Update HDCP status at atomic_disable()
Update HDCP content_protection to DRM_MODE_CONTENT_PROTECTION_UNDESIRED in bridge .atomic_disable().
--- drivers/gpu/drm/bridge/analogix/anx7625.c | 25 ++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
drivers/gpu/drm/bridge/analogix/anx7625.c +20 -5
@@ -861,6 +861,22 @@ static int anx7625_hdcp_disable(struct anx7625_data *ctx) TX_HDCP_CTRL0, ~HARD_AUTH_EN & 0xFF); } +static void anx7625_hdcp_disable_and_update_cp (struct anx7625_data *ctx) +{ +struct device *dev = ctx->dev; + +if (!ctx->connector) +return ; + +anx7625_hdcp_disable (ctx); + + ctx->hdcp_cp =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; +drm_hdcp_update_content_protection (ctx->connector, + ctx->hdcp_cp); + +dev_dbg (dev,"update CP to UNDESIRE\n" ); +} +static int anx7625_hdcp_enable (struct anx7625_data *ctx) {u8 bcap;
@@ -2165,11 +2181,8 @@ static int anx7625_connector_atomic_check(struct anx7625_data *ctx,dev_err (dev,"current CP is not ENABLED\n" );return -EINVAL ; } -anx7625_hdcp_disable (ctx); - ctx->hdcp_cp =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; -drm_hdcp_update_content_protection (ctx->connector, - ctx->hdcp_cp); -dev_dbg (dev,"update CP to UNDESIRE\n" ); + +anx7625_hdcp_disable_and_update_cp (ctx); }if (cp ==DRM_MODE_CONTENT_PROTECTION_ENABLED ) {
@@ -2449,6 +2462,8 @@ static void anx7625_bridge_atomic_disable(struct drm_bridge *bridge,dev_dbg (dev,"drm atomic disable\n" ); +anx7625_hdcp_disable_and_update_cp (ctx); + ctx->connector =NULL ;anx7625_dp_stop (ctx);
Signature · 1 line
2.25.1
Quoted 5 lines · Xin Ji
Update HDCP
content_protectiontoDRM_MODE_CONTENT_PROTECTION_UNDESIREDin bridge .atomic_disable().Signed-off-by Xin Ji <[email protected]>
Quoted 54 lines
--- drivers/gpu/drm/bridge/analogix/anx7625.c | 25 ++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)drivers/gpu/drm/bridge/analogix/anx7625.c +20
-5@@ -861,6 +861,22 @@ static int anx7625_hdcp_disable(struct anx7625_data *ctx) TX_HDCP_CTRL0, ~HARD_AUTH_EN & 0xFF); } +static void anx7625_hdcp_disable_and_update_cp (struct anx7625_data *ctx) +{ +struct device *dev = ctx->dev; + +if (!ctx->connector) +return ; + +anx7625_hdcp_disable (ctx); + + ctx->hdcp_cp =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; +drm_hdcp_update_content_protection (ctx->connector, + ctx->hdcp_cp); + +dev_dbg (dev,"update CP to UNDESIRE\n" ); +} +static int anx7625_hdcp_enable (struct anx7625_data *ctx) {u8 bcap;@@ -2165,11 +2181,8 @@ static int anx7625_connector_atomic_check(struct anx7625_data *ctx,dev_err (dev,"current CP is not ENABLED\n" );return -EINVAL ; } -anx7625_hdcp_disable (ctx); - ctx->hdcp_cp =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; -drm_hdcp_update_content_protection (ctx->connector, - ctx->hdcp_cp); -dev_dbg (dev,"update CP to UNDESIRE\n" ); + +anx7625_hdcp_disable_and_update_cp (ctx); }if (cp ==DRM_MODE_CONTENT_PROTECTION_ENABLED ) {@@ -2449,6 +2462,8 @@ static void anx7625_bridge_atomic_disable(struct drm_bridge *bridge,dev_dbg (dev,"drm atomic disable\n" ); +anx7625_hdcp_disable_and_update_cp (ctx); + ctx->connector =NULL ;anx7625_dp_stop (ctx);
Quoted 2 lines · Xin Ji
Update HDCP
content_protectiontoDRM_MODE_CONTENT_PROTECTION_UNDESIREDin bridge .atomic_disable().
PLease describe why, not what.
Quoted 59 lines
Signed-off-by Xin Ji <[email protected]>--- drivers/gpu/drm/bridge/analogix/anx7625.c | 25 ++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)drivers/gpu/drm/bridge/analogix/anx7625.c +20
-5@@ -861,6 +861,22 @@ static int anx7625_hdcp_disable(struct anx7625_data *ctx) TX_HDCP_CTRL0, ~HARD_AUTH_EN & 0xFF); } +static void anx7625_hdcp_disable_and_update_cp (struct anx7625_data *ctx) +{ +struct device *dev = ctx->dev; + +if (!ctx->connector) +return ; + +anx7625_hdcp_disable (ctx); + + ctx->hdcp_cp =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; +drm_hdcp_update_content_protection (ctx->connector, + ctx->hdcp_cp); + +dev_dbg (dev,"update CP to UNDESIRE\n" ); +} +static int anx7625_hdcp_enable (struct anx7625_data *ctx) {u8 bcap;@@ -2165,11 +2181,8 @@ static int anx7625_connector_atomic_check(struct anx7625_data *ctx,dev_err (dev,"current CP is not ENABLED\n" );return -EINVAL ; } -anx7625_hdcp_disable (ctx); - ctx->hdcp_cp =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; -drm_hdcp_update_content_protection (ctx->connector, - ctx->hdcp_cp); -dev_dbg (dev,"update CP to UNDESIRE\n" ); + +anx7625_hdcp_disable_and_update_cp (ctx); }if (cp ==DRM_MODE_CONTENT_PROTECTION_ENABLED ) {@@ -2449,6 +2462,8 @@ static void anx7625_bridge_atomic_disable(struct drm_bridge *bridge,dev_dbg (dev,"drm atomic disable\n" ); +anx7625_hdcp_disable_and_update_cp (ctx); + ctx->connector =NULL ;anx7625_dp_stop (ctx);Signature · 1 line
2.25.1
Signature · 2 lines
With best wishes Dmitry
Quoted 24 lines
-----Original Message-----
From: Dmitry Baryshkov <[email protected]>
Sent: Saturday, November 30, 2024 4:56 PM
To: Xin Ji <[email protected]>
Cc: Andrzej Hajda <[email protected]>; Neil Armstrong <[email protected]>; Robert Foss <[email protected]>; Laurent Pinchart <[email protected]>; Jonas Karlman <[email protected]>; Jernej Skrabec <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; Bernie Liang <[email protected]>; Qilin Wen <[email protected]>; [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH] drm/bridge:anx7625: Update HDCP status atatomic_disable()CAUTION: This email originated from outside of the organization. Please do not click links or open attachments unless you recognize the sender, and know the content is safe.
Quoted 6 lines
Quoted 3 lines · Xin Ji
Update HDCP
content_protectiontoDRM_MODE_CONTENT_PROTECTION_UNDESIRED
in bridge .atomic_disable().PLease describe why, not what.
Hi Dmitry Baryshkov, OK, I'll add more describe, thanks!
Quoted 67 lines
drivers/gpu/drm/bridge/analogix/anx7625.c static int anx7625_hdcp_disable(struct anx7625_data
Quoted 14 lines
Signed-off-by Xin Ji <[email protected]>--- drivers/gpu/drm/bridge/analogix/anx7625.c | 25 ++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)drivers/gpu/drm/bridge/analogix/anx7625.c +0
-0@@ -861,6 +861,22 @@ static int anx7625_hdcp_disable(struct anx7625_data*ctx)
drivers/gpu/drm/bridge/analogix/anx7625.c static int anx7625_connector_atomic_check(struct
Quoted 21 lines
drivers/gpu/drm/bridge/analogix/anx7625.c +15
-0TX_HDCP_CTRL0, ~HARD_AUTH_EN & 0xFF); } +static void anx7625_hdcp_disable_and_update_cp (struct anx7625_data +*ctx) { +struct device *dev = ctx->dev; + +if (!ctx->connector) +return ; + +anx7625_hdcp_disable (ctx); + + ctx->hdcp_cp =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; +drm_hdcp_update_content_protection (ctx->connector, + ctx->hdcp_cp); + +dev_dbg (dev,"update CP to UNDESIRE\n" ); } +static int anx7625_hdcp_enable (struct anx7625_data *ctx) {u8 bcap;@@ -2165,11 +2181,8 @@ static int anx7625_connector_atomic_check(struct
anx7625_data*ctx,Quoted 24 lines
drivers/gpu/drm/bridge/analogix/anx7625.c +3
-5dev_err (dev,"current CP is not ENABLED\n" );return -EINVAL ; } -anx7625_hdcp_disable (ctx); - ctx->hdcp_cp =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; -drm_hdcp_update_content_protection (ctx->connector, - ctx->hdcp_cp); -dev_dbg (dev,"update CP to UNDESIRE\n" ); + +anx7625_hdcp_disable_and_update_cp (ctx); } if (cp == DRM_MODE_CONTENT_PROTECTION_ENABLED) { @@ -2449,6 +2462,8 @@ static void anx7625_bridge_atomic_disable(struct drm_bridge*bridge,
dev_dbg(dev, "drm atomic disable\n");drivers/gpu/drm/bridge/analogix/anx7625.c +2
-1+anx7625_hdcp_disable_and_update_cp (ctx); + ctx->connector =NULL ;anx7625_dp_stop (ctx); --Quoted 2 lines
2.25.1
--
With best wishes
Dmitry