All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Oscar Mateo <oscar.mateo@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 06/11] drm/i915: Save all MMIO WAs and apply them at a later time
Date: Thu, 12 Oct 2017 13:35:10 +0300	[thread overview]
Message-ID: <1507804510.5138.51.camel@linux.intel.com> (raw)
In-Reply-To: <1507745721-4094-7-git-send-email-oscar.mateo@intel.com>

On Wed, 2017-10-11 at 11:15 -0700, Oscar Mateo wrote:
> By doing this, we can dump these workarounds in debugfs for
> validation (which,
> at the moment, we are only able to do for the contexts WAs).
> 
> v2:
>   - Wrong macro used for MMIO set bit masked
>   - Improved naming
>   - Rebased
> 
> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>

<SNIP>

> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1960,12 +1960,16 @@ struct i915_wa_reg {
>  	u32 mask;
>  };
>  
> -#define I915_MAX_WA_REGS 16
> +#define I915_MAX_CTX_WA_REGS 16
> +#define I915_MAX_MMIO_WA_REGS 32
>  
>  struct i915_workarounds {
> -	struct i915_wa_reg ctx_wa_reg[I915_MAX_WA_REGS];
> +	struct i915_wa_reg ctx_wa_reg[I915_MAX_CTX_WA_REGS];
>  	u32 ctx_wa_count;
>  
> +	struct i915_wa_reg mmio_wa_reg[I915_MAX_MMIO_WA_REGS];
> +	u32 mmio_wa_count;
> +
>  	u32 hw_whitelist_count[I915_NUM_ENGINES];
>  };

Could we instead consider a constant structure with platform bitmasks?
If that's not dynamic enough, then a bitmap which is initialized by the
platform bitmasks as a default. So instead of running code to add to
list, make it bit more declarative. Pseudo-code;


struct i915_workaround {
	u16 gen_mask;
	enum {
		I915_WA_CTX,
		I915_WA_MMIO,
		I915_WA_WHITELIST,
	} type;
	u32 reg;
}

... elsewhere in .c file

static const struct i915_workaround i915_workarounds[] = { {
	/* WaSomethingSomewhereUMDFoo:skl */
	.gen_mask = INTEL_GEN_MASK(X, Y),
	.type = I915_WA_CTX,
	.reg = ...
} };

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-10-12 10:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 18:15 [PATCH v2 00/11] Refactor HW workaround code Oscar Mateo
2017-10-11 18:15 ` [PATCH 01/11] drm/i915: No need for RING_MAX_NONPRIV_SLOTS space Oscar Mateo
2017-10-11 18:15 ` [PATCH 02/11] drm/i915: Move a bunch of workaround-related code to its own file Oscar Mateo
2017-10-11 18:15 ` [PATCH 03/11] drm/i915: Split out functions for different kinds of workarounds Oscar Mateo
2017-10-11 18:25   ` Chris Wilson
2017-10-12 12:35     ` Mika Kuoppala
2017-10-11 18:15 ` [PATCH 04/11] drm/i915: Move workarounds from init_clock_gating Oscar Mateo
2017-10-11 18:26   ` Chris Wilson
2017-10-11 18:29   ` Chris Wilson
2017-10-13 20:52     ` Oscar Mateo
2017-10-11 18:35   ` Ville Syrjälä
2017-10-13 20:34     ` Oscar Mateo
2017-10-11 18:15 ` [PATCH 05/11] drm/i915: Rename saved workarounds to make it explicit that they are context WAs Oscar Mateo
2017-10-11 18:15 ` [PATCH 06/11] drm/i915: Save all MMIO WAs and apply them at a later time Oscar Mateo
2017-10-12 10:35   ` Joonas Lahtinen [this message]
2017-10-13 20:49     ` Oscar Mateo
2017-10-16 10:34       ` Joonas Lahtinen
2017-11-03 22:56         ` Oscar Mateo
2017-11-08 11:47           ` Joonas Lahtinen
2017-10-11 18:15 ` [PATCH 07/11] drm/i915: Save all Whitelist " Oscar Mateo
2017-10-11 18:15 ` [PATCH 08/11] drm/i915: Print all workaround types correctly in debugfs Oscar Mateo
2017-10-11 18:41   ` Chris Wilson
2017-10-13 20:51     ` Oscar Mateo
2017-10-11 18:15 ` [PATCH 09/11] drm/i915: Move WA BB stuff to the workarounds file as well Oscar Mateo
2017-10-11 18:15 ` [PATCH 10/11] drm/i915: Document the i915_workarounds file Oscar Mateo
2017-10-11 18:15 ` [PATCH 11/11] drm/i915: Remove Gen9 WAs with no effect Oscar Mateo
2017-10-11 19:55 ` ✗ Fi.CI.BAT: warning for Refactor HW workaround code (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507804510.5138.51.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=oscar.mateo@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.