Commit 65833c46 authored by Wambui Karuga's avatar Wambui Karuga Committed by Jani Nikula

drm/i915/hdcp: conversion to struct drm_device based logging macros.

Converts various instances of the printk based logging macros in
i915/display/intel_hdcp.c with the struct drm_device based macros using
coccinelle. The script matches based on the existence of an existing
struct drm_i915_private device:
@rule1@
identifier fn, T;
@@

fn(...,struct drm_i915_private *T,...) {
<+...
(
-DRM_INFO(
+drm_info(&T->drm,
...)
|
-DRM_ERROR(
+drm_err(&T->drm,
...)
|
-DRM_WARN(
+drm_warn(&T->drm,
...)
|
-DRM_DEBUG(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_DRIVER(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_KMS(
+drm_dbg_kms(&T->drm,
...)
|
-DRM_DEBUG_ATOMIC(
+drm_dbg_atomic(&T->drm,
...)
)
...+>
}

@rule2@
identifier fn, T;
@@

fn(...) {
...
struct drm_i915_private *T = ...;
<+...
(
-DRM_INFO(
+drm_info(&T->drm,
...)
|
-DRM_ERROR(
+drm_err(&T->drm,
...)
|
-DRM_WARN(
+drm_warn(&T->drm,
...)
|
-DRM_DEBUG(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_KMS(
+drm_dbg_kms(&T->drm,
...)
|
-DRM_DEBUG_DRIVER(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_ATOMIC(
+drm_dbg_atomic(&T->drm,
...)
)
...+>
}

New checkpatch warnings were addressed manually.
Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200122110844.2022-7-wambui.karugax@gmail.com
parent 5cb82703
...@@ -217,8 +217,9 @@ static int intel_hdcp_load_keys(struct drm_i915_private *dev_priv) ...@@ -217,8 +217,9 @@ static int intel_hdcp_load_keys(struct drm_i915_private *dev_priv)
ret = sandybridge_pcode_write(dev_priv, ret = sandybridge_pcode_write(dev_priv,
SKL_PCODE_LOAD_HDCP_KEYS, 1); SKL_PCODE_LOAD_HDCP_KEYS, 1);
if (ret) { if (ret) {
DRM_ERROR("Failed to initiate HDCP key load (%d)\n", drm_err(&dev_priv->drm,
ret); "Failed to initiate HDCP key load (%d)\n",
ret);
return ret; return ret;
} }
} else { } else {
...@@ -245,7 +246,7 @@ static int intel_write_sha_text(struct drm_i915_private *dev_priv, u32 sha_text) ...@@ -245,7 +246,7 @@ static int intel_write_sha_text(struct drm_i915_private *dev_priv, u32 sha_text)
{ {
I915_WRITE(HDCP_SHA_TEXT, sha_text); I915_WRITE(HDCP_SHA_TEXT, sha_text);
if (intel_de_wait_for_set(dev_priv, HDCP_REP_CTL, HDCP_SHA1_READY, 1)) { if (intel_de_wait_for_set(dev_priv, HDCP_REP_CTL, HDCP_SHA1_READY, 1)) {
DRM_ERROR("Timed out waiting for SHA1 ready\n"); drm_err(&dev_priv->drm, "Timed out waiting for SHA1 ready\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
return 0; return 0;
...@@ -270,7 +271,8 @@ u32 intel_hdcp_get_repeater_ctl(struct drm_i915_private *dev_priv, ...@@ -270,7 +271,8 @@ u32 intel_hdcp_get_repeater_ctl(struct drm_i915_private *dev_priv,
return HDCP_TRANSD_REP_PRESENT | return HDCP_TRANSD_REP_PRESENT |
HDCP_TRANSD_SHA1_M0; HDCP_TRANSD_SHA1_M0;
default: default:
DRM_ERROR("Unknown transcoder %d\n", cpu_transcoder); drm_err(&dev_priv->drm, "Unknown transcoder %d\n",
cpu_transcoder);
return -EINVAL; return -EINVAL;
} }
} }
...@@ -287,7 +289,7 @@ u32 intel_hdcp_get_repeater_ctl(struct drm_i915_private *dev_priv, ...@@ -287,7 +289,7 @@ u32 intel_hdcp_get_repeater_ctl(struct drm_i915_private *dev_priv,
case PORT_E: case PORT_E:
return HDCP_DDIE_REP_PRESENT | HDCP_DDIE_SHA1_M0; return HDCP_DDIE_REP_PRESENT | HDCP_DDIE_SHA1_M0;
default: default:
DRM_ERROR("Unknown port %d\n", port); drm_err(&dev_priv->drm, "Unknown port %d\n", port);
return -EINVAL; return -EINVAL;
} }
} }
...@@ -756,25 +758,26 @@ static int _intel_hdcp_disable(struct intel_connector *connector) ...@@ -756,25 +758,26 @@ static int _intel_hdcp_disable(struct intel_connector *connector)
enum transcoder cpu_transcoder = hdcp->cpu_transcoder; enum transcoder cpu_transcoder = hdcp->cpu_transcoder;
int ret; int ret;
DRM_DEBUG_KMS("[%s:%d] HDCP is being disabled...\n", drm_dbg_kms(&dev_priv->drm, "[%s:%d] HDCP is being disabled...\n",
connector->base.name, connector->base.base.id); connector->base.name, connector->base.base.id);
hdcp->hdcp_encrypted = false; hdcp->hdcp_encrypted = false;
I915_WRITE(HDCP_CONF(dev_priv, cpu_transcoder, port), 0); I915_WRITE(HDCP_CONF(dev_priv, cpu_transcoder, port), 0);
if (intel_de_wait_for_clear(dev_priv, if (intel_de_wait_for_clear(dev_priv,
HDCP_STATUS(dev_priv, cpu_transcoder, port), HDCP_STATUS(dev_priv, cpu_transcoder, port),
~0, ENCRYPT_STATUS_CHANGE_TIMEOUT_MS)) { ~0, ENCRYPT_STATUS_CHANGE_TIMEOUT_MS)) {
DRM_ERROR("Failed to disable HDCP, timeout clearing status\n"); drm_err(&dev_priv->drm,
"Failed to disable HDCP, timeout clearing status\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
ret = hdcp->shim->toggle_signalling(intel_dig_port, false); ret = hdcp->shim->toggle_signalling(intel_dig_port, false);
if (ret) { if (ret) {
DRM_ERROR("Failed to disable HDCP signalling\n"); drm_err(&dev_priv->drm, "Failed to disable HDCP signalling\n");
return ret; return ret;
} }
DRM_DEBUG_KMS("HDCP is disabled\n"); drm_dbg_kms(&dev_priv->drm, "HDCP is disabled\n");
return 0; return 0;
} }
...@@ -784,11 +787,11 @@ static int _intel_hdcp_enable(struct intel_connector *connector) ...@@ -784,11 +787,11 @@ static int _intel_hdcp_enable(struct intel_connector *connector)
struct intel_hdcp *hdcp = &connector->hdcp; struct intel_hdcp *hdcp = &connector->hdcp;
int i, ret, tries = 3; int i, ret, tries = 3;
DRM_DEBUG_KMS("[%s:%d] HDCP is being enabled...\n", drm_dbg_kms(&dev_priv->drm, "[%s:%d] HDCP is being enabled...\n",
connector->base.name, connector->base.base.id); connector->base.name, connector->base.base.id);
if (!hdcp_key_loadable(dev_priv)) { if (!hdcp_key_loadable(dev_priv)) {
DRM_ERROR("HDCP key Load is not possible\n"); drm_err(&dev_priv->drm, "HDCP key Load is not possible\n");
return -ENXIO; return -ENXIO;
} }
...@@ -799,7 +802,8 @@ static int _intel_hdcp_enable(struct intel_connector *connector) ...@@ -799,7 +802,8 @@ static int _intel_hdcp_enable(struct intel_connector *connector)
intel_hdcp_clear_keys(dev_priv); intel_hdcp_clear_keys(dev_priv);
} }
if (ret) { if (ret) {
DRM_ERROR("Could not load HDCP keys, (%d)\n", ret); drm_err(&dev_priv->drm, "Could not load HDCP keys, (%d)\n",
ret);
return ret; return ret;
} }
...@@ -811,13 +815,14 @@ static int _intel_hdcp_enable(struct intel_connector *connector) ...@@ -811,13 +815,14 @@ static int _intel_hdcp_enable(struct intel_connector *connector)
return 0; return 0;
} }
DRM_DEBUG_KMS("HDCP Auth failure (%d)\n", ret); drm_dbg_kms(&dev_priv->drm, "HDCP Auth failure (%d)\n", ret);
/* Ensuring HDCP encryption and signalling are stopped. */ /* Ensuring HDCP encryption and signalling are stopped. */
_intel_hdcp_disable(connector); _intel_hdcp_disable(connector);
} }
DRM_DEBUG_KMS("HDCP authentication failed (%d tries/%d)\n", tries, ret); drm_dbg_kms(&dev_priv->drm,
"HDCP authentication failed (%d tries/%d)\n", tries, ret);
return ret; return ret;
} }
...@@ -848,10 +853,11 @@ static int intel_hdcp_check_link(struct intel_connector *connector) ...@@ -848,10 +853,11 @@ static int intel_hdcp_check_link(struct intel_connector *connector)
} }
if (WARN_ON(!intel_hdcp_in_use(dev_priv, cpu_transcoder, port))) { if (WARN_ON(!intel_hdcp_in_use(dev_priv, cpu_transcoder, port))) {
DRM_ERROR("%s:%d HDCP link stopped encryption,%x\n", drm_err(&dev_priv->drm,
connector->base.name, connector->base.base.id, "%s:%d HDCP link stopped encryption,%x\n",
I915_READ(HDCP_STATUS(dev_priv, cpu_transcoder, connector->base.name, connector->base.base.id,
port))); I915_READ(HDCP_STATUS(dev_priv, cpu_transcoder,
port)));
ret = -ENXIO; ret = -ENXIO;
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED; hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
schedule_work(&hdcp->prop_work); schedule_work(&hdcp->prop_work);
...@@ -866,12 +872,13 @@ static int intel_hdcp_check_link(struct intel_connector *connector) ...@@ -866,12 +872,13 @@ static int intel_hdcp_check_link(struct intel_connector *connector)
goto out; goto out;
} }
DRM_DEBUG_KMS("[%s:%d] HDCP link failed, retrying authentication\n", drm_dbg_kms(&dev_priv->drm,
connector->base.name, connector->base.base.id); "[%s:%d] HDCP link failed, retrying authentication\n",
connector->base.name, connector->base.base.id);
ret = _intel_hdcp_disable(connector); ret = _intel_hdcp_disable(connector);
if (ret) { if (ret) {
DRM_ERROR("Failed to disable hdcp (%d)\n", ret); drm_err(&dev_priv->drm, "Failed to disable hdcp (%d)\n", ret);
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED; hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
schedule_work(&hdcp->prop_work); schedule_work(&hdcp->prop_work);
goto out; goto out;
...@@ -879,7 +886,7 @@ static int intel_hdcp_check_link(struct intel_connector *connector) ...@@ -879,7 +886,7 @@ static int intel_hdcp_check_link(struct intel_connector *connector)
ret = _intel_hdcp_enable(connector); ret = _intel_hdcp_enable(connector);
if (ret) { if (ret) {
DRM_ERROR("Failed to enable hdcp (%d)\n", ret); drm_err(&dev_priv->drm, "Failed to enable hdcp (%d)\n", ret);
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED; hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
schedule_work(&hdcp->prop_work); schedule_work(&hdcp->prop_work);
goto out; goto out;
...@@ -938,7 +945,8 @@ hdcp2_prepare_ake_init(struct intel_connector *connector, ...@@ -938,7 +945,8 @@ hdcp2_prepare_ake_init(struct intel_connector *connector,
ret = comp->ops->initiate_hdcp2_session(comp->mei_dev, data, ake_data); ret = comp->ops->initiate_hdcp2_session(comp->mei_dev, data, ake_data);
if (ret) if (ret)
DRM_DEBUG_KMS("Prepare_ake_init failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm, "Prepare_ake_init failed. %d\n",
ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -968,7 +976,8 @@ hdcp2_verify_rx_cert_prepare_km(struct intel_connector *connector, ...@@ -968,7 +976,8 @@ hdcp2_verify_rx_cert_prepare_km(struct intel_connector *connector,
rx_cert, paired, rx_cert, paired,
ek_pub_km, msg_sz); ek_pub_km, msg_sz);
if (ret < 0) if (ret < 0)
DRM_DEBUG_KMS("Verify rx_cert failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm, "Verify rx_cert failed. %d\n",
ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -992,7 +1001,7 @@ static int hdcp2_verify_hprime(struct intel_connector *connector, ...@@ -992,7 +1001,7 @@ static int hdcp2_verify_hprime(struct intel_connector *connector,
ret = comp->ops->verify_hprime(comp->mei_dev, data, rx_hprime); ret = comp->ops->verify_hprime(comp->mei_dev, data, rx_hprime);
if (ret < 0) if (ret < 0)
DRM_DEBUG_KMS("Verify hprime failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm, "Verify hprime failed. %d\n", ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -1017,7 +1026,8 @@ hdcp2_store_pairing_info(struct intel_connector *connector, ...@@ -1017,7 +1026,8 @@ hdcp2_store_pairing_info(struct intel_connector *connector,
ret = comp->ops->store_pairing_info(comp->mei_dev, data, pairing_info); ret = comp->ops->store_pairing_info(comp->mei_dev, data, pairing_info);
if (ret < 0) if (ret < 0)
DRM_DEBUG_KMS("Store pairing info failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm, "Store pairing info failed. %d\n",
ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -1042,7 +1052,8 @@ hdcp2_prepare_lc_init(struct intel_connector *connector, ...@@ -1042,7 +1052,8 @@ hdcp2_prepare_lc_init(struct intel_connector *connector,
ret = comp->ops->initiate_locality_check(comp->mei_dev, data, lc_init); ret = comp->ops->initiate_locality_check(comp->mei_dev, data, lc_init);
if (ret < 0) if (ret < 0)
DRM_DEBUG_KMS("Prepare lc_init failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm, "Prepare lc_init failed. %d\n",
ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -1067,7 +1078,8 @@ hdcp2_verify_lprime(struct intel_connector *connector, ...@@ -1067,7 +1078,8 @@ hdcp2_verify_lprime(struct intel_connector *connector,
ret = comp->ops->verify_lprime(comp->mei_dev, data, rx_lprime); ret = comp->ops->verify_lprime(comp->mei_dev, data, rx_lprime);
if (ret < 0) if (ret < 0)
DRM_DEBUG_KMS("Verify L_Prime failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm, "Verify L_Prime failed. %d\n",
ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -1091,7 +1103,8 @@ static int hdcp2_prepare_skey(struct intel_connector *connector, ...@@ -1091,7 +1103,8 @@ static int hdcp2_prepare_skey(struct intel_connector *connector,
ret = comp->ops->get_session_key(comp->mei_dev, data, ske_data); ret = comp->ops->get_session_key(comp->mei_dev, data, ske_data);
if (ret < 0) if (ret < 0)
DRM_DEBUG_KMS("Get session key failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm, "Get session key failed. %d\n",
ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -1120,7 +1133,8 @@ hdcp2_verify_rep_topology_prepare_ack(struct intel_connector *connector, ...@@ -1120,7 +1133,8 @@ hdcp2_verify_rep_topology_prepare_ack(struct intel_connector *connector,
rep_topology, rep_topology,
rep_send_ack); rep_send_ack);
if (ret < 0) if (ret < 0)
DRM_DEBUG_KMS("Verify rep topology failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm,
"Verify rep topology failed. %d\n", ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -1145,7 +1159,7 @@ hdcp2_verify_mprime(struct intel_connector *connector, ...@@ -1145,7 +1159,7 @@ hdcp2_verify_mprime(struct intel_connector *connector,
ret = comp->ops->verify_mprime(comp->mei_dev, data, stream_ready); ret = comp->ops->verify_mprime(comp->mei_dev, data, stream_ready);
if (ret < 0) if (ret < 0)
DRM_DEBUG_KMS("Verify mprime failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm, "Verify mprime failed. %d\n", ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -1168,7 +1182,8 @@ static int hdcp2_authenticate_port(struct intel_connector *connector) ...@@ -1168,7 +1182,8 @@ static int hdcp2_authenticate_port(struct intel_connector *connector)
ret = comp->ops->enable_hdcp_authentication(comp->mei_dev, data); ret = comp->ops->enable_hdcp_authentication(comp->mei_dev, data);
if (ret < 0) if (ret < 0)
DRM_DEBUG_KMS("Enable hdcp auth failed. %d\n", ret); drm_dbg_kms(&dev_priv->drm, "Enable hdcp auth failed. %d\n",
ret);
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
return ret; return ret;
...@@ -1532,8 +1547,9 @@ static int hdcp2_enable_encryption(struct intel_connector *connector) ...@@ -1532,8 +1547,9 @@ static int hdcp2_enable_encryption(struct intel_connector *connector)
if (hdcp->shim->toggle_signalling) { if (hdcp->shim->toggle_signalling) {
ret = hdcp->shim->toggle_signalling(intel_dig_port, true); ret = hdcp->shim->toggle_signalling(intel_dig_port, true);
if (ret) { if (ret) {
DRM_ERROR("Failed to enable HDCP signalling. %d\n", drm_err(&dev_priv->drm,
ret); "Failed to enable HDCP signalling. %d\n",
ret);
return ret; return ret;
} }
} }
...@@ -1578,13 +1594,14 @@ static int hdcp2_disable_encryption(struct intel_connector *connector) ...@@ -1578,13 +1594,14 @@ static int hdcp2_disable_encryption(struct intel_connector *connector)
LINK_ENCRYPTION_STATUS, LINK_ENCRYPTION_STATUS,
ENCRYPT_STATUS_CHANGE_TIMEOUT_MS); ENCRYPT_STATUS_CHANGE_TIMEOUT_MS);
if (ret == -ETIMEDOUT) if (ret == -ETIMEDOUT)
DRM_DEBUG_KMS("Disable Encryption Timedout"); drm_dbg_kms(&dev_priv->drm, "Disable Encryption Timedout");
if (hdcp->shim->toggle_signalling) { if (hdcp->shim->toggle_signalling) {
ret = hdcp->shim->toggle_signalling(intel_dig_port, false); ret = hdcp->shim->toggle_signalling(intel_dig_port, false);
if (ret) { if (ret) {
DRM_ERROR("Failed to disable HDCP signalling. %d\n", drm_err(&dev_priv->drm,
ret); "Failed to disable HDCP signalling. %d\n",
ret);
return ret; return ret;
} }
} }
...@@ -1687,9 +1704,10 @@ static int intel_hdcp2_check_link(struct intel_connector *connector) ...@@ -1687,9 +1704,10 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
} }
if (WARN_ON(!intel_hdcp2_in_use(dev_priv, cpu_transcoder, port))) { if (WARN_ON(!intel_hdcp2_in_use(dev_priv, cpu_transcoder, port))) {
DRM_ERROR("HDCP2.2 link stopped the encryption, %x\n", drm_err(&dev_priv->drm,
I915_READ(HDCP2_STATUS(dev_priv, cpu_transcoder, "HDCP2.2 link stopped the encryption, %x\n",
port))); I915_READ(HDCP2_STATUS(dev_priv, cpu_transcoder,
port)));
ret = -ENXIO; ret = -ENXIO;
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED; hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
schedule_work(&hdcp->prop_work); schedule_work(&hdcp->prop_work);
...@@ -1709,25 +1727,29 @@ static int intel_hdcp2_check_link(struct intel_connector *connector) ...@@ -1709,25 +1727,29 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
if (hdcp->value == DRM_MODE_CONTENT_PROTECTION_UNDESIRED) if (hdcp->value == DRM_MODE_CONTENT_PROTECTION_UNDESIRED)
goto out; goto out;
DRM_DEBUG_KMS("HDCP2.2 Downstream topology change\n"); drm_dbg_kms(&dev_priv->drm,
"HDCP2.2 Downstream topology change\n");
ret = hdcp2_authenticate_repeater_topology(connector); ret = hdcp2_authenticate_repeater_topology(connector);
if (!ret) { if (!ret) {
hdcp->value = DRM_MODE_CONTENT_PROTECTION_ENABLED; hdcp->value = DRM_MODE_CONTENT_PROTECTION_ENABLED;
schedule_work(&hdcp->prop_work); schedule_work(&hdcp->prop_work);
goto out; goto out;
} }
DRM_DEBUG_KMS("[%s:%d] Repeater topology auth failed.(%d)\n", drm_dbg_kms(&dev_priv->drm,
connector->base.name, connector->base.base.id, "[%s:%d] Repeater topology auth failed.(%d)\n",
ret); connector->base.name, connector->base.base.id,
ret);
} else { } else {
DRM_DEBUG_KMS("[%s:%d] HDCP2.2 link failed, retrying auth\n", drm_dbg_kms(&dev_priv->drm,
connector->base.name, connector->base.base.id); "[%s:%d] HDCP2.2 link failed, retrying auth\n",
connector->base.name, connector->base.base.id);
} }
ret = _intel_hdcp2_disable(connector); ret = _intel_hdcp2_disable(connector);
if (ret) { if (ret) {
DRM_ERROR("[%s:%d] Failed to disable hdcp2.2 (%d)\n", drm_err(&dev_priv->drm,
connector->base.name, connector->base.base.id, ret); "[%s:%d] Failed to disable hdcp2.2 (%d)\n",
connector->base.name, connector->base.base.id, ret);
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED; hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
schedule_work(&hdcp->prop_work); schedule_work(&hdcp->prop_work);
goto out; goto out;
...@@ -1735,9 +1757,10 @@ static int intel_hdcp2_check_link(struct intel_connector *connector) ...@@ -1735,9 +1757,10 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
ret = _intel_hdcp2_enable(connector); ret = _intel_hdcp2_enable(connector);
if (ret) { if (ret) {
DRM_DEBUG_KMS("[%s:%d] Failed to enable hdcp2.2 (%d)\n", drm_dbg_kms(&dev_priv->drm,
connector->base.name, connector->base.base.id, "[%s:%d] Failed to enable hdcp2.2 (%d)\n",
ret); connector->base.name, connector->base.base.id,
ret);
hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED; hdcp->value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
schedule_work(&hdcp->prop_work); schedule_work(&hdcp->prop_work);
goto out; goto out;
...@@ -1768,7 +1791,7 @@ static int i915_hdcp_component_bind(struct device *i915_kdev, ...@@ -1768,7 +1791,7 @@ static int i915_hdcp_component_bind(struct device *i915_kdev,
{ {
struct drm_i915_private *dev_priv = kdev_to_i915(i915_kdev); struct drm_i915_private *dev_priv = kdev_to_i915(i915_kdev);
DRM_DEBUG("I915 HDCP comp bind\n"); drm_dbg(&dev_priv->drm, "I915 HDCP comp bind\n");
mutex_lock(&dev_priv->hdcp_comp_mutex); mutex_lock(&dev_priv->hdcp_comp_mutex);
dev_priv->hdcp_master = (struct i915_hdcp_comp_master *)data; dev_priv->hdcp_master = (struct i915_hdcp_comp_master *)data;
dev_priv->hdcp_master->mei_dev = mei_kdev; dev_priv->hdcp_master->mei_dev = mei_kdev;
...@@ -1782,7 +1805,7 @@ static void i915_hdcp_component_unbind(struct device *i915_kdev, ...@@ -1782,7 +1805,7 @@ static void i915_hdcp_component_unbind(struct device *i915_kdev,
{ {
struct drm_i915_private *dev_priv = kdev_to_i915(i915_kdev); struct drm_i915_private *dev_priv = kdev_to_i915(i915_kdev);
DRM_DEBUG("I915 HDCP comp unbind\n"); drm_dbg(&dev_priv->drm, "I915 HDCP comp unbind\n");
mutex_lock(&dev_priv->hdcp_comp_mutex); mutex_lock(&dev_priv->hdcp_comp_mutex);
dev_priv->hdcp_master = NULL; dev_priv->hdcp_master = NULL;
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
...@@ -1850,7 +1873,7 @@ static inline int initialize_hdcp_port_data(struct intel_connector *connector, ...@@ -1850,7 +1873,7 @@ static inline int initialize_hdcp_port_data(struct intel_connector *connector,
sizeof(struct hdcp2_streamid_type), sizeof(struct hdcp2_streamid_type),
GFP_KERNEL); GFP_KERNEL);
if (!data->streams) { if (!data->streams) {
DRM_ERROR("Out of Memory\n"); drm_err(&dev_priv->drm, "Out of Memory\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -1884,7 +1907,8 @@ void intel_hdcp_component_init(struct drm_i915_private *dev_priv) ...@@ -1884,7 +1907,8 @@ void intel_hdcp_component_init(struct drm_i915_private *dev_priv)
ret = component_add_typed(dev_priv->drm.dev, &i915_hdcp_component_ops, ret = component_add_typed(dev_priv->drm.dev, &i915_hdcp_component_ops,
I915_COMPONENT_HDCP); I915_COMPONENT_HDCP);
if (ret < 0) { if (ret < 0) {
DRM_DEBUG_KMS("Failed at component add(%d)\n", ret); drm_dbg_kms(&dev_priv->drm, "Failed at component add(%d)\n",
ret);
mutex_lock(&dev_priv->hdcp_comp_mutex); mutex_lock(&dev_priv->hdcp_comp_mutex);
dev_priv->hdcp_comp_added = false; dev_priv->hdcp_comp_added = false;
mutex_unlock(&dev_priv->hdcp_comp_mutex); mutex_unlock(&dev_priv->hdcp_comp_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment