summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.c
diff options
context:
space:
mode:
authorJesse Barnes2009-02-11 23:01:46 +0100
committerDave Airlie2009-02-20 03:21:13 +0100
commitab00b3e5210954cbaff9207db874a9f03197e3ba (patch)
tree68359cf341eb58cefa9d8c91200e6d137ff2007c /drivers/gpu/drm/i915/i915_drv.c
parentdrm/i915: take struct mutex around fb unref (diff)
downloadkernel-qcow2-linux-ab00b3e5210954cbaff9207db874a9f03197e3ba.tar.gz
kernel-qcow2-linux-ab00b3e5210954cbaff9207db874a9f03197e3ba.tar.xz
kernel-qcow2-linux-ab00b3e5210954cbaff9207db874a9f03197e3ba.zip
drm/i915: Keep refs on the object over the lifetime of vmas for GTT mmap.
This fixes potential fault at fault time if the object was unreferenced while the mapping still existed. Now, while the mmap_offset only lives for the lifetime of the object, the object also stays alive while a vma exists that needs it. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index aac12ee31a46..a31cbdbc3c54 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -94,6 +94,8 @@ static int i915_resume(struct drm_device *dev)
static struct vm_operations_struct i915_gem_vm_ops = {
.fault = i915_gem_fault,
+ .open = drm_gem_vm_open,
+ .close = drm_gem_vm_close,
};
static struct drm_driver driver = {