diff options
Diffstat (limited to 'drivers/gpu/drm/xe/xe_guc.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_guc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc.h b/drivers/gpu/drm/xe/xe_guc.h index 3addd8fc674a..d3e49e7fd7c3 100644 --- a/drivers/gpu/drm/xe/xe_guc.h +++ b/drivers/gpu/drm/xe/xe_guc.h @@ -6,6 +6,7 @@ #ifndef _XE_GUC_H_ #define _XE_GUC_H_ +#include "xe_gt.h" #include "xe_guc_types.h" #include "xe_hw_engine_types.h" #include "xe_macros.h" @@ -58,4 +59,14 @@ static inline u16 xe_engine_class_to_guc_class(enum xe_engine_class class) } } +static inline struct xe_gt *guc_to_gt(struct xe_guc *guc) +{ + return container_of(guc, struct xe_gt, uc.guc); +} + +static inline struct xe_device *guc_to_xe(struct xe_guc *guc) +{ + return gt_to_xe(guc_to_gt(guc)); +} + #endif |