Commit 99f106ad authored by Suraj Kandpal's avatar Suraj Kandpal Committed by Uma Shankar
Browse files

drm/i915/hdcp: Move checks for gsc health status



Move checks for gsc components required for HDCP 2.2
to work into intel_hdcp_gsc.c. This will also help
with XE refactor on HDCP's side.

Signed-off-by: default avatarSuraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
Signed-off-by: default avatarUma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231009095537.653619-2-suraj.kandpal@intel.com
parent 65002eea
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -173,15 +173,9 @@ bool intel_hdcp2_capable(struct intel_connector *connector)

	/* If MTL+ make sure gsc is loaded and proxy is setup */
	if (intel_hdcp_gsc_cs_required(i915)) {
		struct intel_gt *gt = i915->media_gt;
		struct intel_gsc_uc *gsc = gt ? &gt->uc.gsc : NULL;

		if (!gsc || !intel_uc_fw_is_running(&gsc->fw)) {
			drm_dbg_kms(&i915->drm,
				    "GSC components required for HDCP2.2 are not ready\n");
		if (!intel_hdcp_gsc_check_status(i915))
			return false;
	}
	}

	/* MEI/GSC interface is solid depending on which is used */
	mutex_lock(&i915->display.hdcp.hdcp_mutex);
+14 −0
Original line number Diff line number Diff line
@@ -17,6 +17,20 @@ bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915)
	return DISPLAY_VER(i915) >= 14;
}

bool intel_hdcp_gsc_check_status(struct drm_i915_private *i915)
{
	struct intel_gt *gt = i915->media_gt;
	struct intel_gsc_uc *gsc = gt ? &gt->uc.gsc : NULL;

	if (!gsc || !intel_uc_fw_is_running(&gsc->fw)) {
		drm_dbg_kms(&i915->drm,
			    "GSC components required for HDCP2.2 are not ready\n");
		return false;
	}

	return true;
}

static int
gsc_hdcp_initiate_session(struct device *dev, struct hdcp_port_data *data,
			  struct hdcp2_ake_init *ake_data)
+1 −0
Original line number Diff line number Diff line
@@ -23,5 +23,6 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
				size_t msg_out_len);
int intel_hdcp_gsc_init(struct drm_i915_private *i915);
void intel_hdcp_gsc_fini(struct drm_i915_private *i915);
bool intel_hdcp_gsc_check_status(struct drm_i915_private *i915);

#endif /* __INTEL_HDCP_GCS_H__ */