[PATCH -next 06/18] drm/vmwgfx: Reduce the size of buffer object relocations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With the new allocator this leads to less consumed memory for each
user-space command submission

Signed-off-by: Thomas Hellstrom <thellstrom@xxxxxxxxxx>
Reviewed-by: Deepak Rawat <drawat@xxxxxxxxxx>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 9 +++++----
 1 file 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);
-- 
2.14.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux