aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Kandpal <[email protected]>2024-02-23 13:44:44 +0530
committerAnkit Nautiyal <[email protected]>2024-02-26 11:18:12 +0530
commit55d9b2b8e44033f6ba6069de2b44d1cfbc2e0081 (patch)
tree3635dba2fddf3489e1a433550f62eccbfcf32c53
parent26f7d01ca7c2bc01b1ad2e9fd73bfab23d9d6944 (diff)
drm/i915/hdcp: Refactor intel_dp_hdcp2_capable
Break intel_dp_hdcp2_capable so that the common the code can be reused for the remote capability check. Signed-off-by: Suraj Kandpal <[email protected]> Reviewed-by: Ankit Nautiyal <[email protected]> Signed-off-by: Ankit Nautiyal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/i915/display/intel_dp_hdcp.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
index 92642e8d82db..6767b5338ae7 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
@@ -640,11 +640,9 @@ int intel_dp_hdcp2_check_link(struct intel_digital_port *dig_port,
}
static
-int intel_dp_hdcp2_capable(struct intel_connector *connector,
- bool *capable)
+int _intel_dp_hdcp2_capable(struct drm_dp_aux *aux,
+ bool *capable)
{
- struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
- struct drm_dp_aux *aux = &dig_port->dp.aux;
u8 rx_caps[3];
int ret;
@@ -662,6 +660,16 @@ int intel_dp_hdcp2_capable(struct intel_connector *connector,
return 0;
}
+static
+int intel_dp_hdcp2_capable(struct intel_connector *connector,
+ bool *capable)
+{
+ struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
+ struct drm_dp_aux *aux = &dig_port->dp.aux;
+
+ return _intel_dp_hdcp2_capable(aux, capable);
+}
+
static const struct intel_hdcp_shim intel_dp_hdcp_shim = {
.write_an_aksv = intel_dp_hdcp_write_an_aksv,
.read_bksv = intel_dp_hdcp_read_bksv,