Commit 08b5a479 authored by Lucas De Marchi's avatar Lucas De Marchi

drm/xe: Allow to compile out debugfs

Use a dummy xe_debugfs_register() if debugfs is not enabled and move all
debugfs-related files under `ifeq ($(CONFIG_DEBUG_FS),y)` in the
Makefile. This is similar to what was done for display in
commit 439987f6 ("drm/xe: don't build debugfs files when
CONFIG_DEBUG_FS=n").

This removes the following warning while loading xe with
CONFIG_DEUBG_FS=n:

	xe 0000:03:00.0: [drm] Create GT directory failed
Reviewed-by: default avatarNirmoy Das <nirmoy.das@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240808171121.2484237-1-lucas.demarchi@intel.comSigned-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent d79fdaef
...@@ -28,7 +28,6 @@ $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \ ...@@ -28,7 +28,6 @@ $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \
xe-y += xe_bb.o \ xe-y += xe_bb.o \
xe_bo.o \ xe_bo.o \
xe_bo_evict.o \ xe_bo_evict.o \
xe_debugfs.o \
xe_devcoredump.o \ xe_devcoredump.o \
xe_device.o \ xe_device.o \
xe_device_sysfs.o \ xe_device_sysfs.o \
...@@ -46,7 +45,6 @@ xe-y += xe_bb.o \ ...@@ -46,7 +45,6 @@ xe-y += xe_bb.o \
xe_gt.o \ xe_gt.o \
xe_gt_ccs_mode.o \ xe_gt_ccs_mode.o \
xe_gt_clock.o \ xe_gt_clock.o \
xe_gt_debugfs.o \
xe_gt_freq.o \ xe_gt_freq.o \
xe_gt_idle.o \ xe_gt_idle.o \
xe_gt_mcr.o \ xe_gt_mcr.o \
...@@ -59,7 +57,6 @@ xe-y += xe_bb.o \ ...@@ -59,7 +57,6 @@ xe-y += xe_bb.o \
xe_guc_ads.o \ xe_guc_ads.o \
xe_guc_ct.o \ xe_guc_ct.o \
xe_guc_db_mgr.o \ xe_guc_db_mgr.o \
xe_guc_debugfs.o \
xe_guc_hwconfig.o \ xe_guc_hwconfig.o \
xe_guc_id_mgr.o \ xe_guc_id_mgr.o \
xe_guc_klv_helpers.o \ xe_guc_klv_helpers.o \
...@@ -71,7 +68,6 @@ xe-y += xe_bb.o \ ...@@ -71,7 +68,6 @@ xe-y += xe_bb.o \
xe_hw_engine_class_sysfs.o \ xe_hw_engine_class_sysfs.o \
xe_hw_fence.o \ xe_hw_fence.o \
xe_huc.o \ xe_huc.o \
xe_huc_debugfs.o \
xe_irq.o \ xe_irq.o \
xe_lrc.o \ xe_lrc.o \
xe_migrate.o \ xe_migrate.o \
...@@ -107,7 +103,6 @@ xe-y += xe_bb.o \ ...@@ -107,7 +103,6 @@ xe-y += xe_bb.o \
xe_ttm_vram_mgr.o \ xe_ttm_vram_mgr.o \
xe_tuning.o \ xe_tuning.o \
xe_uc.o \ xe_uc.o \
xe_uc_debugfs.o \
xe_uc_fw.o \ xe_uc_fw.o \
xe_vm.o \ xe_vm.o \
xe_vram.o \ xe_vram.o \
...@@ -124,7 +119,6 @@ xe-$(CONFIG_HWMON) += xe_hwmon.o ...@@ -124,7 +119,6 @@ xe-$(CONFIG_HWMON) += xe_hwmon.o
# graphics virtualization (SR-IOV) support # graphics virtualization (SR-IOV) support
xe-y += \ xe-y += \
xe_gt_sriov_vf.o \ xe_gt_sriov_vf.o \
xe_gt_sriov_vf_debugfs.o \
xe_guc_relay.o \ xe_guc_relay.o \
xe_memirq.o \ xe_memirq.o \
xe_sriov.o xe_sriov.o
...@@ -133,7 +127,6 @@ xe-$(CONFIG_PCI_IOV) += \ ...@@ -133,7 +127,6 @@ xe-$(CONFIG_PCI_IOV) += \
xe_gt_sriov_pf.o \ xe_gt_sriov_pf.o \
xe_gt_sriov_pf_config.o \ xe_gt_sriov_pf_config.o \
xe_gt_sriov_pf_control.o \ xe_gt_sriov_pf_control.o \
xe_gt_sriov_pf_debugfs.o \
xe_gt_sriov_pf_monitor.o \ xe_gt_sriov_pf_monitor.o \
xe_gt_sriov_pf_policy.o \ xe_gt_sriov_pf_policy.o \
xe_gt_sriov_pf_service.o \ xe_gt_sriov_pf_service.o \
...@@ -281,6 +274,15 @@ ifeq ($(CONFIG_DRM_FBDEV_EMULATION),y) ...@@ -281,6 +274,15 @@ ifeq ($(CONFIG_DRM_FBDEV_EMULATION),y)
endif endif
ifeq ($(CONFIG_DEBUG_FS),y) ifeq ($(CONFIG_DEBUG_FS),y)
xe-y += xe_debugfs.o \
xe_gt_debugfs.o \
xe_gt_sriov_vf_debugfs.o \
xe_guc_debugfs.o \
xe_huc_debugfs.o \
xe_uc_debugfs.o
xe-$(CONFIG_PCI_IOV) += xe_gt_sriov_pf_debugfs.o
xe-$(CONFIG_DRM_XE_DISPLAY) += \ xe-$(CONFIG_DRM_XE_DISPLAY) += \
i915-display/intel_display_debugfs.o \ i915-display/intel_display_debugfs.o \
i915-display/intel_display_debugfs_params.o \ i915-display/intel_display_debugfs_params.o \
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
struct xe_device; struct xe_device;
#ifdef CONFIG_DEBUG_FS
void xe_debugfs_register(struct xe_device *xe); void xe_debugfs_register(struct xe_device *xe);
#else
static inline void xe_debugfs_register(struct xe_device *xe) { }
#endif
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment