mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-09-04 00:21:35 +00:00
drm/xe/hdcp: Check GSC structure validity
Sometimes xe_gsc is not initialized when checked at HDCP capability check. Add gsc structure check to avoid null pointer error. Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240722064451.3610512-4-suraj.kandpal@intel.com
This commit is contained in:
parent
d34f4f058e
commit
b4224f6bae
@ -40,10 +40,14 @@ bool intel_hdcp_gsc_check_status(struct xe_device *xe)
|
|||||||
{
|
{
|
||||||
struct xe_tile *tile = xe_device_get_root_tile(xe);
|
struct xe_tile *tile = xe_device_get_root_tile(xe);
|
||||||
struct xe_gt *gt = tile->media_gt;
|
struct xe_gt *gt = tile->media_gt;
|
||||||
|
struct xe_gsc *gsc = >->uc.gsc;
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
|
|
||||||
if (!xe_uc_fw_is_enabled(>->uc.gsc.fw))
|
if (!gsc && !xe_uc_fw_is_enabled(&gsc->fw)) {
|
||||||
|
drm_dbg_kms(&xe->drm,
|
||||||
|
"GSC Components not ready for HDCP2.x\n");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
xe_pm_runtime_get(xe);
|
xe_pm_runtime_get(xe);
|
||||||
if (xe_force_wake_get(gt_to_fw(gt), XE_FW_GSC)) {
|
if (xe_force_wake_get(gt_to_fw(gt), XE_FW_GSC)) {
|
||||||
@ -53,7 +57,7 @@ bool intel_hdcp_gsc_check_status(struct xe_device *xe)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!xe_gsc_proxy_init_done(>->uc.gsc))
|
if (!xe_gsc_proxy_init_done(gsc))
|
||||||
ret = false;
|
ret = false;
|
||||||
|
|
||||||
xe_force_wake_put(gt_to_fw(gt), XE_FW_GSC);
|
xe_force_wake_put(gt_to_fw(gt), XE_FW_GSC);
|
||||||
|
Loading…
Reference in New Issue
Block a user