It's a noop on DG1, and in the future when need to support other devices
which let us control the coherency, then it should be an immutable
creation time property for the BO. This will likely be controlled
through a new gem_create_ext extension.

Suggested-by: Daniel Vetter <dan...@ffwll.ch>
Signed-off-by: Matthew Auld <matthew.a...@intel.com>
Cc: Thomas Hellström <thomas.hellst...@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
Cc: Jordan Justen <jordan.l.jus...@intel.com>
Cc: Kenneth Graunke <kenn...@whitecape.org>
Cc: Jason Ekstrand <ja...@jlekstrand.net>
Cc: Daniel Vetter <daniel.vet...@ffwll.ch>
Cc: Ramalingam C <ramalinga...@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_domain.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c 
b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
index 7d1400b13429..43004bef55cb 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
@@ -268,6 +268,9 @@ int i915_gem_get_caching_ioctl(struct drm_device *dev, void 
*data,
        struct drm_i915_gem_object *obj;
        int err = 0;
 
+       if (IS_DGFX(to_i915(dev)))
+               return -ENODEV;
+
        rcu_read_lock();
        obj = i915_gem_object_lookup_rcu(file, args->handle);
        if (!obj) {
@@ -303,6 +306,9 @@ int i915_gem_set_caching_ioctl(struct drm_device *dev, void 
*data,
        enum i915_cache_level level;
        int ret = 0;
 
+       if (IS_DGFX(i915))
+               return -ENODEV;
+
        switch (args->caching) {
        case I915_CACHING_NONE:
                level = I915_CACHE_NONE;
-- 
2.26.3

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

Reply via email to