• D
    drm/i915: restore ggtt double-bind avoidance · 0a878716
    Daniel Vetter 提交于
    This was accidentally lost in
    
    commit 75d04a37
    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
    
    While at it implement an improved version suggested by Chris which
    avoids the double-bind irrespective of what type of bind is done
    first.
    
    Note that this exact bug was already addressed in
    
    commit d0e30adc
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Wed Jul 29 20:02:48 2015 +0100
    
        drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt
    
    but the problem is still that originally in
    
    commit 0875546c
    Author: Daniel Vetter <daniel.vetter@ffwll.ch>
    Date:   Mon Apr 20 09:04:05 2015 -0700
    
        drm/i915: Fix up the vma aliasing ppgtt binding
    
    if forgotten to take into account there case where we have a
    GLOBAL_BIND before a LOCAL_BIND. This patch here fixes that.
    
    v2: Pimp commit message and revert the partial fix.
    
    v3: Split into two functions to specialize on aliasing_ppgtt y/n.
    
    v4: WARN_ON for paranoia in the init sequence, since the ggtt probe
    and aliasing ppgtt setup are far apart.
    
    v5: Style nits.
    
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Michel Thierry <michel.thierry@intel.com>
    Cc: Mika Kuoppala <mika.kuoppala@intel.com>
    Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
    Link: http://mid.gmane.org/1444911781-32607-1-git-send-email-daniel.vetter@ffwll.chReviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
    0a878716
i915_gem_gtt.c 91.4 KB