|
@@ -4975,7 +4975,8 @@ unsigned long i915_gem_obj_offset(struct drm_i915_gem_object *o,
|
|
|
struct drm_i915_private *dev_priv = o->base.dev->dev_private;
|
|
|
struct i915_vma *vma;
|
|
|
|
|
|
- if (vm == &dev_priv->mm.aliasing_ppgtt->base)
|
|
|
+ if (!dev_priv->mm.aliasing_ppgtt ||
|
|
|
+ vm == &dev_priv->mm.aliasing_ppgtt->base)
|
|
|
vm = &dev_priv->gtt.base;
|
|
|
|
|
|
BUG_ON(list_empty(&o->vma_list));
|
|
@@ -5016,7 +5017,8 @@ unsigned long i915_gem_obj_size(struct drm_i915_gem_object *o,
|
|
|
struct drm_i915_private *dev_priv = o->base.dev->dev_private;
|
|
|
struct i915_vma *vma;
|
|
|
|
|
|
- if (vm == &dev_priv->mm.aliasing_ppgtt->base)
|
|
|
+ if (!dev_priv->mm.aliasing_ppgtt ||
|
|
|
+ vm == &dev_priv->mm.aliasing_ppgtt->base)
|
|
|
vm = &dev_priv->gtt.base;
|
|
|
|
|
|
BUG_ON(list_empty(&o->vma_list));
|