Skip to content

Commit

Permalink
drm/xe: Combine destroy_cb and destroy_work in xe_vma into union
Browse files Browse the repository at this point in the history
The callback kicks the worker thus mutually exclusive execution,
combining saves a bit of space in xe_vma.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
  • Loading branch information
Matthew Brost authored and Rodrigo Vivi committed Dec 21, 2023
1 parent 63412a5 commit eae553c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/gpu/drm/xe/xe_vm_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit eae553c

Please sign in to comment.