Commit 8c5be8a8 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-intel-fixes-2023-05-17' of...

Merge tag 'drm-intel-fixes-2023-05-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

Add missing null check for HDCP code.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ZGUgi7kXq+MiLcCA@jlahtine-mobl.ger.corp.intel.com
parents 90facc4d 5896f2d3
...@@ -204,8 +204,6 @@ bool intel_hdcp2_capable(struct intel_connector *connector) ...@@ -204,8 +204,6 @@ bool intel_hdcp2_capable(struct intel_connector *connector)
struct intel_digital_port *dig_port = intel_attached_dig_port(connector); struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
struct drm_i915_private *dev_priv = to_i915(connector->base.dev); struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
struct intel_hdcp *hdcp = &connector->hdcp; struct intel_hdcp *hdcp = &connector->hdcp;
struct intel_gt *gt = dev_priv->media_gt;
struct intel_gsc_uc *gsc = &gt->uc.gsc;
bool capable = false; bool capable = false;
/* I915 support for HDCP2.2 */ /* I915 support for HDCP2.2 */
...@@ -213,9 +211,13 @@ bool intel_hdcp2_capable(struct intel_connector *connector) ...@@ -213,9 +211,13 @@ bool intel_hdcp2_capable(struct intel_connector *connector)
return false; return false;
/* If MTL+ make sure gsc is loaded and proxy is setup */ /* If MTL+ make sure gsc is loaded and proxy is setup */
if (intel_hdcp_gsc_cs_required(dev_priv)) if (intel_hdcp_gsc_cs_required(dev_priv)) {
if (!intel_uc_fw_is_running(&gsc->fw)) struct intel_gt *gt = dev_priv->media_gt;
struct intel_gsc_uc *gsc = gt ? &gt->uc.gsc : NULL;
if (!gsc || !intel_uc_fw_is_running(&gsc->fw))
return false; return false;
}
/* MEI/GSC interface is solid depending on which is used */ /* MEI/GSC interface is solid depending on which is used */
mutex_lock(&dev_priv->display.hdcp.comp_mutex); mutex_lock(&dev_priv->display.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