diff mbox

drm/i915: Skip i915_swizzle_info in platforms without GPU side swizzle

Message ID 20170628232427.28425-1-michel.thierry@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michel Thierry June 28, 2017, 11:24 p.m. UTC
There's no need to keep reading random registers in i915_swizzle_info if
the platform is not doing GPU side swizzling.

After HSW, swizzling is not used, and the CPU's memory controller
performs all the address swizzling modifications, commit be292e1563ac5b
("drm/i915/bdw: Let the memory controller do all the swizzling").

Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Ville Syrjälä June 29, 2017, 1:05 p.m. UTC | #1
On Wed, Jun 28, 2017 at 04:24:27PM -0700, Michel Thierry wrote:
> There's no need to keep reading random registers in i915_swizzle_info if
> the platform is not doing GPU side swizzling.
> 
> After HSW, swizzling is not used, and the CPU's memory controller
> performs all the address swizzling modifications, commit be292e1563ac5b
> ("drm/i915/bdw: Let the memory controller do all the swizzling").

But BDW still contains the registers and hardware capability no? So
might be a good idea to be able to check that it's not misconfigured.

> 
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 87e13131f6ea..e82f503389fb 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2152,6 +2152,11 @@ static int i915_swizzle_info(struct seq_file *m, void *data)
>  {
>  	struct drm_i915_private *dev_priv = node_to_i915(m->private);
>  
> +	if (INTEL_GEN(dev_priv) >= 8 || IS_VALLEYVIEW(dev_priv)) {
> +		seq_puts(m, "not supported - CPU does all the swizzling\n");
> +		return 0;
> +	}
> +
>  	intel_runtime_pm_get(dev_priv);
>  
>  	seq_printf(m, "bit6 swizzle for X-tiling = %s\n",
> -- 
> 2.11.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson June 29, 2017, 1:07 p.m. UTC | #2
Quoting Ville Syrjälä (2017-06-29 14:05:25)
> On Wed, Jun 28, 2017 at 04:24:27PM -0700, Michel Thierry wrote:
> > There's no need to keep reading random registers in i915_swizzle_info if
> > the platform is not doing GPU side swizzling.
> > 
> > After HSW, swizzling is not used, and the CPU's memory controller
> > performs all the address swizzling modifications, commit be292e1563ac5b
> > ("drm/i915/bdw: Let the memory controller do all the swizzling").
> 
> But BDW still contains the registers and hardware capability no? So
> might be a good idea to be able to check that it's not misconfigured.

Especially in debugfs where it is useful to show both the hw state and
what we thought it should be.
-Chris
Michel Thierry June 29, 2017, 4:55 p.m. UTC | #3
On 6/29/2017 6:07 AM, Chris Wilson wrote:
> Quoting Ville Syrjälä (2017-06-29 14:05:25)
>> On Wed, Jun 28, 2017 at 04:24:27PM -0700, Michel Thierry wrote:
>>> There's no need to keep reading random registers in i915_swizzle_info if
>>> the platform is not doing GPU side swizzling.
>>>
>>> After HSW, swizzling is not used, and the CPU's memory controller
>>> performs all the address swizzling modifications, commit be292e1563ac5b
>>> ("drm/i915/bdw: Let the memory controller do all the swizzling").
>>
>> But BDW still contains the registers and hardware capability no? So
>> might be a good idea to be able to check that it's not misconfigured.
> 
> Especially in debugfs where it is useful to show both the hw state and
> what we thought it should be.

Hi,

Yes, the registers are still there (but this may change). Are you ok if 
I change this to apply only to GEN9+?
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 87e13131f6ea..e82f503389fb 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2152,6 +2152,11 @@  static int i915_swizzle_info(struct seq_file *m, void *data)
 {
 	struct drm_i915_private *dev_priv = node_to_i915(m->private);
 
+	if (INTEL_GEN(dev_priv) >= 8 || IS_VALLEYVIEW(dev_priv)) {
+		seq_puts(m, "not supported - CPU does all the swizzling\n");
+		return 0;
+	}
+
 	intel_runtime_pm_get(dev_priv);
 
 	seq_printf(m, "bit6 swizzle for X-tiling = %s\n",