db8337853b
Avoid waking up the device and taking stale locks if we know that the object is not currently mmapped. This is particularly useful as not many object are actually mmapped and so we can destroy them without waking the device up, and gives us a little more freedom of workqueue ordering during shutdown. v2: Pull the release_mmap() into its single user in freeing the objects, where there can not be any race with a concurrent user of the freed object. Or so one hopes! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>, Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>, Link: https://patchwork.freedesktop.org/patch/msgid/20200702163623.6402-2-chris@chris-wilson.co.uk
33 lines
771 B
C
33 lines
771 B
C
/*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __I915_GEM_MMAN_H__
|
|
#define __I915_GEM_MMAN_H__
|
|
|
|
#include <linux/mm_types.h>
|
|
#include <linux/types.h>
|
|
|
|
struct drm_device;
|
|
struct drm_file;
|
|
struct drm_i915_gem_object;
|
|
struct file;
|
|
struct i915_mmap_offset;
|
|
struct mutex;
|
|
|
|
int i915_gem_mmap_gtt_version(void);
|
|
int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma);
|
|
|
|
int i915_gem_dumb_mmap_offset(struct drm_file *file_priv,
|
|
struct drm_device *dev,
|
|
u32 handle, u64 *offset);
|
|
|
|
void __i915_gem_object_release_mmap_gtt(struct drm_i915_gem_object *obj);
|
|
void i915_gem_object_release_mmap_gtt(struct drm_i915_gem_object *obj);
|
|
|
|
void i915_gem_object_release_mmap_offset(struct drm_i915_gem_object *obj);
|
|
|
|
#endif
|