[Intel-gfx] [PATCH 3/3] drm/i915/uncore: optimize CONFIG_DRM_I915_DEBUG_MMIO=n more

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Jul 6 10:56:08 UTC 2023


On 04/07/2023 10:48, Jani Nikula wrote:
> While the default for the mmio_debug parameter depends on
> CONFIG_DRM_I915_DEBUG_MMIO, we look it up and include all the code for
> unclaimed reg debugging even when CONFIG_DRM_I915_DEBUG_MMIO=n. Fix it.
> 
> Cc: Lee Shawn C <shawn.c.lee at intel.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
>   drivers/gpu/drm/i915/intel_uncore.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index dfefad5a5fec..da2edde4b6f6 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -1929,7 +1929,8 @@ static inline bool __must_check
>   unclaimed_reg_debug_header(struct intel_uncore *uncore,
>   			   const i915_reg_t reg, const bool read)
>   {
> -	if (likely(!uncore->i915->params.mmio_debug) || !uncore->debug)
> +	if (!IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO) ||
> +	    likely(!uncore->i915->params.mmio_debug) || !uncore->debug)
>   		return false;

But now it would not be possible to enable mmio_debug, if Kconfig 
_default_ is 'n'. What am I missing?

Regards,

Tvrtko

>   
>   	/* interrupts are disabled and re-enabled around uncore->lock usage */


More information about the Intel-gfx mailing list