* [PATCH] drm/i915: Update gen8_ppgtt_info to keep working in full ppgtt
@ 2014-08-08 13:10 Michel Thierry
2014-08-08 13:47 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Michel Thierry @ 2014-08-08 13:10 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter
The driver will no longer initialize the aliasing ppgtt if we have
full ppgtt enabled.
gen8_ppgtt_info uses the aliasing ppgtt or the ppgtt from the
default context. This patch makes it clear.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 8dc82c3..a62ac66 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1995,8 +1995,14 @@ static void gen8_ppgtt_info(struct seq_file *m, struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_engine_cs *ring;
struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
+ struct intel_context *ctx = dev_priv->ring[RCS].default_context;
int unused, i;
+ if (USES_FULL_PPGTT(dev))
+ ppgtt = ctx->ppgtt;
+ else
+ ppgtt = dev_priv->mm.aliasing_ppgtt;
+
if (!ppgtt)
return;
--
2.0.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Update gen8_ppgtt_info to keep working in full ppgtt
2014-08-08 13:10 [PATCH] drm/i915: Update gen8_ppgtt_info to keep working in full ppgtt Michel Thierry
@ 2014-08-08 13:47 ` Daniel Vetter
2014-08-09 0:14 ` Ben Widawsky
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2014-08-08 13:47 UTC (permalink / raw)
To: Michel Thierry; +Cc: Daniel Vetter, intel-gfx
On Fri, Aug 08, 2014 at 02:10:32PM +0100, Michel Thierry wrote:
> The driver will no longer initialize the aliasing ppgtt if we have
> full ppgtt enabled.
>
> gen8_ppgtt_info uses the aliasing ppgtt or the ppgtt from the
> default context. This patch makes it clear.
>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
I actually looked at this one here and decided that ppgtt_info for gen8 is
sufficiently broken so that we don't care. Imo we should refactor it a bit
so that it does the same as the gen6 version, i.e. dump the aliasing ppgtt
or the contexts.
Trying to dump the default ctx ppgtt when full ppgtt is enabled is fairly
usesless since nothing at all will ever use that one.
Best approach is probably to remove the gen8 version and push the GenX
checks down into the actual ppgtt dump functions or something like that.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 8dc82c3..a62ac66 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1995,8 +1995,14 @@ static void gen8_ppgtt_info(struct seq_file *m, struct drm_device *dev)
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct intel_engine_cs *ring;
> struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
> + struct intel_context *ctx = dev_priv->ring[RCS].default_context;
> int unused, i;
>
> + if (USES_FULL_PPGTT(dev))
> + ppgtt = ctx->ppgtt;
> + else
> + ppgtt = dev_priv->mm.aliasing_ppgtt;
> +
> if (!ppgtt)
> return;
>
> --
> 2.0.3
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Update gen8_ppgtt_info to keep working in full ppgtt
2014-08-08 13:47 ` Daniel Vetter
@ 2014-08-09 0:14 ` Ben Widawsky
0 siblings, 0 replies; 3+ messages in thread
From: Ben Widawsky @ 2014-08-09 0:14 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Daniel Vetter, intel-gfx
On Fri, Aug 08, 2014 at 03:47:54PM +0200, Daniel Vetter wrote:
> On Fri, Aug 08, 2014 at 02:10:32PM +0100, Michel Thierry wrote:
> > The driver will no longer initialize the aliasing ppgtt if we have
> > full ppgtt enabled.
> >
> > gen8_ppgtt_info uses the aliasing ppgtt or the ppgtt from the
> > default context. This patch makes it clear.
> >
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>
> I actually looked at this one here and decided that ppgtt_info for gen8 is
> sufficiently broken so that we don't care. Imo we should refactor it a bit
> so that it does the same as the gen6 version, i.e. dump the aliasing ppgtt
> or the contexts.
>
> Trying to dump the default ctx ppgtt when full ppgtt is enabled is fairly
> usesless since nothing at all will ever use that one.
>
> Best approach is probably to remove the gen8 version and push the GenX
> checks down into the actual ppgtt dump functions or something like that.
> -Daniel
I did start down this path here:
http://patchwork.freedesktop.org/patch/25728/ (originally here: http://patchwork.freedesktop.org/patch/22348/)
It also helped with the later addition for dynamic page tables. I would
ask that someone look at fixing that patch to their needs should the
dynamic page table patches ever get merged.
>
> > ---
> > drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index 8dc82c3..a62ac66 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -1995,8 +1995,14 @@ static void gen8_ppgtt_info(struct seq_file *m, struct drm_device *dev)
> > struct drm_i915_private *dev_priv = dev->dev_private;
> > struct intel_engine_cs *ring;
> > struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
> > + struct intel_context *ctx = dev_priv->ring[RCS].default_context;
> > int unused, i;
> >
> > + if (USES_FULL_PPGTT(dev))
> > + ppgtt = ctx->ppgtt;
> > + else
> > + ppgtt = dev_priv->mm.aliasing_ppgtt;
> > +
> > if (!ppgtt)
> > return;
> >
> > --
> > 2.0.3
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ben Widawsky, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-09 0:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08 13:10 [PATCH] drm/i915: Update gen8_ppgtt_info to keep working in full ppgtt Michel Thierry
2014-08-08 13:47 ` Daniel Vetter
2014-08-09 0:14 ` Ben Widawsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox