Skip to content

Commit d0e30ad

Browse files
ickledanvet
authored andcommitted
drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt
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 75d04a3 [4.2-rc1] Author: Mika Kuoppala <[email protected]> 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 [email protected] 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 <[email protected]> Cc: Michel Thierry <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: Jani Nikula <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent ee0a227 commit d0e30ad

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/gpu/drm/i915/i915_gem_gtt.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,17 @@ static int ggtt_bind_vma(struct i915_vma *vma,
19231923
vma->vm->insert_entries(vma->vm, pages,
19241924
vma->node.start,
19251925
cache_level, pte_flags);
1926+
1927+
/* Note the inconsistency here is due to absence of the
1928+
* aliasing ppgtt on gen4 and earlier. Though we always
1929+
* request PIN_USER for execbuffer (translated to LOCAL_BIND),
1930+
* without the appgtt, we cannot honour that request and so
1931+
* must substitute it with a global binding. Since we do this
1932+
* behind the upper layers back, we need to explicitly set
1933+
* the bound flag ourselves.
1934+
*/
1935+
vma->bound |= GLOBAL_BIND;
1936+
19261937
}
19271938

19281939
if (dev_priv->mm.aliasing_ppgtt && flags & LOCAL_BIND) {

0 commit comments

Comments
 (0)