[Intel-gfx] [PATCH 2/2] drm/i915: Save some lines of source code in workarounds

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 4 12:01:41 UTC 2019


Quoting Tvrtko Ursulin (2019-01-04 11:40:53)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> No functional or code size change - just notice we can compact the source
> by re-using a single helper for adding workarounds.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_workarounds.c | 32 +++++-------------------
>  1 file changed, 6 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_workarounds.c b/drivers/gpu/drm/i915/intel_workarounds.c
> index ffc96c8b849b..a8161324108d 100644
> --- a/drivers/gpu/drm/i915/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/intel_workarounds.c
> @@ -142,7 +142,8 @@ static void _wa_add(struct i915_wa_list *wal, const struct i915_wa *wa)
>  }
>  
>  static void
> -__wa_add(struct i915_wa_list *wal, i915_reg_t reg, u32 mask, u32 val)
> +wa_write_masked_or(struct i915_wa_list *wal, i915_reg_t reg, u32 mask,
> +                  u32 val)

This looked odd, since I was thinking that __wa_add() remained the
better name for adding the actual i915_wa_list, but __wa_add() is just
perplexingly the wrapper for _wa_add()

For both,
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list