Skip to content

Commit 4fc0a3c

Browse files
committed
drm/i915/gvt: set guest display buffer as readonly
We shouldn't allow write for exposed guest display buffer which doesn't make sense. So explicitly set read only flag for display dmabuf allocated object. Fixes: e546e28 ("drm/i915/gvt: Dmabuf support for GVT-g") Cc: Tina Zhang <[email protected]> Acked-by: Tina Zhang <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6d44694 commit 4fc0a3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/i915/gvt/dmabuf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ static struct drm_i915_gem_object *vgpu_create_gem(struct drm_device *dev,
163163
drm_gem_private_object_init(dev, &obj->base,
164164
roundup(info->size, PAGE_SIZE));
165165
i915_gem_object_init(obj, &intel_vgpu_gem_ops, &lock_class);
166+
i915_gem_object_set_readonly(obj);
166167

167168
obj->read_domains = I915_GEM_DOMAIN_GTT;
168169
obj->write_domain = 0;

0 commit comments

Comments
 (0)