mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
drm/i915: Also check view->type for a normal GGTT view
We cannot simply use !view as shorthand for all normal GGTT views as a few callers will always populate a i915_ggtt_view struct and set the type to NORMAL instead. So check for (!view || view->type == NORMAL) inside i915_gem_object_ggtt_pin(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180220134208.24988-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
9171433100
commit
ac87a6fd36
1 changed files with 2 additions and 1 deletions
|
@ -4282,7 +4282,8 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
|
|||
|
||||
lockdep_assert_held(&obj->base.dev->struct_mutex);
|
||||
|
||||
if (!view && flags & PIN_MAPPABLE) {
|
||||
if (flags & PIN_MAPPABLE &&
|
||||
(!view || view->type == I915_GGTT_VIEW_NORMAL)) {
|
||||
/* If the required space is larger than the available
|
||||
* aperture, we will not able to find a slot for the
|
||||
* object and unbinding the object now will be in
|
||||
|
|
Loading…
Add table
Reference in a new issue