On Fri, Mar 20, 2020 at 04:36:38PM +0200, Jani Nikula wrote:
> Prefer drm_dbg() over DRM_DEV_DEBUG_DRIVER() and drm_err() over
> dev_err().
> 
> Signed-off-by: Jani Nikula <jani.nik...@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_wopcm.c | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_wopcm.c 
> b/drivers/gpu/drm/i915/intel_wopcm.c
> index 2bb9f9f9a50a..2186386a45c8 100644
> --- a/drivers/gpu/drm/i915/intel_wopcm.c
> +++ b/drivers/gpu/drm/i915/intel_wopcm.c
> @@ -86,7 +86,7 @@ void intel_wopcm_init_early(struct intel_wopcm *wopcm)
>       else
>               wopcm->size = GEN9_WOPCM_SIZE;
>  
> -     DRM_DEV_DEBUG_DRIVER(i915->drm.dev, "WOPCM: %uK\n", wopcm->size / 1024);
> +     drm_dbg(&i915->drm, "WOPCM: %uK\n", wopcm->size / 1024);
>  }
>  
>  static inline u32 context_reserved_size(struct drm_i915_private *i915)
> @@ -112,7 +112,7 @@ static inline bool gen9_check_dword_gap(struct 
> drm_i915_private *i915,
>       offset = guc_wopcm_base + GEN9_GUC_WOPCM_OFFSET;
>       if (offset > guc_wopcm_size ||
>           (guc_wopcm_size - offset) < sizeof(u32)) {
> -             dev_err(i915->drm.dev,
> +             drm_err(&i915->drm,
>                       "WOPCM: invalid GuC region size: %uK < %uK\n",
>                       guc_wopcm_size / SZ_1K,
>                       (u32)(offset + sizeof(u32)) / SZ_1K);
> @@ -131,7 +131,7 @@ static inline bool gen9_check_huc_fw_fits(struct 
> drm_i915_private *i915,
>        * firmware uploading would fail.
>        */
>       if (huc_fw_size > guc_wopcm_size - GUC_WOPCM_RESERVED) {
> -             dev_err(i915->drm.dev, "WOPCM: no space for %s: %uK < %uK\n",
> +             drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n",
>                       intel_uc_fw_type_repr(INTEL_UC_FW_TYPE_HUC),
>                       (guc_wopcm_size - GUC_WOPCM_RESERVED) / SZ_1K,
>                       huc_fw_size / 1024);
> @@ -166,7 +166,7 @@ static inline bool __check_layout(struct drm_i915_private 
> *i915, u32 wopcm_size,
>  
>       size = wopcm_size - ctx_rsvd;
>       if (unlikely(range_overflows(guc_wopcm_base, guc_wopcm_size, size))) {
> -             dev_err(i915->drm.dev,
> +             drm_err(&i915->drm,
>                       "WOPCM: invalid GuC region layout: %uK + %uK > %uK\n",
>                       guc_wopcm_base / SZ_1K, guc_wopcm_size / SZ_1K,
>                       size / SZ_1K);
> @@ -175,7 +175,7 @@ static inline bool __check_layout(struct drm_i915_private 
> *i915, u32 wopcm_size,
>  
>       size = guc_fw_size + GUC_WOPCM_RESERVED + GUC_WOPCM_STACK_RESERVED;
>       if (unlikely(guc_wopcm_size < size)) {
> -             dev_err(i915->drm.dev, "WOPCM: no space for %s: %uK < %uK\n",
> +             drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n",
>                       intel_uc_fw_type_repr(INTEL_UC_FW_TYPE_GUC),
>                       guc_wopcm_size / SZ_1K, size / SZ_1K);
>               return false;
> @@ -183,7 +183,7 @@ static inline bool __check_layout(struct drm_i915_private 
> *i915, u32 wopcm_size,
>  
>       size = huc_fw_size + WOPCM_RESERVED_SIZE;
>       if (unlikely(guc_wopcm_base < size)) {
> -             dev_err(i915->drm.dev, "WOPCM: no space for %s: %uK < %uK\n",
> +             drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n",
>                       intel_uc_fw_type_repr(INTEL_UC_FW_TYPE_HUC),
>                       guc_wopcm_base / SZ_1K, size / SZ_1K);
>               return false;
> @@ -242,10 +242,8 @@ void intel_wopcm_init(struct intel_wopcm *wopcm)
>               return;
>  
>       if (__wopcm_regs_locked(gt->uncore, &guc_wopcm_base, &guc_wopcm_size)) {
> -             DRM_DEV_DEBUG_DRIVER(i915->drm.dev,
> -                                  "GuC WOPCM is already locked [%uK, %uK)\n",
> -                                  guc_wopcm_base / SZ_1K,
> -                                  guc_wopcm_size / SZ_1K);
> +             drm_dbg(&i915->drm, "GuC WOPCM is already locked [%uK, %uK)\n",
> +                     guc_wopcm_base / SZ_1K, guc_wopcm_size / SZ_1K);
>               goto check;
>       }
>  
> @@ -266,8 +264,8 @@ void intel_wopcm_init(struct intel_wopcm *wopcm)
>       guc_wopcm_size = wopcm->size - ctx_rsvd - guc_wopcm_base;
>       guc_wopcm_size &= GUC_WOPCM_SIZE_MASK;
>  
> -     DRM_DEV_DEBUG_DRIVER(i915->drm.dev, "Calculated GuC WOPCM [%uK, %uK)\n",
> -                          guc_wopcm_base / SZ_1K, guc_wopcm_size / SZ_1K);
> +     drm_dbg(&i915->drm, "Calculated GuC WOPCM [%uK, %uK)\n",
> +             guc_wopcm_base / SZ_1K, guc_wopcm_size / SZ_1K);
>  
>  check:
>       if (__check_layout(i915, wopcm->size, guc_wopcm_base, guc_wopcm_size,
> -- 
> 2.20.1

Reviewed-by: Daniel Vetter <daniel.vet...@ffwll.ch>

> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to