From: CQ Tang <cq.tang@xxxxxxxxx> drm_mm_insert_node_in_range() treats range_start > range_end as a programmer error, such that we explode in insert_mappable_node. For now simply check for missing aperture on such paths. Signed-off-by: CQ Tang <cq.tang@xxxxxxxxx> Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_gem.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index fd329b6b475c..82daaab022d8 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -337,6 +337,9 @@ i915_gem_gtt_pread(struct drm_i915_gem_object *obj, u64 remain, offset; int ret; + if (!HAS_MAPPABLE_APERTURE(i915)) + return -ENOSPC; + ret = mutex_lock_interruptible(&i915->drm.struct_mutex); if (ret) return ret; @@ -530,6 +533,9 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_gem_object *obj, void __user *user_data; int ret; + if (!HAS_MAPPABLE_APERTURE(i915)) + return -ENOSPC; + ret = mutex_lock_interruptible(&i915->drm.struct_mutex); if (ret) return ret; -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx