[Intel-gfx] [PATCH 03/11] drm/i915: Split out functions for different kinds of workarounds

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 11 18:25:09 UTC 2017


Quoting Oscar Mateo (2017-10-11 19:15:13)
> There are different kind of workarounds (those that modify registers that
> live in the context image, those that modify global registers, those that
> whitelist registers, etc...) and they have different requirements in terms
> of where they are applied and how. Also, by splitting them apart, it should
> be easier to decide where a new workaround should go.
> 
> v2:
>   - Add multiple MISSING_CASE
>   - Rebased
> 
> Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c          |   3 +
>  drivers/gpu/drm/i915/i915_gem_context.c  |   5 +
>  drivers/gpu/drm/i915/intel_lrc.c         |  10 +-
>  drivers/gpu/drm/i915/intel_ringbuffer.c  |   4 +-
>  drivers/gpu/drm/i915/intel_workarounds.c | 698 +++++++++++++++++++------------
>  drivers/gpu/drm/i915/intel_workarounds.h |   8 +-
>  6 files changed, 444 insertions(+), 284 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index f76890b..119c456 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -35,6 +35,7 @@
>  #include "intel_drv.h"
>  #include "intel_frontbuffer.h"
>  #include "intel_mocs.h"
> +#include "intel_workarounds.h"
>  #include "i915_gemfs.h"
>  #include <linux/dma-fence-array.h>
>  #include <linux/kthread.h>
> @@ -4804,6 +4805,8 @@ int i915_gem_init_hw(struct drm_i915_private *dev_priv)
>                 }
>         }
>  
> +       intel_mmio_workarounds_apply(dev_priv);

Hmm, we still have an overlap with intel_init_clock_gating(). Perusing
those there are several that deserve to be in intel_mmio_wa_apply
instead.

Are we happy with the split between "mmio_workarounds" and "clock_gating"?

So are we looking at intel_display_workarounds, intel_gt_workarounds and
intel_ctx_workarounds?
-Chris


More information about the Intel-gfx mailing list