[Intel-xe] [PATCH v4 6/7] drm/xe: Combine destroy_cb and destroy_work in xe_vma into union
Matthew Brost
matthew.brost at intel.com
Thu Jul 20 15:55:45 UTC 2023
The callback kicks the worker thus mutually exclusive execution,
combining saves a bit of space in xe_vma.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
drivers/gpu/drm/xe/xe_vm_types.h | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h
index 93004b1901e2..0f584bca3020 100644
--- a/drivers/gpu/drm/xe/xe_vm_types.h
+++ b/drivers/gpu/drm/xe/xe_vm_types.h
@@ -61,11 +61,12 @@ struct xe_vma {
struct list_head destroy;
} combined_links;
- /** @destroy_cb: callback to destroy VMA when unbind job is done */
- struct dma_fence_cb destroy_cb;
-
- /** @destroy_work: worker to destroy this BO */
- struct work_struct destroy_work;
+ union {
+ /** @destroy_cb: callback to destroy VMA when unbind job is done */
+ struct dma_fence_cb destroy_cb;
+ /** @destroy_work: worker to destroy this BO */
+ struct work_struct destroy_work;
+ };
/** @userptr: user pointer state */
struct {
--
2.34.1
More information about the Intel-xe
mailing list