drm/i915/hdcp: No HDCP when encoder is't initialized
There can be situation when DP MST connector is created without mst modeset being done, in those cases connector->encoder will be NULL. MST connector->encoder initializes after modeset. Don't enable HDCP in such cases to prevent any crash. Cc: Ramalingam C <ramalingam.c@intel.com> Cc: Juston Li <juston.li@intel.com> Tested-by: Karthik B S <karthik.b.s@intel.com> Reviewed-by: Ramalingam C <ramalingam.c@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210111081120.28417-5-anshuman.gupta@intel.com
This commit is contained in:
parent
0abd3acf8a
commit
6c63e6e14d
|
@ -2106,6 +2106,12 @@ int intel_hdcp_enable(struct intel_connector *connector,
|
|||
if (!hdcp->shim)
|
||||
return -ENOENT;
|
||||
|
||||
if (!connector->encoder) {
|
||||
drm_err(&dev_priv->drm, "[%s:%d] encoder is not initialized\n",
|
||||
connector->base.name, connector->base.base.id);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
mutex_lock(&hdcp->mutex);
|
||||
mutex_lock(&dig_port->hdcp_mutex);
|
||||
drm_WARN_ON(&dev_priv->drm,
|
||||
|
|
Loading…
Reference in New Issue