diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2018-08-23 08:48:17 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2018-08-29 15:33:08 +0200 |
commit | f90abd7aaf4fb40f0b267bc24624183ba3d6eb2f (patch) | |
tree | f34c26b924c5c8a2f86f13d8935dc84d7c4fce59 | |
parent | 9a214c3aeceb8db9d5c0c111b790539344365e43 (diff) |
vmwgfx: Reduce the size of buffer object relocations
With the new allocator this leads to less consumed memory for each
user-space command submission
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
-rw-r--r-- | vmwgfx_execbuf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vmwgfx_execbuf.c b/vmwgfx_execbuf.c index 576f8a6..203d4c0 100644 --- a/vmwgfx_execbuf.c +++ b/vmwgfx_execbuf.c @@ -39,15 +39,17 @@ * struct vmw_relocation - Buffer object relocation * * @head: List head for the command submission context's relocation list + * @vbo: Non ref-counted pointer to buffer object * @mob_loc: Pointer to location for mob id to be modified * @location: Pointer to location for guest pointer to be modified - * @vbo: Non ref-counted pointer to buffer object */ struct vmw_relocation { struct list_head head; - SVGAMobId *mob_loc; - SVGAGuestPtr *location; struct vmw_buffer_object *vbo; + union { + SVGAMobId *mob_loc; + SVGAGuestPtr *location; + }; }; /** @@ -1167,7 +1169,6 @@ static int vmw_translate_mob_ptr(struct vmw_private *dev_priv, goto out_no_reloc; reloc->mob_loc = id; - reloc->location = NULL; reloc->vbo = vmw_bo; ret = vmw_validation_add_bo(sw_context->ctx, vmw_bo, true, false); |