Skip to content

Commit

Permalink
drm/i915: Connector info in HDCP debug msgs
Browse files Browse the repository at this point in the history
When HDCP authentication is triggered on multiple connector, having
connector name and ID in debug message will be more informative.

v2:
  Added logs with connector info at the start of en/disable [Seanpaul]
  Added the connector info into Check link failure msgs too.

v3:
  No Changes. Added Reviewed-by tag.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1517609350-10698-4-git-send-email-ramalingam.c@intel.com
  • Loading branch information
Ramalingam C authored and Sean Paul committed Feb 5, 2018
1 parent f179a2f commit cb340bf
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions drivers/gpu/drm/i915/intel_hdcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,9 @@ static int _intel_hdcp_disable(struct intel_connector *connector)
enum port port = intel_dig_port->base.port;
int ret;

DRM_DEBUG_KMS("[%s:%d] HDCP is being disabled...\n",
connector->base.name, connector->base.base.id);

I915_WRITE(PORT_HDCP_CONF(port), 0);
if (intel_wait_for_register(dev_priv, PORT_HDCP_STATUS(port), ~0, 0,
20)) {
Expand All @@ -548,6 +551,9 @@ static int _intel_hdcp_enable(struct intel_connector *connector)
struct drm_i915_private *dev_priv = connector->base.dev->dev_private;
int i, ret;

DRM_DEBUG_KMS("[%s:%d] HDCP is being enabled...\n",
connector->base.name, connector->base.base.id);

if (!(I915_READ(SKL_FUSE_STATUS) & SKL_FUSE_PG_DIST_STATUS(1))) {
DRM_ERROR("PG1 is disabled, cannot load keys\n");
return -ENXIO;
Expand Down Expand Up @@ -727,8 +733,9 @@ int intel_hdcp_check_link(struct intel_connector *connector)
goto out;

if (!(I915_READ(PORT_HDCP_STATUS(port)) & HDCP_STATUS_ENC)) {
DRM_ERROR("HDCP check failed: link is not encrypted, %x\n",
I915_READ(PORT_HDCP_STATUS(port)));
DRM_ERROR("%s:%d HDCP check failed: link is not encrypted,%x\n",
connector->base.name, connector->base.base.id,
I915_READ(PORT_HDCP_STATUS(port)));
ret = -ENXIO;
connector->hdcp_value = DRM_MODE_CONTENT_PROTECTION_DESIRED;
schedule_work(&connector->hdcp_prop_work);
Expand All @@ -745,7 +752,8 @@ int intel_hdcp_check_link(struct intel_connector *connector)
goto out;
}

DRM_DEBUG_KMS("HDCP link failed, retrying authentication\n");
DRM_DEBUG_KMS("[%s:%d] HDCP link failed, retrying authentication\n",
connector->base.name, connector->base.base.id);

ret = _intel_hdcp_disable(connector);
if (ret) {
Expand Down

0 comments on commit cb340bf

Please sign in to comment.