drm/i915: Stash a pointer to the obj's resv in the vma
During execbuf, a mandatory step is that we add this request (this fence) to each object's reservation_object. Inside execbuf, we track the vma, and to add the fence to the reservation_object then means having to first chase the obj, incurring another cache miss. We can reduce the number of cache misses by stashing a pointer to the reservation_object in the vma itself. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170616140525.6394-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -50,6 +50,7 @@ struct i915_vma {
|
||||
struct drm_i915_gem_object *obj;
|
||||
struct i915_address_space *vm;
|
||||
struct drm_i915_fence_reg *fence;
|
||||
struct reservation_object *resv; /** Alias of obj->resv */
|
||||
struct sg_table *pages;
|
||||
void __iomem *iomap;
|
||||
u64 size;
|
||||
@@ -111,8 +112,8 @@ struct i915_vma {
|
||||
/**
|
||||
* Used for performing relocations during execbuffer insertion.
|
||||
*/
|
||||
struct hlist_node exec_node;
|
||||
struct drm_i915_gem_exec_object2 *exec_entry;
|
||||
struct hlist_node exec_node;
|
||||
u32 exec_handle;
|
||||
|
||||
struct i915_gem_context *ctx;
|
||||
|
Reference in New Issue
Block a user