Skip to content

Commit 57b34cb

Browse files
tejasuplucasdemarchi
authored andcommitted
drm/xe/mocs: Check if all domains awake
Check if all domains are awake specially for LNCF regs Fixes: 298661c ("drm/xe: Fix MOCS debugfs LNCF readout") Improvements-suggested-by: Himal Prasad Ghimiray <[email protected]> Reviewed-by: Badal Nilawar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Tejas Upadhyay <[email protected]> (cherry picked from commit a383cf2) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent a5806cd commit 57b34cb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/gpu/drm/xe/xe_mocs.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -775,22 +775,23 @@ void xe_mocs_init(struct xe_gt *gt)
775775
void xe_mocs_dump(struct xe_gt *gt, struct drm_printer *p)
776776
{
777777
struct xe_device *xe = gt_to_xe(gt);
778+
enum xe_force_wake_domains domain;
778779
struct xe_mocs_info table;
779780
unsigned int fw_ref, flags;
780781

781782
flags = get_mocs_settings(xe, &table);
782783

784+
domain = flags & HAS_LNCF_MOCS ? XE_FORCEWAKE_ALL : XE_FW_GT;
783785
xe_pm_runtime_get_noresume(xe);
784-
fw_ref = xe_force_wake_get(gt_to_fw(gt),
785-
flags & HAS_LNCF_MOCS ?
786-
XE_FORCEWAKE_ALL : XE_FW_GT);
787-
if (!fw_ref)
786+
fw_ref = xe_force_wake_get(gt_to_fw(gt), domain);
787+
788+
if (!xe_force_wake_ref_has_domain(fw_ref, domain))
788789
goto err_fw;
789790

790791
table.ops->dump(&table, flags, gt, p);
791792

792-
xe_force_wake_put(gt_to_fw(gt), fw_ref);
793793
err_fw:
794+
xe_force_wake_put(gt_to_fw(gt), fw_ref);
794795
xe_pm_runtime_put(xe);
795796
}
796797

0 commit comments

Comments
 (0)