diff options
author | Suraj Kandpal <suraj.kandpal@intel.com> | 2023-05-29 14:07:40 +0300 |
---|---|---|
committer | Ankit Nautiyal <ankit.k.nautiyal@intel.com> | 2023-05-31 07:52:14 +0300 |
commit | 3e36c490698660ba4fa7cedfab03f3ed81a07192 (patch) | |
tree | 64f5a4b8154f2c245867d12fa19921913b322e0b /drivers/gpu/drm/i915/display | |
parent | 5c8ec987997ab444df18813e0a3f565f366d05d1 (diff) | |
download | linux-3e36c490698660ba4fa7cedfab03f3ed81a07192.tar.xz |
drm/i915/hdcp: Rename comp_mutex to hdcp_mutex
Rename comp_mutex to hdcp_mutex as it does not just
protect component related variables which was a terminology
used when hdcp was to be binded as a mei component from MTL
we use gsc cs which does not use the component binding path
for HDCP.
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230529110740.1522985-4-suraj.kandpal@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_core.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_hdcp.c | 94 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 4 |
3 files changed, 51 insertions, 51 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h index 23957d80efe8..2209811eb29e 100644 --- a/drivers/gpu/drm/i915/display/intel_display_core.h +++ b/drivers/gpu/drm/i915/display/intel_display_core.h @@ -404,8 +404,8 @@ struct intel_display { * this is only populated post Meteorlake */ struct intel_hdcp_gsc_message *hdcp_message; - /* Mutex to protect the above hdcp component related values. */ - struct mutex comp_mutex; + /* Mutex to protect the above hdcp related values. */ + struct mutex hdcp_mutex; } hdcp; struct { diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c index bf28c6f1d748..17542c28dfd5 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -182,12 +182,12 @@ bool intel_hdcp2_capable(struct intel_connector *connector) } /* MEI/GSC interface is solid depending on which is used */ - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); if (!i915->display.hdcp.comp_added || !i915->display.hdcp.arbiter) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return false; } - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); /* Sink's capability for HDCP2.2 */ hdcp->shim->hdcp_2_2_capable(dig_port, &capable); @@ -1117,11 +1117,11 @@ hdcp2_prepare_ake_init(struct intel_connector *connector, struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } @@ -1129,7 +1129,7 @@ hdcp2_prepare_ake_init(struct intel_connector *connector, if (ret) drm_dbg_kms(&i915->drm, "Prepare_ake_init failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1147,11 +1147,11 @@ hdcp2_verify_rx_cert_prepare_km(struct intel_connector *connector, struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } @@ -1161,7 +1161,7 @@ hdcp2_verify_rx_cert_prepare_km(struct intel_connector *connector, if (ret < 0) drm_dbg_kms(&i915->drm, "Verify rx_cert failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1175,18 +1175,18 @@ static int hdcp2_verify_hprime(struct intel_connector *connector, struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } ret = arbiter->ops->verify_hprime(arbiter->hdcp_dev, data, rx_hprime); if (ret < 0) drm_dbg_kms(&i915->drm, "Verify hprime failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1201,11 +1201,11 @@ hdcp2_store_pairing_info(struct intel_connector *connector, struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } @@ -1213,7 +1213,7 @@ hdcp2_store_pairing_info(struct intel_connector *connector, if (ret < 0) drm_dbg_kms(&i915->drm, "Store pairing info failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1228,11 +1228,11 @@ hdcp2_prepare_lc_init(struct intel_connector *connector, struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } @@ -1240,7 +1240,7 @@ hdcp2_prepare_lc_init(struct intel_connector *connector, if (ret < 0) drm_dbg_kms(&i915->drm, "Prepare lc_init failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1255,11 +1255,11 @@ hdcp2_verify_lprime(struct intel_connector *connector, struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } @@ -1267,7 +1267,7 @@ hdcp2_verify_lprime(struct intel_connector *connector, if (ret < 0) drm_dbg_kms(&i915->drm, "Verify L_Prime failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1281,11 +1281,11 @@ static int hdcp2_prepare_skey(struct intel_connector *connector, struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } @@ -1293,7 +1293,7 @@ static int hdcp2_prepare_skey(struct intel_connector *connector, if (ret < 0) drm_dbg_kms(&i915->drm, "Get session key failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1310,11 +1310,11 @@ hdcp2_verify_rep_topology_prepare_ack(struct intel_connector *connector, struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } @@ -1325,7 +1325,7 @@ hdcp2_verify_rep_topology_prepare_ack(struct intel_connector *connector, if (ret < 0) drm_dbg_kms(&i915->drm, "Verify rep topology failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1340,18 +1340,18 @@ hdcp2_verify_mprime(struct intel_connector *connector, struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } ret = arbiter->ops->verify_mprime(arbiter->hdcp_dev, data, stream_ready); if (ret < 0) drm_dbg_kms(&i915->drm, "Verify mprime failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1364,11 +1364,11 @@ static int hdcp2_authenticate_port(struct intel_connector *connector) struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } @@ -1376,7 +1376,7 @@ static int hdcp2_authenticate_port(struct intel_connector *connector) if (ret < 0) drm_dbg_kms(&i915->drm, "Enable hdcp auth failed. %d\n", ret); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -1388,17 +1388,17 @@ static int hdcp2_close_session(struct intel_connector *connector) struct i915_hdcp_arbiter *arbiter; int ret; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); arbiter = i915->display.hdcp.arbiter; if (!arbiter || !arbiter->ops) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return -EINVAL; } ret = arbiter->ops->close_hdcp_session(arbiter->hdcp_dev, &dig_port->hdcp_port_data); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } @@ -2108,10 +2108,10 @@ static int i915_hdcp_component_bind(struct device *i915_kdev, struct drm_i915_private *i915 = kdev_to_i915(i915_kdev); drm_dbg(&i915->drm, "I915 HDCP comp bind\n"); - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); i915->display.hdcp.arbiter = (struct i915_hdcp_arbiter *)data; i915->display.hdcp.arbiter->hdcp_dev = mei_kdev; - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return 0; } @@ -2122,9 +2122,9 @@ static void i915_hdcp_component_unbind(struct device *i915_kdev, struct drm_i915_private *i915 = kdev_to_i915(i915_kdev); drm_dbg(&i915->drm, "I915 HDCP comp unbind\n"); - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); i915->display.hdcp.arbiter = NULL; - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); } static const struct component_ops i915_hdcp_ops = { @@ -2214,11 +2214,11 @@ void intel_hdcp_component_init(struct drm_i915_private *i915) if (!is_hdcp2_supported(i915)) return; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); drm_WARN_ON(&i915->drm, i915->display.hdcp.comp_added); i915->display.hdcp.comp_added = true; - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); if (intel_hdcp_gsc_cs_required(i915)) ret = intel_hdcp_gsc_init(i915); else @@ -2228,9 +2228,9 @@ void intel_hdcp_component_init(struct drm_i915_private *i915) if (ret < 0) { drm_dbg_kms(&i915->drm, "Failed at fw component add(%d)\n", ret); - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); i915->display.hdcp.comp_added = false; - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return; } } @@ -2500,14 +2500,14 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state, void intel_hdcp_component_fini(struct drm_i915_private *i915) { - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); if (!i915->display.hdcp.comp_added) { - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return; } i915->display.hdcp.comp_added = false; - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); if (intel_hdcp_gsc_cs_required(i915)) intel_hdcp_gsc_fini(i915); diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c index 62e7bf0e1035..72573ce1d0e9 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c @@ -704,12 +704,12 @@ int intel_hdcp_gsc_init(struct drm_i915_private *i915) if (!data) return -ENOMEM; - mutex_lock(&i915->display.hdcp.comp_mutex); + mutex_lock(&i915->display.hdcp.hdcp_mutex); i915->display.hdcp.arbiter = data; i915->display.hdcp.arbiter->hdcp_dev = i915->drm.dev; i915->display.hdcp.arbiter->ops = &gsc_hdcp_ops; ret = intel_hdcp_gsc_hdcp2_init(i915); - mutex_unlock(&i915->display.hdcp.comp_mutex); + mutex_unlock(&i915->display.hdcp.hdcp_mutex); return ret; } |