drm/i915: make pool objects read-only
authorMatthew Auld <matthew.auld@intel.com>
Tue, 19 Nov 2019 15:01:54 +0000 (15:01 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 19 Nov 2019 16:46:58 +0000 (16:46 +0000)
For our current users we don't expect pool objects to be writable from
the gpu.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 4f7af1948abc ("drm/i915: Support ro ppgtt mapped cmdparser shadow buffers")
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191119150154.18249-1-matthew.auld@intel.com
drivers/gpu/drm/i915/gt/intel_engine_pool.c

index 3cdbd5f8b5be2094ebe3522009b0340a213e8c5e..3971868183050aee3626d26056e12b33a752d66f 100644 (file)
@@ -104,6 +104,8 @@ node_create(struct intel_engine_pool *pool, size_t sz)
                return ERR_CAST(obj);
        }
 
+       i915_gem_object_set_readonly(obj);
+
        node->obj = obj;
        return node;
 }