Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Nirmoy Das <nirmoy.das@intel.com>
Subject: Re: [PATCH] drm/xe: Allow to compile out debugfs
Date: Thu, 8 Aug 2024 20:30:20 +0000	[thread overview]
Message-ID: <ZrUq3PDVVF+iajOr@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240808171121.2484237-1-lucas.demarchi@intel.com>

On Thu, Aug 08, 2024 at 10:11:21AM -0700, Lucas De Marchi wrote:
> 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 439987f6f471 ("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
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
>  drivers/gpu/drm/xe/Makefile     | 16 +++++++++-------
>  drivers/gpu/drm/xe/xe_debugfs.h |  4 ++++
>  2 files changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
> index 1ff9602a52f6..b846b36a7bfd 100644
> --- a/drivers/gpu/drm/xe/Makefile
> +++ b/drivers/gpu/drm/xe/Makefile
> @@ -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_bo.o \
>  	xe_bo_evict.o \
> -	xe_debugfs.o \
>  	xe_devcoredump.o \
>  	xe_device.o \
>  	xe_device_sysfs.o \
> @@ -46,7 +45,6 @@ xe-y += xe_bb.o \
>  	xe_gt.o \
>  	xe_gt_ccs_mode.o \
>  	xe_gt_clock.o \
> -	xe_gt_debugfs.o \
>  	xe_gt_freq.o \
>  	xe_gt_idle.o \
>  	xe_gt_mcr.o \
> @@ -59,7 +57,6 @@ xe-y += xe_bb.o \
>  	xe_guc_ads.o \
>  	xe_guc_ct.o \
>  	xe_guc_db_mgr.o \
> -	xe_guc_debugfs.o \
>  	xe_guc_hwconfig.o \
>  	xe_guc_id_mgr.o \
>  	xe_guc_klv_helpers.o \
> @@ -71,7 +68,6 @@ xe-y += xe_bb.o \
>  	xe_hw_engine_class_sysfs.o \
>  	xe_hw_fence.o \
>  	xe_huc.o \
> -	xe_huc_debugfs.o \
>  	xe_irq.o \
>  	xe_lrc.o \
>  	xe_migrate.o \
> @@ -107,7 +103,6 @@ xe-y += xe_bb.o \
>  	xe_ttm_vram_mgr.o \
>  	xe_tuning.o \
>  	xe_uc.o \
> -	xe_uc_debugfs.o \
>  	xe_uc_fw.o \
>  	xe_vm.o \
>  	xe_vram.o \
> @@ -124,7 +119,6 @@ xe-$(CONFIG_HWMON) += xe_hwmon.o
>  # graphics virtualization (SR-IOV) support
>  xe-y += \
>  	xe_gt_sriov_vf.o \
> -	xe_gt_sriov_vf_debugfs.o \
>  	xe_guc_relay.o \
>  	xe_memirq.o \
>  	xe_sriov.o
> @@ -133,7 +127,6 @@ xe-$(CONFIG_PCI_IOV) += \
>  	xe_gt_sriov_pf.o \
>  	xe_gt_sriov_pf_config.o \
>  	xe_gt_sriov_pf_control.o \
> -	xe_gt_sriov_pf_debugfs.o \
>  	xe_gt_sriov_pf_monitor.o \
>  	xe_gt_sriov_pf_policy.o \
>  	xe_gt_sriov_pf_service.o \
> @@ -281,6 +274,15 @@ ifeq ($(CONFIG_DRM_FBDEV_EMULATION),y)
>  endif
>  
>  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) += \
>  		i915-display/intel_display_debugfs.o \
>  		i915-display/intel_display_debugfs_params.o \
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.h b/drivers/gpu/drm/xe/xe_debugfs.h
> index 715b8e2e0bd9..17f4c2f1b5e4 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.h
> +++ b/drivers/gpu/drm/xe/xe_debugfs.h
> @@ -8,6 +8,10 @@
>  
>  struct xe_device;
>  
> +#ifdef CONFIG_DEBUG_FS
>  void xe_debugfs_register(struct xe_device *xe);
> +#else
> +static inline void xe_debugfs_register(struct xe_device *xe) { }
> +#endif
>  
>  #endif
> -- 
> 2.43.0
> 

  parent reply	other threads:[~2024-08-08 20:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 17:11 [PATCH] drm/xe: Allow to compile out debugfs Lucas De Marchi
2024-08-08 17:17 ` ✓ CI.Patch_applied: success for " Patchwork
2024-08-08 17:17 ` ✓ CI.checkpatch: " Patchwork
2024-08-08 17:18 ` ✓ CI.KUnit: " Patchwork
2024-08-08 17:30 ` ✓ CI.Build: " Patchwork
2024-08-08 17:32 ` ✓ CI.Hooks: " Patchwork
2024-08-08 17:33 ` ✓ CI.checksparse: " Patchwork
2024-08-08 18:04 ` ✓ CI.BAT: " Patchwork
2024-08-08 19:12 ` ✓ CI.FULL: " Patchwork
2024-08-08 20:30 ` Matthew Brost [this message]
2024-08-08 20:33 ` [PATCH] " Nirmoy Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZrUq3PDVVF+iajOr@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=nirmoy.das@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox