Skip to content

Commit 99f106a

Browse files
surajk8uma-intel
authored andcommitted
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: Suraj Kandpal <[email protected]> Reviewed-by: Uma Shankar <[email protected]> Signed-off-by: Uma Shankar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 65002ee commit 99f106a

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

drivers/gpu/drm/i915/display/intel_hdcp.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,8 @@ bool intel_hdcp2_capable(struct intel_connector *connector)
173173

174174
/* If MTL+ make sure gsc is loaded and proxy is setup */
175175
if (intel_hdcp_gsc_cs_required(i915)) {
176-
struct intel_gt *gt = i915->media_gt;
177-
struct intel_gsc_uc *gsc = gt ? &gt->uc.gsc : NULL;
178-
179-
if (!gsc || !intel_uc_fw_is_running(&gsc->fw)) {
180-
drm_dbg_kms(&i915->drm,
181-
"GSC components required for HDCP2.2 are not ready\n");
176+
if (!intel_hdcp_gsc_check_status(i915))
182177
return false;
183-
}
184178
}
185179

186180
/* MEI/GSC interface is solid depending on which is used */

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915)
1717
return DISPLAY_VER(i915) >= 14;
1818
}
1919

20+
bool intel_hdcp_gsc_check_status(struct drm_i915_private *i915)
21+
{
22+
struct intel_gt *gt = i915->media_gt;
23+
struct intel_gsc_uc *gsc = gt ? &gt->uc.gsc : NULL;
24+
25+
if (!gsc || !intel_uc_fw_is_running(&gsc->fw)) {
26+
drm_dbg_kms(&i915->drm,
27+
"GSC components required for HDCP2.2 are not ready\n");
28+
return false;
29+
}
30+
31+
return true;
32+
}
33+
2034
static int
2135
gsc_hdcp_initiate_session(struct device *dev, struct hdcp_port_data *data,
2236
struct hdcp2_ake_init *ake_data)

drivers/gpu/drm/i915/display/intel_hdcp_gsc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
2323
size_t msg_out_len);
2424
int intel_hdcp_gsc_init(struct drm_i915_private *i915);
2525
void intel_hdcp_gsc_fini(struct drm_i915_private *i915);
26+
bool intel_hdcp_gsc_check_status(struct drm_i915_private *i915);
2627

2728
#endif /* __INTEL_HDCP_GCS_H__ */

0 commit comments

Comments
 (0)