Lines Matching defs:xe

42 static size_t calc_hw_engine_info_size(struct xe_device *xe)
50 for_each_gt(gt, xe, gt_id)
109 query_engine_cycles(struct xe_device *xe,
123 } else if (XE_IOCTL_DBG(xe, query->size != size)) {
139 gt = xe_device_get_gt(xe, eci->gt_id);
181 static int query_engines(struct xe_device *xe,
184 size_t size = calc_hw_engine_info_size(xe);
197 } else if (XE_IOCTL_DBG(xe, query->size != size)) {
205 for_each_gt(gt, xe, gt_id)
230 static size_t calc_mem_regions_size(struct xe_device *xe)
236 if (ttm_manager_type(&xe->ttm, i))
242 static int query_mem_regions(struct xe_device *xe,
245 size_t size = calc_mem_regions_size(xe);
255 } else if (XE_IOCTL_DBG(xe, query->size != size)) {
260 if (XE_IOCTL_DBG(xe, !mem_regions))
263 man = ttm_manager_type(&xe->ttm, XE_PL_TT);
278 man = ttm_manager_type(&xe->ttm, i);
285 xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K ?
313 static int query_config(struct xe_device *xe, struct drm_xe_device_query *query)
325 } else if (XE_IOCTL_DBG(xe, query->size != size)) {
335 xe->info.devid | (xe->info.revid << 16);
336 if (xe_device_get_root_tile(xe)->mem.vram.usable_size)
340 xe->info.vram_flags & XE_VRAM_FLAGS_NEED64K ? SZ_64K : SZ_4K;
341 config->info[DRM_XE_QUERY_CONFIG_VA_BITS] = xe->info.va_bits;
343 xe_exec_queue_device_get_max_priority(xe);
354 static int query_gt_list(struct xe_device *xe, struct drm_xe_device_query *query)
358 xe->info.gt_count * sizeof(struct drm_xe_gt);
367 } else if (XE_IOCTL_DBG(xe, query->size != size)) {
375 gt_list->num_gt = xe->info.gt_count;
377 for_each_gt(gt, xe, id) {
399 if (!IS_DGFX(xe))
404 gt_list->gt_list[id].far_mem_regions = xe->info.mem_region_mask ^
424 static int query_hwconfig(struct xe_device *xe,
427 struct xe_gt *gt = xe_root_mmio_gt(xe);
435 } else if (XE_IOCTL_DBG(xe, query->size != size)) {
454 static size_t calc_topo_query_size(struct xe_device *xe)
456 return xe->info.gt_count *
480 static int query_gt_topology(struct xe_device *xe,
484 size_t size = calc_topo_query_size(xe);
492 } else if (XE_IOCTL_DBG(xe, query->size != size)) {
496 for_each_gt(gt, xe, id) {
525 query_uc_fw_version(struct xe_device *xe, struct drm_xe_device_query *query)
535 } else if (XE_IOCTL_DBG(xe, query->size != size)) {
542 if (XE_IOCTL_DBG(xe, resp.pad || resp.pad2 || resp.reserved))
547 struct xe_guc *guc = &xe->tiles[0].primary_gt->uc.guc;
556 if (MEDIA_VER(xe) >= 13) {
560 for_each_tile(tile, xe, gt_id) {
567 media_gt = xe->tiles[0].primary_gt;
597 static int (* const xe_query_funcs[])(struct xe_device *xe,
611 struct xe_device *xe = to_xe_device(dev);
615 if (XE_IOCTL_DBG(xe, query->extensions) ||
616 XE_IOCTL_DBG(xe, query->reserved[0] || query->reserved[1]))
619 if (XE_IOCTL_DBG(xe, query->query >= ARRAY_SIZE(xe_query_funcs)))
623 if (XE_IOCTL_DBG(xe, !xe_query_funcs[idx]))
626 return xe_query_funcs[idx](xe, query);