[PATCH 07/10] drm/i915: switch from drm_debug_printer() to device specific drm_dbg_printer()

Luca Coelho luca at coelho.fi
Tue Jan 30 10:27:55 UTC 2024


On Tue, 2024-01-16 at 15:07 +0200, Jani Nikula wrote:
> Prefer the device specific debug printer.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_driver.c | 3 ++-
>  drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c    | 3 ++-
>  drivers/gpu/drm/i915/gt/intel_reset.c               | 3 ++-
>  drivers/gpu/drm/i915/gt/intel_workarounds.c         | 3 ++-
>  drivers/gpu/drm/i915/gt/selftest_context.c          | 3 ++-
>  drivers/gpu/drm/i915/i915_driver.c                  | 3 ++-
>  6 files changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index ecf9cb74734b..e733f7c4c6c6 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -518,7 +518,8 @@ int intel_display_driver_probe(struct drm_i915_private *i915)
>  
>  void intel_display_driver_register(struct drm_i915_private *i915)
>  {
> -	struct drm_printer p = drm_debug_printer("i915 display info:");
> +	struct drm_printer p = drm_dbg_printer(&i915->drm, DRM_UT_KMS,
> +					       "i915 display info:");
>  
>  	if (!HAS_DISPLAY(i915))
>  		return;
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
> index 1a8e2b7db013..0f6406f0cca0 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
> @@ -96,7 +96,8 @@ static void heartbeat_commit(struct i915_request *rq,
>  static void show_heartbeat(const struct i915_request *rq,
>  			   struct intel_engine_cs *engine)
>  {
> -	struct drm_printer p = drm_debug_printer("heartbeat");
> +	struct drm_printer p = drm_dbg_printer(&rq->i915->drm, DRM_UT_DRIVER,
> +					       "heartbeat");
>  
>  	if (!rq) {
>  		intel_engine_dump(engine, &p,
> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
> index 6801f8b95c53..c8e9aa41fdea 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -1015,7 +1015,8 @@ void intel_gt_set_wedged(struct intel_gt *gt)
>  	mutex_lock(&gt->reset.mutex);
>  
>  	if (GEM_SHOW_DEBUG()) {
> -		struct drm_printer p = drm_debug_printer(__func__);
> +		struct drm_printer p = drm_dbg_printer(&gt->i915->drm,
> +						       DRM_UT_DRIVER, __func__);
>  		struct intel_engine_cs *engine;
>  		enum intel_engine_id id;
>  
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index 270b56fc85e2..e6f48aa967c2 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -1236,7 +1236,8 @@ static void __set_mcr_steering(struct i915_wa_list *wal,
>  
>  static void debug_dump_steering(struct intel_gt *gt)
>  {
> -	struct drm_printer p = drm_debug_printer("MCR Steering:");
> +	struct drm_printer p = drm_dbg_printer(&gt->i915->drm, DRM_UT_DRIVER,
> +					       "MCR Steering:");
>  
>  	if (drm_debug_enabled(DRM_UT_DRIVER))
>  		intel_gt_mcr_report_steering(&p, gt, false);
> diff --git a/drivers/gpu/drm/i915/gt/selftest_context.c b/drivers/gpu/drm/i915/gt/selftest_context.c
> index 47070cba7eb1..12eca750f7d0 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_context.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_context.c
> @@ -285,7 +285,8 @@ static int __live_active_context(struct intel_engine_cs *engine)
>  	intel_engine_pm_flush(engine);
>  
>  	if (intel_engine_pm_is_awake(engine)) {
> -		struct drm_printer p = drm_debug_printer(__func__);
> +		struct drm_printer p = drm_dbg_printer(&engine->i915->drm,
> +						       DRM_UT_DRIVER, __func__);
>  
>  		intel_engine_dump(engine, &p,
>  				  "%s is still awake:%d after idle-barriers\n",
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index a951050f6a75..9ee902d5b72c 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -681,7 +681,8 @@ i915_print_iommu_status(struct drm_i915_private *i915, struct drm_printer *p)
>  static void i915_welcome_messages(struct drm_i915_private *dev_priv)
>  {
>  	if (drm_debug_enabled(DRM_UT_DRIVER)) {
> -		struct drm_printer p = drm_debug_printer("i915 device info:");
> +		struct drm_printer p = drm_dbg_printer(&dev_priv->drm, DRM_UT_DRIVER,
> +						       "device info:");
>  		struct intel_gt *gt;
>  		unsigned int i;
>  

Okay, this are all pretty much the same pattern, so I should have given
a single r-b for the whole series, but now I have only a few left,
so...

Reviewed-by: Luca Coelho <luciano.coelho at intel.com>

--
Cheers,
Luca.


More information about the Intel-xe mailing list