drm/xe/guc: Make creation of SLPC debugfs files conditional
authorAradhya Bhatia <aradhya.bhatia@intel.com>
Fri, 16 May 2025 14:19:02 +0000 (14:19 +0000)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 23 May 2025 07:40:55 +0000 (09:40 +0200)
commite22d7acf9f47b01c9a538f3dac5c8e8d46fbca96
treef3cdbebc16cfc753c18bbafb6541c8b4bb25fab0
parent1faeeb315fdbd005bbc1bc74214e39087971dda9
drm/xe/guc: Make creation of SLPC debugfs files conditional

Platforms that do not support SLPC are exempted from the GuC PC support.
The GuC PC does not get initialized, and neither do its BOs get created.

This causes a problem because the GuC PC debugfs file is still being
created. Whenever the file is attempted to read, it causes a NULL
pointer dereference on the supposed BO of the GuC PC.

So, make the creation of SLPC debugfs files conditional to when SLPC
features are supported.

Fixes: aaab5404b16f ("drm/xe: Introduce GuC PC debugfs")
Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Reviewed-by: Stuart Summers <stuart.summers@intel.com>
Signed-off-by: Aradhya Bhatia <aradhya.bhatia@intel.com>
Link: https://lore.kernel.org/r/20250516141902.5614-1-aradhya.bhatia@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
(cherry picked from commit 17486cf3df5320752cc67ee8bcb2379d1b9de76c)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/xe_guc_debugfs.c