diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2018-09-26 15:38:13 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2018-09-27 15:21:36 +0200 |
commit | cc1e3b796b463c1cb2e8225b456af939b3bf21c3 (patch) | |
tree | b468ed48cd5eb55a7c1494904359a5e3830c40ef | |
parent | fc18afcf5fb2d8776414076d81d907d8be82b362 (diff) | |
download | talos-obmc-linux-cc1e3b796b463c1cb2e8225b456af939b3bf21c3.tar.gz talos-obmc-linux-cc1e3b796b463c1cb2e8225b456af939b3bf21c3.zip |
drm/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-- | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index da341cc6ff47..641b75110dc6 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/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); |