diff options
author | Dave Airlie <airlied@redhat.com> | 2023-05-19 11:19:15 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2023-05-19 11:19:16 +1000 |
commit | 8c5be8a885a59bfe5c74ff03fe3d59717b99deae (patch) | |
tree | dfc951bad9ceb4d1e06935bd45cd39600e57b81c | |
parent | 90facc4d46301c4fb188899627e3e79b597f83bc (diff) | |
parent | 5896f2d363d5cfb7510856c90d5e0ed934a1d340 (diff) | |
download | lwn-8c5be8a885a59bfe5c74ff03fe3d59717b99deae.tar.gz lwn-8c5be8a885a59bfe5c74ff03fe3d59717b99deae.zip |
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: Dave 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
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_hdcp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c index 650232c4892b..b183efab04a1 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -204,8 +204,6 @@ bool intel_hdcp2_capable(struct intel_connector *connector) struct intel_digital_port *dig_port = intel_attached_dig_port(connector); struct drm_i915_private *dev_priv = to_i915(connector->base.dev); struct intel_hdcp *hdcp = &connector->hdcp; - struct intel_gt *gt = dev_priv->media_gt; - struct intel_gsc_uc *gsc = >->uc.gsc; bool capable = false; /* I915 support for HDCP2.2 */ @@ -213,9 +211,13 @@ bool intel_hdcp2_capable(struct intel_connector *connector) return false; /* If MTL+ make sure gsc is loaded and proxy is setup */ - if (intel_hdcp_gsc_cs_required(dev_priv)) - if (!intel_uc_fw_is_running(&gsc->fw)) + if (intel_hdcp_gsc_cs_required(dev_priv)) { + struct intel_gt *gt = dev_priv->media_gt; + struct intel_gsc_uc *gsc = gt ? >->uc.gsc : NULL; + + if (!gsc || !intel_uc_fw_is_running(&gsc->fw)) return false; + } /* MEI/GSC interface is solid depending on which is used */ mutex_lock(&dev_priv->display.hdcp.comp_mutex); |