* [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
@ 2014-04-22 20:17 Daniel Vetter
2014-04-22 21:22 ` Chris Wilson
2014-04-23 8:37 ` Jani Nikula
0 siblings, 2 replies; 15+ messages in thread
From: Daniel Vetter @ 2014-04-22 20:17 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, Ben Widawsky, Alessandro Suardi
Otherwise we'll end up spamming dmesg on every context creation on snb
with vt-d enabled. This regression was introduced in
commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date: Fri Dec 6 14:11:14 2013 -0800
drm/i915: Reorganize intel_enable_ppgtt
References: https://lkml.org/lkml/2014/4/17/599
Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 0d514ff9b94c..47491c4a1181 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
bool intel_enable_ppgtt(struct drm_device *dev, bool full)
{
- if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
+ if (i915.enable_ppgtt == 0)
return false;
if (i915.enable_ppgtt == 1 && full)
return false;
+ return true;
+}
+
+static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
+{
+ if (enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
+ return 0;
+
+ if (i915.enable_ppgtt == 1)
+ return 1;
+
+ if (i915.enable_ppgtt == 2 && HAS_PPGTT(dev))
+ return 2;
+
#ifdef CONFIG_INTEL_IOMMU
/* Disable ppgtt on SNB if VT-d is on. */
if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped) {
DRM_INFO("Disabling PPGTT because VT-d is on\n");
- return false;
+ return 0;
}
#endif
- /* Full ppgtt disabled by default for now due to issues. */
- if (full)
- return HAS_PPGTT(dev) && (i915.enable_ppgtt == 2);
- else
- return HAS_ALIASING_PPGTT(dev);
+ return HAS_ALIASING_PPGTT(dev) ? 1 : 0;
}
@@ -1157,6 +1167,8 @@ int i915_gem_init_ppgtt(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
struct drm_i915_private *dev_priv = dev->dev_private;
int ret = 0;
+ i915.enable_ppgtt = sanitize_enable_ppgtt(dev, i915.enable_ppgtt);
+
ppgtt->base.dev = dev;
ppgtt->base.scratch = dev_priv->gtt.base.scratch;
--
1.9.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-22 20:17 [PATCH] drm/i915: Sanitize the enable_ppgtt module option once Daniel Vetter
@ 2014-04-22 21:22 ` Chris Wilson
2014-04-23 7:18 ` Daniel Vetter
2014-04-23 8:37 ` Jani Nikula
1 sibling, 1 reply; 15+ messages in thread
From: Chris Wilson @ 2014-04-22 21:22 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development, Ben Widawsky, Alessandro Suardi
On Tue, Apr 22, 2014 at 10:17:50PM +0200, Daniel Vetter wrote:
> Otherwise we'll end up spamming dmesg on every context creation on snb
> with vt-d enabled. This regression was introduced in
>
> commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
> Author: Ben Widawsky <benjamin.widawsky@intel.com>
> Date: Fri Dec 6 14:11:14 2013 -0800
>
> drm/i915: Reorganize intel_enable_ppgtt
I started to consider what would happen if i915.enable_ppgtt changed on
the fly, but then saw that it is 0400 and this pre-initialisation makes
a lot of sense. So maybe we could mention that here:
As the i915.enable_ppgtt is read-only it cannot be changed after the
module is loaded and so we can perform an early sanitization of the
values.
> References: https://lkml.org/lkml/2014/4/17/599
> Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
> Cc: Ben Widawsky <ben@bwidawsk.net>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
If you care to add in some of the comments,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> drivers/gpu/drm/i915/i915_gem_gtt.c | 26 +++++++++++++++++++-------
> 1 file changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 0d514ff9b94c..47491c4a1181 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
>
> bool intel_enable_ppgtt(struct drm_device *dev, bool full)
> {
> - if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
> + if (i915.enable_ppgtt == 0)
> return false;
>
> if (i915.enable_ppgtt == 1 && full)
> return false;
>
> + return true;
> +}
> +
/* i915.enable_ppgtt is read-only, so do an early pass to validate
* the user's requested state against the hardware/driver capabilities.
* We do this now so that we can print out any log messages once rather
* than every time we check intel_enable_ppgtt().
*/
> +static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
> +{
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-22 21:22 ` Chris Wilson
@ 2014-04-23 7:18 ` Daniel Vetter
2014-04-23 17:44 ` Ben Widawsky
0 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2014-04-23 7:18 UTC (permalink / raw)
To: Chris Wilson, Daniel Vetter, Intel Graphics Development,
Ben Widawsky, Alessandro Suardi
On Tue, Apr 22, 2014 at 10:22:15PM +0100, Chris Wilson wrote:
> On Tue, Apr 22, 2014 at 10:17:50PM +0200, Daniel Vetter wrote:
> > Otherwise we'll end up spamming dmesg on every context creation on snb
> > with vt-d enabled. This regression was introduced in
> >
> > commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
> > Author: Ben Widawsky <benjamin.widawsky@intel.com>
> > Date: Fri Dec 6 14:11:14 2013 -0800
> >
> > drm/i915: Reorganize intel_enable_ppgtt
>
> I started to consider what would happen if i915.enable_ppgtt changed on
> the fly, but then saw that it is 0400 and this pre-initialisation makes
> a lot of sense. So maybe we could mention that here:
>
> As the i915.enable_ppgtt is read-only it cannot be changed after the
> module is loaded and so we can perform an early sanitization of the
> values.
>
> > References: https://lkml.org/lkml/2014/4/17/599
> > Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
> > Cc: Ben Widawsky <ben@bwidawsk.net>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> If you care to add in some of the comments,
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Fully agreed on both since the first thing I've checked is that the
enable_ppgtt option is indeed 0400 ;-)
Jani, can you please apply Chris' commit message text and comment when
merging?
-Daniel
>
> > drivers/gpu/drm/i915/i915_gem_gtt.c | 26 +++++++++++++++++++-------
> > 1 file changed, 19 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > index 0d514ff9b94c..47491c4a1181 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > @@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
> >
> > bool intel_enable_ppgtt(struct drm_device *dev, bool full)
> > {
> > - if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
> > + if (i915.enable_ppgtt == 0)
> > return false;
> >
> > if (i915.enable_ppgtt == 1 && full)
> > return false;
> >
> > + return true;
> > +}
> > +
>
> /* i915.enable_ppgtt is read-only, so do an early pass to validate
> * the user's requested state against the hardware/driver capabilities.
> * We do this now so that we can print out any log messages once rather
> * than every time we check intel_enable_ppgtt().
> */
> > +static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
> > +{
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-22 20:17 [PATCH] drm/i915: Sanitize the enable_ppgtt module option once Daniel Vetter
2014-04-22 21:22 ` Chris Wilson
@ 2014-04-23 8:37 ` Jani Nikula
2014-04-23 18:01 ` Daniel Vetter
2014-04-23 18:02 ` Daniel Vetter
1 sibling, 2 replies; 15+ messages in thread
From: Jani Nikula @ 2014-04-23 8:37 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, Ben Widawsky, Alessandro Suardi
On Tue, 22 Apr 2014, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Otherwise we'll end up spamming dmesg on every context creation on snb
> with vt-d enabled. This regression was introduced in
>
> commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
> Author: Ben Widawsky <benjamin.widawsky@intel.com>
> Date: Fri Dec 6 14:11:14 2013 -0800
>
> drm/i915: Reorganize intel_enable_ppgtt
>
> References: https://lkml.org/lkml/2014/4/17/599
> Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
> Cc: Ben Widawsky <ben@bwidawsk.net>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 26 +++++++++++++++++++-------
> 1 file changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 0d514ff9b94c..47491c4a1181 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
>
> bool intel_enable_ppgtt(struct drm_device *dev, bool full)
> {
> - if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
> + if (i915.enable_ppgtt == 0)
> return false;
>
> if (i915.enable_ppgtt == 1 && full)
> return false;
>
> + return true;
> +}
> +
> +static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
> +{
> + if (enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
> + return 0;
> +
> + if (i915.enable_ppgtt == 1)
> + return 1;
> +
> + if (i915.enable_ppgtt == 2 && HAS_PPGTT(dev))
> + return 2;
You should probably either pass enable_ppgtt as parameter and use that
exclusively, or not pass it and refer to i915.enable_ppgtt directly, but
not mix them.
> +
> #ifdef CONFIG_INTEL_IOMMU
> /* Disable ppgtt on SNB if VT-d is on. */
> if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped) {
> DRM_INFO("Disabling PPGTT because VT-d is on\n");
> - return false;
> + return 0;
> }
> #endif
>
> - /* Full ppgtt disabled by default for now due to issues. */
> - if (full)
> - return HAS_PPGTT(dev) && (i915.enable_ppgtt == 2);
> - else
> - return HAS_ALIASING_PPGTT(dev);
> + return HAS_ALIASING_PPGTT(dev) ? 1 : 0;
This conflicts in -fixes due to
commit 8d214b7d9c45f4af23ce41b2bc74f79c44f760de
Author: Ben Widawsky <benjamin.widawsky@linux.intel.com>
Date: Mon Mar 24 18:06:00 2014 -0700
drm/i915: Allow full PPGTT with param override
Should I incorporate that in the conflict resolution for simplicity,
letting 3.15 users also play with full ppgtt with the module param?
BR,
Jani.
> }
>
>
> @@ -1157,6 +1167,8 @@ int i915_gem_init_ppgtt(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
> struct drm_i915_private *dev_priv = dev->dev_private;
> int ret = 0;
>
> + i915.enable_ppgtt = sanitize_enable_ppgtt(dev, i915.enable_ppgtt);
> +
> ppgtt->base.dev = dev;
> ppgtt->base.scratch = dev_priv->gtt.base.scratch;
>
> --
> 1.9.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-23 7:18 ` Daniel Vetter
@ 2014-04-23 17:44 ` Ben Widawsky
0 siblings, 0 replies; 15+ messages in thread
From: Ben Widawsky @ 2014-04-23 17:44 UTC (permalink / raw)
To: Daniel Vetter
Cc: Daniel Vetter, Intel Graphics Development, Alessandro Suardi
On Wed, Apr 23, 2014 at 09:18:03AM +0200, Daniel Vetter wrote:
> On Tue, Apr 22, 2014 at 10:22:15PM +0100, Chris Wilson wrote:
> > On Tue, Apr 22, 2014 at 10:17:50PM +0200, Daniel Vetter wrote:
> > > Otherwise we'll end up spamming dmesg on every context creation on snb
> > > with vt-d enabled. This regression was introduced in
> > >
> > > commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
> > > Author: Ben Widawsky <benjamin.widawsky@intel.com>
> > > Date: Fri Dec 6 14:11:14 2013 -0800
> > >
> > > drm/i915: Reorganize intel_enable_ppgtt
> >
> > I started to consider what would happen if i915.enable_ppgtt changed on
> > the fly, but then saw that it is 0400 and this pre-initialisation makes
> > a lot of sense. So maybe we could mention that here:
> >
> > As the i915.enable_ppgtt is read-only it cannot be changed after the
> > module is loaded and so we can perform an early sanitization of the
> > values.
> >
> > > References: https://lkml.org/lkml/2014/4/17/599
> > > Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
> > > Cc: Ben Widawsky <ben@bwidawsk.net>
> > > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >
> > If you care to add in some of the comments,
> > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Fully agreed on both since the first thing I've checked is that the
> enable_ppgtt option is indeed 0400 ;-)
>
> Jani, can you please apply Chris' commit message text and comment when
> merging?
> -Daniel
Here as well:
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
>
> >
> > > drivers/gpu/drm/i915/i915_gem_gtt.c | 26 +++++++++++++++++++-------
> > > 1 file changed, 19 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > > index 0d514ff9b94c..47491c4a1181 100644
> > > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> > > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > > @@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
> > >
> > > bool intel_enable_ppgtt(struct drm_device *dev, bool full)
> > > {
> > > - if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
> > > + if (i915.enable_ppgtt == 0)
> > > return false;
> > >
> > > if (i915.enable_ppgtt == 1 && full)
> > > return false;
> > >
> > > + return true;
> > > +}
> > > +
> >
> > /* i915.enable_ppgtt is read-only, so do an early pass to validate
> > * the user's requested state against the hardware/driver capabilities.
> > * We do this now so that we can print out any log messages once rather
> > * than every time we check intel_enable_ppgtt().
> > */
> > > +static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
> > > +{
> > -Chris
> >
> > --
> > Chris Wilson, Intel Open Source Technology Centre
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
--
Ben Widawsky, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-23 8:37 ` Jani Nikula
@ 2014-04-23 18:01 ` Daniel Vetter
2014-04-23 18:02 ` Daniel Vetter
1 sibling, 0 replies; 15+ messages in thread
From: Daniel Vetter @ 2014-04-23 18:01 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, Ben Widawsky, Alessandro Suardi
Otherwise we'll end up spamming dmesg on every context creation on snb
with vt-d enabled. This regression was introduced in
commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date: Fri Dec 6 14:11:14 2013 -0800
drm/i915: Reorganize intel_enable_ppgtt
As the i915.enable_ppgtt is read-only it cannot be changed after the
module is loaded and so we can perform an early sanitization of the
values.
v2:
- Add comment and pimp commit message (Chris)
- Use the param consistently (Jani)
References: https://lkml.org/lkml/2014/4/17/599
Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 0d514ff9b94c..70e8892f81a6 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
bool intel_enable_ppgtt(struct drm_device *dev, bool full)
{
- if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
+ if (i915.enable_ppgtt == 0)
return false;
if (i915.enable_ppgtt == 1 && full)
return false;
+ return true;
+}
+
+static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
+{
+ if (enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
+ return 0;
+
+ if (enable_ppgtt == 1)
+ return 1;
+
+ if (enable_ppgtt == 2 && HAS_PPGTT(dev))
+ return 2;
+
#ifdef CONFIG_INTEL_IOMMU
/* Disable ppgtt on SNB if VT-d is on. */
if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped) {
DRM_INFO("Disabling PPGTT because VT-d is on\n");
- return false;
+ return 0;
}
#endif
- /* Full ppgtt disabled by default for now due to issues. */
- if (full)
- return HAS_PPGTT(dev) && (i915.enable_ppgtt == 2);
- else
- return HAS_ALIASING_PPGTT(dev);
+ return HAS_ALIASING_PPGTT(dev) ? 1 : 0;
}
@@ -1157,6 +1167,14 @@ int i915_gem_init_ppgtt(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
struct drm_i915_private *dev_priv = dev->dev_private;
int ret = 0;
+ /*
+ * i915.enable_ppgtt is read-only, so do an early pass to validate the
+ * user's requested state against the hardware/driver capabilities. We
+ * do this now so that we can print out any log messages once rather
+ * than every time we check intel_enable_ppgtt().
+ */
+ i915.enable_ppgtt = sanitize_enable_ppgtt(dev, i915.enable_ppgtt);
+
ppgtt->base.dev = dev;
ppgtt->base.scratch = dev_priv->gtt.base.scratch;
--
1.9.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-23 8:37 ` Jani Nikula
2014-04-23 18:01 ` Daniel Vetter
@ 2014-04-23 18:02 ` Daniel Vetter
2014-04-24 10:45 ` Jani Nikula
1 sibling, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2014-04-23 18:02 UTC (permalink / raw)
To: Jani Nikula
Cc: Daniel Vetter, Intel Graphics Development, Ben Widawsky,
Alessandro Suardi
On Wed, Apr 23, 2014 at 11:37:46AM +0300, Jani Nikula wrote:
> On Tue, 22 Apr 2014, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Otherwise we'll end up spamming dmesg on every context creation on snb
> > with vt-d enabled. This regression was introduced in
> >
> > commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
> > Author: Ben Widawsky <benjamin.widawsky@intel.com>
> > Date: Fri Dec 6 14:11:14 2013 -0800
> >
> > drm/i915: Reorganize intel_enable_ppgtt
> >
> > References: https://lkml.org/lkml/2014/4/17/599
> > Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
> > Cc: Ben Widawsky <ben@bwidawsk.net>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> > drivers/gpu/drm/i915/i915_gem_gtt.c | 26 +++++++++++++++++++-------
> > 1 file changed, 19 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > index 0d514ff9b94c..47491c4a1181 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > @@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
> >
> > bool intel_enable_ppgtt(struct drm_device *dev, bool full)
> > {
> > - if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
> > + if (i915.enable_ppgtt == 0)
> > return false;
> >
> > if (i915.enable_ppgtt == 1 && full)
> > return false;
> >
> > + return true;
> > +}
> > +
> > +static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
> > +{
> > + if (enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
> > + return 0;
> > +
> > + if (i915.enable_ppgtt == 1)
> > + return 1;
> > +
> > + if (i915.enable_ppgtt == 2 && HAS_PPGTT(dev))
> > + return 2;
>
> You should probably either pass enable_ppgtt as parameter and use that
> exclusively, or not pass it and refer to i915.enable_ppgtt directly, but
> not mix them.
New patch on its way with Chris' comments also applied.
>
> > +
> > #ifdef CONFIG_INTEL_IOMMU
> > /* Disable ppgtt on SNB if VT-d is on. */
> > if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped) {
> > DRM_INFO("Disabling PPGTT because VT-d is on\n");
> > - return false;
> > + return 0;
> > }
> > #endif
> >
> > - /* Full ppgtt disabled by default for now due to issues. */
> > - if (full)
> > - return HAS_PPGTT(dev) && (i915.enable_ppgtt == 2);
> > - else
> > - return HAS_ALIASING_PPGTT(dev);
> > + return HAS_ALIASING_PPGTT(dev) ? 1 : 0;
>
>
> This conflicts in -fixes due to
> commit 8d214b7d9c45f4af23ce41b2bc74f79c44f760de
> Author: Ben Widawsky <benjamin.widawsky@linux.intel.com>
> Date: Mon Mar 24 18:06:00 2014 -0700
>
> drm/i915: Allow full PPGTT with param override
>
> Should I incorporate that in the conflict resolution for simplicity,
> letting 3.15 users also play with full ppgtt with the module param?
Yeah I guess it's easiest to just cherry-pick that one to -fixes, too.
-Daniel
>
>
> BR,
> Jani.
>
>
> > }
> >
> >
> > @@ -1157,6 +1167,8 @@ int i915_gem_init_ppgtt(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
> > struct drm_i915_private *dev_priv = dev->dev_private;
> > int ret = 0;
> >
> > + i915.enable_ppgtt = sanitize_enable_ppgtt(dev, i915.enable_ppgtt);
> > +
> > ppgtt->base.dev = dev;
> > ppgtt->base.scratch = dev_priv->gtt.base.scratch;
> >
> > --
> > 1.9.2
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Jani Nikula, Intel Open Source Technology Center
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-23 18:02 ` Daniel Vetter
@ 2014-04-24 10:45 ` Jani Nikula
2014-04-25 13:11 ` Jani Nikula
0 siblings, 1 reply; 15+ messages in thread
From: Jani Nikula @ 2014-04-24 10:45 UTC (permalink / raw)
To: Daniel Vetter
Cc: Daniel Vetter, Intel Graphics Development, Ben Widawsky,
Alessandro Suardi
On Wed, 23 Apr 2014, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Apr 23, 2014 at 11:37:46AM +0300, Jani Nikula wrote:
>> On Tue, 22 Apr 2014, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>> > Otherwise we'll end up spamming dmesg on every context creation on snb
>> > with vt-d enabled. This regression was introduced in
>> >
>> > commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
>> > Author: Ben Widawsky <benjamin.widawsky@intel.com>
>> > Date: Fri Dec 6 14:11:14 2013 -0800
>> >
>> > drm/i915: Reorganize intel_enable_ppgtt
>> >
>> > References: https://lkml.org/lkml/2014/4/17/599
>> > Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
>> > Cc: Ben Widawsky <ben@bwidawsk.net>
>> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>> > ---
>> > drivers/gpu/drm/i915/i915_gem_gtt.c | 26 +++++++++++++++++++-------
>> > 1 file changed, 19 insertions(+), 7 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
>> > index 0d514ff9b94c..47491c4a1181 100644
>> > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
>> > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
>> > @@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
>> >
>> > bool intel_enable_ppgtt(struct drm_device *dev, bool full)
>> > {
>> > - if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
>> > + if (i915.enable_ppgtt == 0)
>> > return false;
>> >
>> > if (i915.enable_ppgtt == 1 && full)
>> > return false;
>> >
>> > + return true;
>> > +}
>> > +
>> > +static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
>> > +{
>> > + if (enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
>> > + return 0;
>> > +
>> > + if (i915.enable_ppgtt == 1)
>> > + return 1;
>> > +
>> > + if (i915.enable_ppgtt == 2 && HAS_PPGTT(dev))
>> > + return 2;
>>
>> You should probably either pass enable_ppgtt as parameter and use that
>> exclusively, or not pass it and refer to i915.enable_ppgtt directly, but
>> not mix them.
>
> New patch on its way with Chris' comments also applied.
>>
>> > +
>> > #ifdef CONFIG_INTEL_IOMMU
>> > /* Disable ppgtt on SNB if VT-d is on. */
>> > if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped) {
>> > DRM_INFO("Disabling PPGTT because VT-d is on\n");
>> > - return false;
>> > + return 0;
>> > }
>> > #endif
>> >
>> > - /* Full ppgtt disabled by default for now due to issues. */
>> > - if (full)
>> > - return HAS_PPGTT(dev) && (i915.enable_ppgtt == 2);
>> > - else
>> > - return HAS_ALIASING_PPGTT(dev);
>> > + return HAS_ALIASING_PPGTT(dev) ? 1 : 0;
>>
>>
>> This conflicts in -fixes due to
>> commit 8d214b7d9c45f4af23ce41b2bc74f79c44f760de
>> Author: Ben Widawsky <benjamin.widawsky@linux.intel.com>
>> Date: Mon Mar 24 18:06:00 2014 -0700
>>
>> drm/i915: Allow full PPGTT with param override
>>
>> Should I incorporate that in the conflict resolution for simplicity,
>> letting 3.15 users also play with full ppgtt with the module param?
>
> Yeah I guess it's easiest to just cherry-pick that one to -fixes, too.
> -Daniel
Pushed v2 to -fixes, along with "drm/i915: Allow full PPGTT with param
override". Thanks for the patch and review.
BR,
Jani.
>
>>
>>
>> BR,
>> Jani.
>>
>>
>> > }
>> >
>> >
>> > @@ -1157,6 +1167,8 @@ int i915_gem_init_ppgtt(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)
>> > struct drm_i915_private *dev_priv = dev->dev_private;
>> > int ret = 0;
>> >
>> > + i915.enable_ppgtt = sanitize_enable_ppgtt(dev, i915.enable_ppgtt);
>> > +
>> > ppgtt->base.dev = dev;
>> > ppgtt->base.scratch = dev_priv->gtt.base.scratch;
>> >
>> > --
>> > 1.9.2
>> >
>> > _______________________________________________
>> > Intel-gfx mailing list
>> > Intel-gfx@lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>> --
>> Jani Nikula, Intel Open Source Technology Center
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-24 10:45 ` Jani Nikula
@ 2014-04-25 13:11 ` Jani Nikula
0 siblings, 0 replies; 15+ messages in thread
From: Jani Nikula @ 2014-04-25 13:11 UTC (permalink / raw)
To: Daniel Vetter
Cc: Daniel Vetter, Intel Graphics Development, Ben Widawsky,
Alessandro Suardi
On Thu, 24 Apr 2014, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Wed, 23 Apr 2014, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Wed, Apr 23, 2014 at 11:37:46AM +0300, Jani Nikula wrote:
>>> On Tue, 22 Apr 2014, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>>> > Otherwise we'll end up spamming dmesg on every context creation on snb
>>> > with vt-d enabled. This regression was introduced in
>>> >
>>> > commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
>>> > Author: Ben Widawsky <benjamin.widawsky@intel.com>
>>> > Date: Fri Dec 6 14:11:14 2013 -0800
>>> >
>>> > drm/i915: Reorganize intel_enable_ppgtt
>>> >
>>> > References: https://lkml.org/lkml/2014/4/17/599
>>> > Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
>>> > Cc: Ben Widawsky <ben@bwidawsk.net>
>>> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>>> > ---
>>> > drivers/gpu/drm/i915/i915_gem_gtt.c | 26 +++++++++++++++++++-------
>>> > 1 file changed, 19 insertions(+), 7 deletions(-)
>>> >
>>> > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
>>> > index 0d514ff9b94c..47491c4a1181 100644
>>> > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
>>> > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
>>> > @@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
>>> >
>>> > bool intel_enable_ppgtt(struct drm_device *dev, bool full)
>>> > {
>>> > - if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
>>> > + if (i915.enable_ppgtt == 0)
>>> > return false;
>>> >
>>> > if (i915.enable_ppgtt == 1 && full)
>>> > return false;
>>> >
>>> > + return true;
>>> > +}
>>> > +
>>> > +static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
>>> > +{
>>> > + if (enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
>>> > + return 0;
>>> > +
>>> > + if (i915.enable_ppgtt == 1)
>>> > + return 1;
>>> > +
>>> > + if (i915.enable_ppgtt == 2 && HAS_PPGTT(dev))
>>> > + return 2;
>>>
>>> You should probably either pass enable_ppgtt as parameter and use that
>>> exclusively, or not pass it and refer to i915.enable_ppgtt directly, but
>>> not mix them.
>>
>> New patch on its way with Chris' comments also applied.
>>>
>>> > +
>>> > #ifdef CONFIG_INTEL_IOMMU
>>> > /* Disable ppgtt on SNB if VT-d is on. */
>>> > if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped) {
>>> > DRM_INFO("Disabling PPGTT because VT-d is on\n");
>>> > - return false;
>>> > + return 0;
>>> > }
>>> > #endif
>>> >
>>> > - /* Full ppgtt disabled by default for now due to issues. */
>>> > - if (full)
>>> > - return HAS_PPGTT(dev) && (i915.enable_ppgtt == 2);
>>> > - else
>>> > - return HAS_ALIASING_PPGTT(dev);
>>> > + return HAS_ALIASING_PPGTT(dev) ? 1 : 0;
>>>
>>>
>>> This conflicts in -fixes due to
>>> commit 8d214b7d9c45f4af23ce41b2bc74f79c44f760de
>>> Author: Ben Widawsky <benjamin.widawsky@linux.intel.com>
>>> Date: Mon Mar 24 18:06:00 2014 -0700
>>>
>>> drm/i915: Allow full PPGTT with param override
>>>
>>> Should I incorporate that in the conflict resolution for simplicity,
>>> letting 3.15 users also play with full ppgtt with the module param?
>>
>> Yeah I guess it's easiest to just cherry-pick that one to -fixes, too.
>> -Daniel
>
> Pushed v2 to -fixes, along with "drm/i915: Allow full PPGTT with param
> override". Thanks for the patch and review.
And yanked out again due to [1]. Back to the drawing board. Please also
add a ppgtt sanity check BUG_ON before returning true from
intel_enable_ppgtt().
BR,
Jani.
[1] https://bugs.freedesktop.org/show_bug.cgi?id=77916
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
@ 2014-04-29 9:53 Daniel Vetter
2014-04-29 10:44 ` Chris Wilson
0 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2014-04-29 9:53 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, Ben Widawsky, Alessandro Suardi
Otherwise we'll end up spamming dmesg on every context creation on snb
with vt-d enabled. This regression was introduced in
commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date: Fri Dec 6 14:11:14 2013 -0800
drm/i915: Reorganize intel_enable_ppgtt
As the i915.enable_ppgtt is read-only it cannot be changed after the
module is loaded and so we can perform an early sanitization of the
values.
v2:
- Add comment and pimp commit message (Chris)
- Use the param consistently (Jani)
v3:
- Fix init sequence on pre-gen6 by moving the sanitize_ppgtt call to
gtt_init. Fixes boot hangs on pre-gen6.
- Add a debug output for the sanitize ppgtt mode.
References: https://lkml.org/lkml/2014/4/17/599
Rererences: https://bugs.freedesktop.org/show_bug.cgi?id=77916
Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 0d514ff9b94c..be504c1443ac 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -34,25 +34,35 @@ static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
bool intel_enable_ppgtt(struct drm_device *dev, bool full)
{
- if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
+ if (i915.enable_ppgtt == 0)
return false;
if (i915.enable_ppgtt == 1 && full)
return false;
+ return true;
+}
+
+static int sanitize_enable_ppgtt(struct drm_device *dev, int enable_ppgtt)
+{
+ if (enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
+ return 0;
+
+ if (enable_ppgtt == 1)
+ return 1;
+
+ if (enable_ppgtt == 2 && HAS_PPGTT(dev))
+ return 2;
+
#ifdef CONFIG_INTEL_IOMMU
/* Disable ppgtt on SNB if VT-d is on. */
if (INTEL_INFO(dev)->gen == 6 && intel_iommu_gfx_mapped) {
DRM_INFO("Disabling PPGTT because VT-d is on\n");
- return false;
+ return 0;
}
#endif
- /* Full ppgtt disabled by default for now due to issues. */
- if (full)
- return HAS_PPGTT(dev) && (i915.enable_ppgtt == 2);
- else
- return HAS_ALIASING_PPGTT(dev);
+ return HAS_ALIASING_PPGTT(dev) ? 1 : 0;
}
@@ -1966,6 +1976,14 @@ int i915_gem_gtt_init(struct drm_device *dev)
if (intel_iommu_gfx_mapped)
DRM_INFO("VT-d active for gfx access\n");
#endif
+ /*
+ * i915.enable_ppgtt is read-only, so do an early pass to validate the
+ * user's requested state against the hardware/driver capabilities. We
+ * do this now so that we can print out any log messages once rather
+ * than every time we check intel_enable_ppgtt().
+ */
+ i915.enable_ppgtt = sanitize_enable_ppgtt(dev, i915.enable_ppgtt);
+ DRM_DEBUG_DRIVER("ppgtt mode: %i\n", i915.enable_ppgtt);
return 0;
}
--
1.9.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-29 9:53 Daniel Vetter
@ 2014-04-29 10:44 ` Chris Wilson
2014-04-29 12:23 ` Alessandro Suardi
2014-04-29 13:27 ` Jani Nikula
0 siblings, 2 replies; 15+ messages in thread
From: Chris Wilson @ 2014-04-29 10:44 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development, Ben Widawsky, Alessandro Suardi
On Tue, Apr 29, 2014 at 11:53:58AM +0200, Daniel Vetter wrote:
> Otherwise we'll end up spamming dmesg on every context creation on snb
> with vt-d enabled. This regression was introduced in
>
> commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
> Author: Ben Widawsky <benjamin.widawsky@intel.com>
> Date: Fri Dec 6 14:11:14 2013 -0800
>
> drm/i915: Reorganize intel_enable_ppgtt
>
> As the i915.enable_ppgtt is read-only it cannot be changed after the
> module is loaded and so we can perform an early sanitization of the
> values.
>
> v2:
> - Add comment and pimp commit message (Chris)
> - Use the param consistently (Jani)
>
> v3:
> - Fix init sequence on pre-gen6 by moving the sanitize_ppgtt call to
> gtt_init. Fixes boot hangs on pre-gen6.
> - Add a debug output for the sanitize ppgtt mode.
>
> References: https://lkml.org/lkml/2014/4/17/599
> Rererences: https://bugs.freedesktop.org/show_bug.cgi?id=77916
> Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
> Cc: Ben Widawsky <ben@bwidawsk.net>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
I am pretty sure we only call i915_gem_gtt_init() once during driver
load... So let's try that r-b again.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-29 10:44 ` Chris Wilson
@ 2014-04-29 12:23 ` Alessandro Suardi
2014-04-29 14:06 ` Daniel Vetter
2014-04-29 13:27 ` Jani Nikula
1 sibling, 1 reply; 15+ messages in thread
From: Alessandro Suardi @ 2014-04-29 12:23 UTC (permalink / raw)
To: Chris Wilson, Daniel Vetter, Intel Graphics Development,
Alessandro Suardi, Ben Widawsky
On Tue, Apr 29, 2014 at 12:44 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Tue, Apr 29, 2014 at 11:53:58AM +0200, Daniel Vetter wrote:
>> Otherwise we'll end up spamming dmesg on every context creation on snb
>> with vt-d enabled. This regression was introduced in
>>
>> commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
>> Author: Ben Widawsky <benjamin.widawsky@intel.com>
>> Date: Fri Dec 6 14:11:14 2013 -0800
>>
>> drm/i915: Reorganize intel_enable_ppgtt
>>
>> As the i915.enable_ppgtt is read-only it cannot be changed after the
>> module is loaded and so we can perform an early sanitization of the
>> values.
>>
>> v2:
>> - Add comment and pimp commit message (Chris)
>> - Use the param consistently (Jani)
>>
>> v3:
>> - Fix init sequence on pre-gen6 by moving the sanitize_ppgtt call to
>> gtt_init. Fixes boot hangs on pre-gen6.
>> - Add a debug output for the sanitize ppgtt mode.
>>
>> References: https://lkml.org/lkml/2014/4/17/599
>> Rererences: https://bugs.freedesktop.org/show_bug.cgi?id=77916
>> Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
>> Cc: Ben Widawsky <ben@bwidawsk.net>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> I am pretty sure we only call i915_gem_gtt_init() once during driver
> load... So let's try that r-b again.
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris
I'd like to add my Tested-By, but this patch doesn't apply cleanly to
3.15-rc3 - is there any prerequisite patch on top of -rc3 or should I
use a git tree to test this fix ?
Offtopic, this email has a tiny typo (Rererences in the freedesktop
bug ID line), just in case git actually stores that kind of metadata :)
thanks,
--alessandro
"don't underestimate the things that I will do"
(Adele, "Rolling In The Deep")
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-29 10:44 ` Chris Wilson
2014-04-29 12:23 ` Alessandro Suardi
@ 2014-04-29 13:27 ` Jani Nikula
1 sibling, 0 replies; 15+ messages in thread
From: Jani Nikula @ 2014-04-29 13:27 UTC (permalink / raw)
To: Chris Wilson, Daniel Vetter
Cc: Intel Graphics Development, Ben Widawsky, Alessandro Suardi
On Tue, 29 Apr 2014, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Tue, Apr 29, 2014 at 11:53:58AM +0200, Daniel Vetter wrote:
>> Otherwise we'll end up spamming dmesg on every context creation on snb
>> with vt-d enabled. This regression was introduced in
>>
>> commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
>> Author: Ben Widawsky <benjamin.widawsky@intel.com>
>> Date: Fri Dec 6 14:11:14 2013 -0800
>>
>> drm/i915: Reorganize intel_enable_ppgtt
>>
>> As the i915.enable_ppgtt is read-only it cannot be changed after the
>> module is loaded and so we can perform an early sanitization of the
>> values.
>>
>> v2:
>> - Add comment and pimp commit message (Chris)
>> - Use the param consistently (Jani)
>>
>> v3:
>> - Fix init sequence on pre-gen6 by moving the sanitize_ppgtt call to
>> gtt_init. Fixes boot hangs on pre-gen6.
>> - Add a debug output for the sanitize ppgtt mode.
>>
>> References: https://lkml.org/lkml/2014/4/17/599
>> Rererences: https://bugs.freedesktop.org/show_bug.cgi?id=77916
>> Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
>> Cc: Ben Widawsky <ben@bwidawsk.net>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> I am pretty sure we only call i915_gem_gtt_init() once during driver
> load... So let's try that r-b again.
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Pushed to -fixes, thanks for the patch and review.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-29 12:23 ` Alessandro Suardi
@ 2014-04-29 14:06 ` Daniel Vetter
2014-04-29 15:48 ` Jani Nikula
0 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2014-04-29 14:06 UTC (permalink / raw)
To: Alessandro Suardi; +Cc: Daniel Vetter, Intel Graphics Development, Ben Widawsky
On Tue, Apr 29, 2014 at 02:23:56PM +0200, Alessandro Suardi wrote:
> On Tue, Apr 29, 2014 at 12:44 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > On Tue, Apr 29, 2014 at 11:53:58AM +0200, Daniel Vetter wrote:
> >> Otherwise we'll end up spamming dmesg on every context creation on snb
> >> with vt-d enabled. This regression was introduced in
> >>
> >> commit 246cbfb5fb9a1ca0997fbb135464c1ff5bb9c549
> >> Author: Ben Widawsky <benjamin.widawsky@intel.com>
> >> Date: Fri Dec 6 14:11:14 2013 -0800
> >>
> >> drm/i915: Reorganize intel_enable_ppgtt
> >>
> >> As the i915.enable_ppgtt is read-only it cannot be changed after the
> >> module is loaded and so we can perform an early sanitization of the
> >> values.
> >>
> >> v2:
> >> - Add comment and pimp commit message (Chris)
> >> - Use the param consistently (Jani)
> >>
> >> v3:
> >> - Fix init sequence on pre-gen6 by moving the sanitize_ppgtt call to
> >> gtt_init. Fixes boot hangs on pre-gen6.
> >> - Add a debug output for the sanitize ppgtt mode.
> >>
> >> References: https://lkml.org/lkml/2014/4/17/599
> >> Rererences: https://bugs.freedesktop.org/show_bug.cgi?id=77916
> >> Cc: Alessandro Suardi <alessandro.suardi@gmail.com>
> >> Cc: Ben Widawsky <ben@bwidawsk.net>
> >> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >
> > I am pretty sure we only call i915_gem_gtt_init() once during driver
> > load... So let's try that r-b again.
> > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> > -Chris
>
> I'd like to add my Tested-By, but this patch doesn't apply cleanly to
> 3.15-rc3 - is there any prerequisite patch on top of -rc3 or should I
> use a git tree to test this fix ?
It needs one patch from drm-intel-fixes, probably easiest if you just grab
that git tree. Or grab the relevant patch
http://cgit.freedesktop.org/drm-intel/commit/?id=0f9dc59db6abc475dc23afc077fabbc606b8830f
> Offtopic, this email has a tiny typo (Rererences in the freedesktop
> bug ID line), just in case git actually stores that kind of metadata :)
Jani, can you please rectify this?
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915: Sanitize the enable_ppgtt module option once
2014-04-29 14:06 ` Daniel Vetter
@ 2014-04-29 15:48 ` Jani Nikula
0 siblings, 0 replies; 15+ messages in thread
From: Jani Nikula @ 2014-04-29 15:48 UTC (permalink / raw)
To: Daniel Vetter, Alessandro Suardi
Cc: Daniel Vetter, Intel Graphics Development, Ben Widawsky
On Tue, 29 Apr 2014, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Tue, Apr 29, 2014 at 02:23:56PM +0200, Alessandro Suardi wrote:
>> Offtopic, this email has a tiny typo (Rererences in the freedesktop
>> bug ID line), just in case git actually stores that kind of metadata :)
>
> Jani, can you please rectify this?
Done.
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2014-04-29 16:00 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 20:17 [PATCH] drm/i915: Sanitize the enable_ppgtt module option once Daniel Vetter
2014-04-22 21:22 ` Chris Wilson
2014-04-23 7:18 ` Daniel Vetter
2014-04-23 17:44 ` Ben Widawsky
2014-04-23 8:37 ` Jani Nikula
2014-04-23 18:01 ` Daniel Vetter
2014-04-23 18:02 ` Daniel Vetter
2014-04-24 10:45 ` Jani Nikula
2014-04-25 13:11 ` Jani Nikula
-- strict thread matches above, loose matches on Subject: below --
2014-04-29 9:53 Daniel Vetter
2014-04-29 10:44 ` Chris Wilson
2014-04-29 12:23 ` Alessandro Suardi
2014-04-29 14:06 ` Daniel Vetter
2014-04-29 15:48 ` Jani Nikula
2014-04-29 13:27 ` Jani Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox