* [PATCH] drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt
@ 2015-07-29 19:02 Chris Wilson
2015-07-30 14:45 ` Daniel Vetter
2015-07-30 19:57 ` shuang.he
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2015-07-29 19:02 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, Jani Nikula, Mika Kuoppala
If the device does not support the aliasing ppgtt, we must translate
user bind requests (PIN_USER) from LOCAL_BIND to a GLOBAL_BIND. However,
since this is device specific we cannot do this conveniently in the
upper layers and so must manage the vma->bound flags in the backend.
Partial revert of commit 75d04a3773ecee617847de963ae4195d6aa74c28 [4.2-rc1]
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date: Tue Apr 28 17:56:17 2015 +0300
drm/i915/gtt: Allocate va range only if vma is not bound
Note this was spotted by Daniel originally, but we dropped the ball in
getting the fix in before the bug going wild. Sorry all.
Reported-by: Vincent Legoll vincent.legoll@gmail.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91133
References: https://bugs.freedesktop.org/show_bug.cgi?id=90224
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 9d3852c521c7..c0d8e1f5b5c2 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1928,6 +1928,17 @@ static int ggtt_bind_vma(struct i915_vma *vma,
vma->vm->insert_entries(vma->vm, pages,
vma->node.start,
cache_level, pte_flags);
+
+ /* Note the inconsistency here is due to absence of the
+ * aliasing ppgtt on gen4 and earlier. Though we always
+ * request PIN_USER for execbuffer (translated to LOCAL_BIND),
+ * without the appgtt, we cannot honour that request and so
+ * must substitute it with a global binding. Since we do this
+ * behind the upper layers back, we need to explicitly set
+ * the bound flag ourselves.
+ */
+ vma->bound |= GLOBAL_BIND;
+
}
if (dev_priv->mm.aliasing_ppgtt && flags & LOCAL_BIND) {
--
2.4.6
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt
2015-07-29 19:02 [PATCH] drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt Chris Wilson
@ 2015-07-30 14:45 ` Daniel Vetter
2015-07-30 19:57 ` shuang.he
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2015-07-30 14:45 UTC (permalink / raw)
To: Chris Wilson; +Cc: Daniel Vetter, intel-gfx, Jani Nikula, Mika Kuoppala
On Wed, Jul 29, 2015 at 08:02:48PM +0100, Chris Wilson wrote:
> If the device does not support the aliasing ppgtt, we must translate
> user bind requests (PIN_USER) from LOCAL_BIND to a GLOBAL_BIND. However,
> since this is device specific we cannot do this conveniently in the
> upper layers and so must manage the vma->bound flags in the backend.
>
> Partial revert of commit 75d04a3773ecee617847de963ae4195d6aa74c28 [4.2-rc1]
> Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Date: Tue Apr 28 17:56:17 2015 +0300
>
> drm/i915/gtt: Allocate va range only if vma is not bound
>
> Note this was spotted by Daniel originally, but we dropped the ball in
> getting the fix in before the bug going wild. Sorry all.
>
> Reported-by: Vincent Legoll vincent.legoll@gmail.com
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91133
> References: https://bugs.freedesktop.org/show_bug.cgi?id=90224
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
Picked up for -fixes, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 9d3852c521c7..c0d8e1f5b5c2 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1928,6 +1928,17 @@ static int ggtt_bind_vma(struct i915_vma *vma,
> vma->vm->insert_entries(vma->vm, pages,
> vma->node.start,
> cache_level, pte_flags);
> +
> + /* Note the inconsistency here is due to absence of the
> + * aliasing ppgtt on gen4 and earlier. Though we always
> + * request PIN_USER for execbuffer (translated to LOCAL_BIND),
> + * without the appgtt, we cannot honour that request and so
> + * must substitute it with a global binding. Since we do this
> + * behind the upper layers back, we need to explicitly set
> + * the bound flag ourselves.
> + */
> + vma->bound |= GLOBAL_BIND;
> +
> }
>
> if (dev_priv->mm.aliasing_ppgtt && flags & LOCAL_BIND) {
> --
> 2.4.6
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt
2015-07-29 19:02 [PATCH] drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt Chris Wilson
2015-07-30 14:45 ` Daniel Vetter
@ 2015-07-30 19:57 ` shuang.he
1 sibling, 0 replies; 3+ messages in thread
From: shuang.he @ 2015-07-30 19:57 UTC (permalink / raw)
To: shuang.he, julianx.dumez, christophe.sureau, lei.a.liu, intel-gfx,
chris
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6894
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK 297/297 297/297
SNB 315/315 315/315
IVB 342/342 342/342
BYT 282/282 282/282
HSW 378/378 378/378
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-30 19:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 19:02 [PATCH] drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt Chris Wilson
2015-07-30 14:45 ` Daniel Vetter
2015-07-30 19:57 ` shuang.he
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox