Lines Matching refs:guc
18 static int send_get_hwconfig(struct xe_guc *guc, u64 ggtt_addr, u32 size) in send_get_hwconfig() argument
27 return xe_guc_mmio_send(guc, action, ARRAY_SIZE(action)); in send_get_hwconfig()
30 static int guc_hwconfig_size(struct xe_guc *guc, u32 *size) in guc_hwconfig_size() argument
32 int ret = send_get_hwconfig(guc, 0, 0); in guc_hwconfig_size()
41 static int guc_hwconfig_copy(struct xe_guc *guc) in guc_hwconfig_copy() argument
43 int ret = send_get_hwconfig(guc, xe_bo_ggtt_addr(guc->hwconfig.bo), in guc_hwconfig_copy()
44 guc->hwconfig.size); in guc_hwconfig_copy()
52 int xe_guc_hwconfig_init(struct xe_guc *guc) in xe_guc_hwconfig_init() argument
54 struct xe_device *xe = guc_to_xe(guc); in xe_guc_hwconfig_init()
55 struct xe_gt *gt = guc_to_gt(guc); in xe_guc_hwconfig_init()
62 if (guc->hwconfig.bo) in xe_guc_hwconfig_init()
75 err = guc_hwconfig_size(guc, &size); in xe_guc_hwconfig_init()
87 guc->hwconfig.bo = bo; in xe_guc_hwconfig_init()
88 guc->hwconfig.size = size; in xe_guc_hwconfig_init()
90 return guc_hwconfig_copy(guc); in xe_guc_hwconfig_init()
93 u32 xe_guc_hwconfig_size(struct xe_guc *guc) in xe_guc_hwconfig_size() argument
95 return !guc->hwconfig.bo ? 0 : guc->hwconfig.size; in xe_guc_hwconfig_size()
98 void xe_guc_hwconfig_copy(struct xe_guc *guc, void *dst) in xe_guc_hwconfig_copy() argument
100 struct xe_device *xe = guc_to_xe(guc); in xe_guc_hwconfig_copy()
102 XE_WARN_ON(!guc->hwconfig.bo); in xe_guc_hwconfig_copy()
104 xe_map_memcpy_from(xe, dst, &guc->hwconfig.bo->vmap, 0, in xe_guc_hwconfig_copy()
105 guc->hwconfig.size); in xe_guc_hwconfig_copy()
108 void xe_guc_hwconfig_dump(struct xe_guc *guc, struct drm_printer *p) in xe_guc_hwconfig_dump() argument
110 size_t size = xe_guc_hwconfig_size(guc); in xe_guc_hwconfig_dump()
129 xe_guc_hwconfig_copy(guc, hwconfig); in xe_guc_hwconfig_dump()
167 int xe_guc_hwconfig_lookup_u32(struct xe_guc *guc, u32 attribute, u32 *val) in xe_guc_hwconfig_lookup_u32() argument
169 size_t size = xe_guc_hwconfig_size(guc); in xe_guc_hwconfig_lookup_u32()
182 xe_guc_hwconfig_copy(guc, hwconfig); in xe_guc_hwconfig_lookup_u32()