Commit 4773293b authored by Jani Nikula's avatar Jani Nikula

drm/i915/hdcp: unify connector logging format

It's customary to debug log connectors using [CONNECTOR:%d:%s]
format. Make the HDCP code follow suit.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231219104746.1065431-1-jani.nikula@intel.com
parent 716c3cf2
...@@ -853,8 +853,8 @@ static int intel_hdcp_auth(struct intel_connector *connector) ...@@ -853,8 +853,8 @@ static int intel_hdcp_auth(struct intel_connector *connector)
if (shim->stream_encryption) { if (shim->stream_encryption) {
ret = shim->stream_encryption(connector, true); ret = shim->stream_encryption(connector, true);
if (ret) { if (ret) {
drm_err(&i915->drm, "[%s:%d] Failed to enable HDCP 1.4 stream enc\n", drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to enable HDCP 1.4 stream enc\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
return ret; return ret;
} }
drm_dbg_kms(&i915->drm, "HDCP 1.4 transcoder: %s stream encrypted\n", drm_dbg_kms(&i915->drm, "HDCP 1.4 transcoder: %s stream encrypted\n",
...@@ -878,14 +878,14 @@ static int _intel_hdcp_disable(struct intel_connector *connector) ...@@ -878,14 +878,14 @@ static int _intel_hdcp_disable(struct intel_connector *connector)
u32 repeater_ctl; u32 repeater_ctl;
int ret; int ret;
drm_dbg_kms(&i915->drm, "[%s:%d] HDCP is being disabled...\n", drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP is being disabled...\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
if (hdcp->shim->stream_encryption) { if (hdcp->shim->stream_encryption) {
ret = hdcp->shim->stream_encryption(connector, false); ret = hdcp->shim->stream_encryption(connector, false);
if (ret) { if (ret) {
drm_err(&i915->drm, "[%s:%d] Failed to disable HDCP 1.4 stream enc\n", drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to disable HDCP 1.4 stream enc\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
return ret; return ret;
} }
drm_dbg_kms(&i915->drm, "HDCP 1.4 transcoder: %s stream encryption disabled\n", drm_dbg_kms(&i915->drm, "HDCP 1.4 transcoder: %s stream encryption disabled\n",
...@@ -929,8 +929,8 @@ static int intel_hdcp1_enable(struct intel_connector *connector) ...@@ -929,8 +929,8 @@ static int intel_hdcp1_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_dbg_kms(&i915->drm, "[%s:%d] HDCP is being enabled...\n", drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP is being enabled...\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
if (!hdcp_key_loadable(i915)) { if (!hdcp_key_loadable(i915)) {
drm_err(&i915->drm, "HDCP key Load is not possible\n"); drm_err(&i915->drm, "HDCP key Load is not possible\n");
...@@ -1027,8 +1027,8 @@ static int intel_hdcp_check_link(struct intel_connector *connector) ...@@ -1027,8 +1027,8 @@ static int intel_hdcp_check_link(struct intel_connector *connector)
if (drm_WARN_ON(&i915->drm, if (drm_WARN_ON(&i915->drm,
!intel_hdcp_in_use(i915, cpu_transcoder, port))) { !intel_hdcp_in_use(i915, cpu_transcoder, port))) {
drm_err(&i915->drm, drm_err(&i915->drm,
"%s:%d HDCP link stopped encryption,%x\n", "[CONNECTOR:%d:%s] HDCP link stopped encryption,%x\n",
connector->base.name, connector->base.base.id, connector->base.base.id, connector->base.name,
intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port))); intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port)));
ret = -ENXIO; ret = -ENXIO;
intel_hdcp_update_value(connector, intel_hdcp_update_value(connector,
...@@ -1046,8 +1046,8 @@ static int intel_hdcp_check_link(struct intel_connector *connector) ...@@ -1046,8 +1046,8 @@ static int intel_hdcp_check_link(struct intel_connector *connector)
} }
drm_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"[%s:%d] HDCP link failed, retrying authentication\n", "[CONNECTOR:%d:%s] HDCP link failed, retrying authentication\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
ret = _intel_hdcp_disable(connector); ret = _intel_hdcp_disable(connector);
if (ret) { if (ret) {
...@@ -1731,8 +1731,8 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector) ...@@ -1731,8 +1731,8 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector)
if (!(intel_de_read(i915, HDCP2_STATUS(i915, cpu_transcoder, port)) & if (!(intel_de_read(i915, HDCP2_STATUS(i915, cpu_transcoder, port)) &
LINK_ENCRYPTION_STATUS)) { LINK_ENCRYPTION_STATUS)) {
drm_err(&i915->drm, "[%s:%d] HDCP 2.2 Link is not encrypted\n", drm_err(&i915->drm, "[CONNECTOR:%d:%s] HDCP 2.2 Link is not encrypted\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
ret = -EPERM; ret = -EPERM;
goto link_recover; goto link_recover;
} }
...@@ -1740,8 +1740,8 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector) ...@@ -1740,8 +1740,8 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector)
if (hdcp->shim->stream_2_2_encryption) { if (hdcp->shim->stream_2_2_encryption) {
ret = hdcp->shim->stream_2_2_encryption(connector, true); ret = hdcp->shim->stream_2_2_encryption(connector, true);
if (ret) { if (ret) {
drm_err(&i915->drm, "[%s:%d] Failed to enable HDCP 2.2 stream enc\n", drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to enable HDCP 2.2 stream enc\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
return ret; return ret;
} }
drm_dbg_kms(&i915->drm, "HDCP 2.2 transcoder: %s stream encrypted\n", drm_dbg_kms(&i915->drm, "HDCP 2.2 transcoder: %s stream encrypted\n",
...@@ -1925,8 +1925,8 @@ static int _intel_hdcp2_enable(struct intel_connector *connector) ...@@ -1925,8 +1925,8 @@ static int _intel_hdcp2_enable(struct intel_connector *connector)
struct intel_hdcp *hdcp = &connector->hdcp; struct intel_hdcp *hdcp = &connector->hdcp;
int ret; int ret;
drm_dbg_kms(&i915->drm, "[%s:%d] HDCP2.2 is being enabled. Type: %d\n", drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP2.2 is being enabled. Type: %d\n",
connector->base.name, connector->base.base.id, connector->base.base.id, connector->base.name,
hdcp->content_type); hdcp->content_type);
ret = hdcp2_authenticate_and_encrypt(connector); ret = hdcp2_authenticate_and_encrypt(connector);
...@@ -1936,8 +1936,8 @@ static int _intel_hdcp2_enable(struct intel_connector *connector) ...@@ -1936,8 +1936,8 @@ static int _intel_hdcp2_enable(struct intel_connector *connector)
return ret; return ret;
} }
drm_dbg_kms(&i915->drm, "[%s:%d] HDCP2.2 is enabled. Type %d\n", drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP2.2 is enabled. Type %d\n",
connector->base.name, connector->base.base.id, connector->base.base.id, connector->base.name,
hdcp->content_type); hdcp->content_type);
hdcp->hdcp2_encrypted = true; hdcp->hdcp2_encrypted = true;
...@@ -1953,14 +1953,14 @@ _intel_hdcp2_disable(struct intel_connector *connector, bool hdcp2_link_recovery ...@@ -1953,14 +1953,14 @@ _intel_hdcp2_disable(struct intel_connector *connector, bool hdcp2_link_recovery
struct intel_hdcp *hdcp = &connector->hdcp; struct intel_hdcp *hdcp = &connector->hdcp;
int ret; int ret;
drm_dbg_kms(&i915->drm, "[%s:%d] HDCP2.2 is being Disabled\n", drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] HDCP2.2 is being Disabled\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
if (hdcp->shim->stream_2_2_encryption) { if (hdcp->shim->stream_2_2_encryption) {
ret = hdcp->shim->stream_2_2_encryption(connector, false); ret = hdcp->shim->stream_2_2_encryption(connector, false);
if (ret) { if (ret) {
drm_err(&i915->drm, "[%s:%d] Failed to disable HDCP 2.2 stream enc\n", drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to disable HDCP 2.2 stream enc\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
return ret; return ret;
} }
drm_dbg_kms(&i915->drm, "HDCP 2.2 transcoder: %s stream encryption disabled\n", drm_dbg_kms(&i915->drm, "HDCP 2.2 transcoder: %s stream encryption disabled\n",
...@@ -2040,20 +2040,20 @@ static int intel_hdcp2_check_link(struct intel_connector *connector) ...@@ -2040,20 +2040,20 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
goto out; goto out;
} }
drm_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"[%s:%d] Repeater topology auth failed.(%d)\n", "[CONNECTOR:%d:%s] Repeater topology auth failed.(%d)\n",
connector->base.name, connector->base.base.id, connector->base.base.id, connector->base.name,
ret); ret);
} else { } else {
drm_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"[%s:%d] HDCP2.2 link failed, retrying auth\n", "[CONNECTOR:%d:%s] HDCP2.2 link failed, retrying auth\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
} }
ret = _intel_hdcp2_disable(connector, true); ret = _intel_hdcp2_disable(connector, true);
if (ret) { if (ret) {
drm_err(&i915->drm, drm_err(&i915->drm,
"[%s:%d] Failed to disable hdcp2.2 (%d)\n", "[CONNECTOR:%d:%s] Failed to disable hdcp2.2 (%d)\n",
connector->base.name, connector->base.base.id, ret); connector->base.base.id, connector->base.name, ret);
intel_hdcp_update_value(connector, intel_hdcp_update_value(connector,
DRM_MODE_CONTENT_PROTECTION_DESIRED, true); DRM_MODE_CONTENT_PROTECTION_DESIRED, true);
goto out; goto out;
...@@ -2062,8 +2062,8 @@ static int intel_hdcp2_check_link(struct intel_connector *connector) ...@@ -2062,8 +2062,8 @@ 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_dbg_kms(&i915->drm, drm_dbg_kms(&i915->drm,
"[%s:%d] Failed to enable hdcp2.2 (%d)\n", "[CONNECTOR:%d:%s] Failed to enable hdcp2.2 (%d)\n",
connector->base.name, connector->base.base.id, connector->base.base.id, connector->base.name,
ret); ret);
intel_hdcp_update_value(connector, intel_hdcp_update_value(connector,
DRM_MODE_CONTENT_PROTECTION_DESIRED, DRM_MODE_CONTENT_PROTECTION_DESIRED,
...@@ -2341,8 +2341,8 @@ static int _intel_hdcp_enable(struct intel_atomic_state *state, ...@@ -2341,8 +2341,8 @@ static int _intel_hdcp_enable(struct intel_atomic_state *state,
return -ENOENT; return -ENOENT;
if (!connector->encoder) { if (!connector->encoder) {
drm_err(&i915->drm, "[%s:%d] encoder is not initialized\n", drm_err(&i915->drm, "[CONNECTOR:%d:%s] encoder is not initialized\n",
connector->base.name, connector->base.base.id); connector->base.base.id, connector->base.name);
return -ENODEV; return -ENODEV;
} }
......
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