Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Check pat.ops before dumping PAT settings
@ 2024-04-05 14:36 Michal Wajdeczko
  2024-04-05 17:21 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Michal Wajdeczko @ 2024-04-05 14:36 UTC (permalink / raw)
  To: intel-xe

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>
---
 drivers/gpu/drm/xe/xe_pat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_pat.c b/drivers/gpu/drm/xe/xe_pat.c
index 66d8e3dd8237..f0031c2e9818 100644
--- a/drivers/gpu/drm/xe/xe_pat.c
+++ b/drivers/gpu/drm/xe/xe_pat.c
@@ -447,7 +447,7 @@ void xe_pat_dump(struct xe_gt *gt, struct drm_printer *p)
 {
 	struct xe_device *xe = gt_to_xe(gt);
 
-	if (!xe->pat.ops->dump)
+	if (!xe->pat.ops)
 		return;
 
 	xe->pat.ops->dump(gt, p);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-08 11:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 14:36 [PATCH] drm/xe: Check pat.ops before dumping PAT settings Michal Wajdeczko
2024-04-05 17:21 ` ✓ CI.Patch_applied: success for " Patchwork
2024-04-05 17:21 ` ✓ CI.checkpatch: " Patchwork
2024-04-05 17:22 ` ✓ CI.KUnit: " Patchwork
2024-04-05 17:34 ` ✓ CI.Build: " Patchwork
2024-04-05 17:37 ` ✓ CI.Hooks: " Patchwork
2024-04-05 17:39 ` ✓ CI.checksparse: " Patchwork
2024-04-05 18:03 ` ✓ CI.BAT: " Patchwork
2024-04-08  7:23 ` [PATCH] " Piotr Piórkowski
2024-04-08  9:06   ` Michal Wajdeczko
2024-04-08 11:48     ` Piotr Piórkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox