Skip to content

Commit a918e77

Browse files
committed
drm/xe: Check pat.ops before dumping PAT settings
We may leave pat.ops unset when running on brand new platform or when running as a VF. While the former is unlikely, the latter is valid (future) use case and will cause NPD when someone will try to dump PAT settings by debugfs. It's better to check pointer to pat.ops instead of specific .dump hook, as we have this hook always defined for every .ops variant. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240409105106.1067-2-michal.wajdeczko@intel.com
1 parent 5d66788 commit a918e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/xe/xe_pat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ void xe_pat_dump(struct xe_gt *gt, struct drm_printer *p)
458458
{
459459
struct xe_device *xe = gt_to_xe(gt);
460460

461-
if (!xe->pat.ops->dump)
461+
if (!xe->pat.ops)
462462
return;
463463

464464
xe->pat.ops->dump(gt, p);

0 commit comments

Comments
 (0)