mmap_gtt is already covered by a check for aperture presence.
Also add the case to the gem_set_domain IOCTL to avoid this
path for unsupported platforms.

Signed-off-by: Stuart Summers <stuart.summ...@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_domain.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c 
b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
index 9aebcf263191..cf1e221fe27a 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
@@ -112,6 +112,9 @@ i915_gem_object_set_to_gtt_domain(struct 
drm_i915_gem_object *obj, bool write)
 
        assert_object_held(obj);
 
+       if (!i915_ggtt_has_aperture(&i915->ggtt))
+               return -ENODEV;
+
        ret = i915_gem_object_wait(obj,
                                   I915_WAIT_INTERRUPTIBLE |
                                   (write ? I915_WAIT_ALL : 0),
-- 
2.22.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to