diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-02-11 17:01:46 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-19 21:21:13 -0500 |
commit | ab00b3e5210954cbaff9207db874a9f03197e3ba (patch) | |
tree | 68359cf341eb58cefa9d8c91200e6d137ff2007c /include | |
parent | 496818f08a78476abdb307e241911536221239fc (diff) |
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 'include')
-rw-r--r-- | include/drm/drmP.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 8190b9bcc2d9..e5f4ae989abf 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1321,6 +1321,8 @@ void drm_gem_object_free(struct kref *kref); | |||
1321 | struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, | 1321 | struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, |
1322 | size_t size); | 1322 | size_t size); |
1323 | void drm_gem_object_handle_free(struct kref *kref); | 1323 | void drm_gem_object_handle_free(struct kref *kref); |
1324 | void drm_gem_vm_open(struct vm_area_struct *vma); | ||
1325 | void drm_gem_vm_close(struct vm_area_struct *vma); | ||
1324 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); | 1326 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); |
1325 | 1327 | ||
1326 | static inline void | 1328 | static inline void |