Home
last modified time | relevance | path

Searched refs:xe (Results 1 – 25 of 202) sorted by relevance

123456789

/linux/drivers/gpu/drm/xe/
H A Dxe_device.c87 struct xe_device *xe = to_xe_device(dev); in xe_file_open() local
105 xef->xe = xe; in xe_file_open()
168 struct xe_device *xe = to_xe_device(dev); in xe_file_close() local
174 guard(xe_pm_runtime)(xe); in xe_file_close()
224 struct xe_device *xe = to_xe_device(file_priv->minor->dev); in xe_drm_ioctl() local
227 if (xe_device_wedged(xe)) in xe_drm_ioctl()
230 ACQUIRE(xe_pm_runtime_ioctl, pm)(xe); in xe_drm_ioctl()
242 struct xe_device *xe = to_xe_device(file_priv->minor->dev); in xe_drm_compat_ioctl() local
245 if (xe_device_wedged(xe)) in xe_drm_compat_ioctl()
248 ACQUIRE(xe_pm_runtime_ioctl, pm)(xe); in xe_drm_compat_ioctl()
[all …]
H A Dxe_bo_evict.c15 static int xe_bo_apply_to_pinned(struct xe_device *xe, in xe_bo_apply_to_pinned() argument
24 spin_lock(&xe->pinned.lock); in xe_bo_apply_to_pinned()
32 spin_unlock(&xe->pinned.lock); in xe_bo_apply_to_pinned()
36 spin_lock(&xe->pinned.lock); in xe_bo_apply_to_pinned()
44 spin_unlock(&xe->pinned.lock); in xe_bo_apply_to_pinned()
47 spin_lock(&xe->pinned.lock); in xe_bo_apply_to_pinned()
50 spin_unlock(&xe->pinned.lock); in xe_bo_apply_to_pinned()
64 int xe_bo_notifier_prepare_all_pinned(struct xe_device *xe) in xe_bo_notifier_prepare_all_pinned() argument
68 ret = xe_bo_apply_to_pinned(xe, &xe->pinned.early.kernel_bo_present, in xe_bo_notifier_prepare_all_pinned()
69 &xe->pinned.early.kernel_bo_present, in xe_bo_notifier_prepare_all_pinned()
[all …]
H A Dxe_sriov_pf_migration.c19 static struct xe_sriov_migration_state *pf_pick_migration(struct xe_device *xe, unsigned int vfid) in pf_pick_migration() argument
21 xe_assert(xe, IS_SRIOV_PF(xe)); in pf_pick_migration()
22 xe_assert(xe, vfid <= xe_sriov_pf_get_totalvfs(xe)); in pf_pick_migration()
24 return &xe->sriov.pf.vfs[vfid].migration; in pf_pick_migration()
34 wait_queue_head_t *xe_sriov_pf_migration_waitqueue(struct xe_device *xe, unsigned int vfid) in xe_sriov_pf_migration_waitqueue() argument
36 return &pf_pick_migration(xe, vfid)->wq; in xe_sriov_pf_migration_waitqueue()
45 bool xe_sriov_pf_migration_supported(struct xe_device *xe) in xe_sriov_pf_migration_supported() argument
47 xe_assert(xe, IS_SRIOV_PF(xe)); in xe_sriov_pf_migration_supported()
49 return IS_ENABLED(CONFIG_DRM_XE_DEBUG) || !xe->sriov.pf.migration.disabled; in xe_sriov_pf_migration_supported()
57 void xe_sriov_pf_migration_disable(struct xe_device *xe, const char *fmt, ...) in xe_sriov_pf_migration_disable() argument
[all …]
H A Dxe_rtp.c28 static bool has_samedia(const struct xe_device *xe) in has_samedia() argument
30 return xe->info.media_verx100 >= 1300; in has_samedia()
34 const struct xe_device *xe; member
50 const struct xe_device *xe = match_ctx->xe; in rule_match_item() local
57 return xe->info.platform == r->platform; in rule_match_item()
59 return xe->info.platform == r->platform && in rule_match_item()
60 xe->info.subplatform == r->subplatform; in rule_match_item()
62 if (drm_WARN_ON(&xe->drm, xe->info.step.platform == STEP_NONE)) in rule_match_item()
65 return xe->info.step.platform >= r->step_start && in rule_match_item()
66 xe->info.step.platform < r->step_end; in rule_match_item()
[all …]
H A Dxe_sriov_pf_service.c24 void xe_sriov_pf_service_init(struct xe_device *xe) in xe_sriov_pf_service_init() argument
29 xe_assert(xe, IS_SRIOV_PF(xe)); in xe_sriov_pf_service_init()
32 xe->sriov.pf.service.version.base.major = GUC_RELAY_VERSION_BASE_MAJOR; in xe_sriov_pf_service_init()
33 xe->sriov.pf.service.version.base.minor = GUC_RELAY_VERSION_BASE_MINOR; in xe_sriov_pf_service_init()
36 xe->sriov.pf.service.version.latest.major = GUC_RELAY_VERSION_LATEST_MAJOR; in xe_sriov_pf_service_init()
37 xe->sriov.pf.service.version.latest.minor = GUC_RELAY_VERSION_LATEST_MINOR; in xe_sriov_pf_service_init()
41 static int pf_negotiate_version(struct xe_device *xe, in pf_negotiate_version() argument
45 struct xe_sriov_pf_service_version base = xe->sriov.pf.service.version.base; in pf_negotiate_version()
46 struct xe_sriov_pf_service_version latest = xe->sriov.pf.service.version.latest; in pf_negotiate_version()
48 xe_assert(xe, IS_SRIOV_PF(xe)); in pf_negotiate_version()
[all …]
H A Dxe_sriov_vf_ccs.c123 static u64 get_ccs_bb_pool_size(struct xe_device *xe) in get_ccs_bb_pool_size() argument
130 ccs_mem_size = div64_u64(sys_mem_size, NUM_BYTES_PER_CCS_BYTE(xe)); in get_ccs_bb_pool_size()
147 struct xe_device *xe = tile_to_xe(tile); in alloc_bb_pool() local
152 bb_pool_size = get_ccs_bb_pool_size(xe); in alloc_bb_pool()
153 xe_sriov_info(xe, "Allocating %s CCS BB pool size = %lldMB\n", in alloc_bb_pool()
159 xe_sriov_err(xe, "xe_mem_pool_init failed with error: %pe\n", in alloc_bb_pool()
214 void xe_sriov_vf_ccs_rebase(struct xe_device *xe) in xe_sriov_vf_ccs_rebase() argument
218 if (!IS_VF_CCS_READY(xe)) in xe_sriov_vf_ccs_rebase()
223 &xe->sriov.vf.ccs.contexts[ctx_id]; in xe_sriov_vf_ccs_rebase()
257 int xe_sriov_vf_ccs_register_context(struct xe_device *xe) in xe_sriov_vf_ccs_register_context() argument
[all …]
H A Dxe_sysctrl.c34 struct xe_device *xe = arg; in sysctrl_fini() local
35 struct xe_sysctrl *sc = &xe->sc; in sysctrl_fini()
38 xe->soc_remapper.set_sysctrl_region(xe, 0); in sysctrl_fini()
44 struct xe_device *xe = sc_to_xe(sc); in xe_sysctrl_work() local
46 guard(xe_pm_runtime)(xe); in xe_sysctrl_work()
59 int xe_sysctrl_init(struct xe_device *xe) in xe_sysctrl_init() argument
61 struct xe_tile *tile = xe_device_get_root_tile(xe); in xe_sysctrl_init()
62 struct xe_sysctrl *sc = &xe->sc; in xe_sysctrl_init()
65 if (!xe->info.has_soc_remapper_sysctrl) in xe_sysctrl_init()
68 if (!xe->info.has_sysctrl) in xe_sysctrl_init()
[all …]
H A Dxe_heci_gsc.c108 static int heci_gsc_irq_setup(struct xe_device *xe) in heci_gsc_irq_setup() argument
110 struct xe_heci_gsc *heci_gsc = &xe->heci_gsc; in heci_gsc_irq_setup()
115 drm_err(&xe->drm, "gsc irq error %d\n", heci_gsc->irq); in heci_gsc_irq_setup()
121 drm_err(&xe->drm, "gsc irq init failed %d\n", ret); in heci_gsc_irq_setup()
126 static int heci_gsc_add_device(struct xe_device *xe, const struct heci_gsc_def *def) in heci_gsc_add_device() argument
128 struct xe_heci_gsc *heci_gsc = &xe->heci_gsc; in heci_gsc_add_device()
129 struct pci_dev *pdev = to_pci_dev(xe->drm.dev); in heci_gsc_add_device()
154 drm_err(&xe->drm, "gsc aux init failed %d\n", ret); in heci_gsc_add_device()
162 drm_err(&xe->drm, "gsc aux add failed %d\n", ret); in heci_gsc_add_device()
171 int xe_heci_gsc_init(struct xe_device *xe) in xe_heci_gsc_init() argument
[all …]
H A Dxe_bo.c95 static bool resource_is_stolen_vram(struct xe_device *xe, struct ttm_resource *res) in resource_is_stolen_vram() argument
97 return res->mem_type == XE_PL_STOLEN && IS_DGFX(xe); in resource_is_stolen_vram()
167 mem_type_to_migrate(struct xe_device *xe, u32 mem_type) in mem_type_to_migrate() argument
171 xe_assert(xe, mem_type == XE_PL_STOLEN || mem_type_is_vram(mem_type)); in mem_type_to_migrate()
172 tile = &xe->tiles[mem_type == XE_PL_STOLEN ? 0 : (mem_type - XE_PL_VRAM0)]; in mem_type_to_migrate()
176 static void try_add_system(struct xe_device *xe, struct xe_bo *bo, in try_add_system() argument
180 xe_assert(xe, *c < ARRAY_SIZE(bo->placements)); in try_add_system()
209 static u8 vram_bo_flag_to_tile_id(struct xe_device *xe, u32 vram_bo_flag) in vram_bo_flag_to_tile_id() argument
211 xe_assert(xe, vram_bo_flag & XE_BO_FLAG_VRAM_MASK); in vram_bo_flag_to_tile_id()
212 xe_assert(xe, (vram_bo_fla in vram_bo_flag_to_tile_id()
217 bo_vram_flags_to_vram_placement(struct xe_device * xe,u32 bo_flags,u32 vram_flag,enum ttm_bo_type type) bo_vram_flags_to_vram_placement() argument
230 add_vram(struct xe_device * xe,struct xe_bo * bo,struct ttm_place * places,u32 bo_flags,u32 mem_type,u32 * c) add_vram() argument
261 try_add_vram(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,enum ttm_bo_type type,u32 * c) try_add_vram() argument
273 try_add_stolen(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,u32 * c) try_add_stolen() argument
288 __xe_bo_placement_for_flags(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,enum ttm_bo_type type) __xe_bo_placement_for_flags() argument
308 xe_bo_placement_for_flags(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,enum ttm_bo_type type) xe_bo_placement_for_flags() argument
318 struct xe_device *xe = container_of(tbo->bdev, typeof(*xe), ttm); xe_evict_flags() local
382 xe_tt_map_sg(struct xe_device * xe,struct ttm_tt * tt) xe_tt_map_sg() argument
414 xe_tt_unmap_sg(struct xe_device * xe,struct ttm_tt * tt) xe_tt_unmap_sg() argument
438 xe_ttm_tt_account_add(struct xe_device * xe,struct ttm_tt * tt) xe_ttm_tt_account_add() argument
448 xe_ttm_tt_account_subtract(struct xe_device * xe,struct ttm_tt * tt) xe_ttm_tt_account_subtract() argument
462 struct xe_device *xe = ttm_to_xe_device(ttm_dev); update_global_total_pages() local
475 struct xe_device *xe = xe_bo_device(bo); xe_ttm_tt_create() local
582 struct xe_device *xe = ttm_to_xe_device(ttm_dev); xe_ttm_tt_unpopulate() local
601 xe_ttm_resource_visible(struct xe_device * xe,struct ttm_resource * mem) xe_ttm_resource_visible() argument
635 struct xe_device *xe = ttm_to_xe_device(bdev); xe_ttm_io_mem_reserve() local
669 xe_bo_trigger_rebind(struct xe_device * xe,struct xe_bo * bo,const struct ttm_operation_ctx * ctx) xe_bo_trigger_rebind() argument
751 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_bo_move_dmabuf() local
809 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_bo_move_notify() local
859 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_bo_set_purgeable_shrinker() local
895 struct xe_device *xe = xe_bo_device(bo); xe_bo_set_purgeable_state() local
967 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_bo_move() local
1213 struct xe_device *xe = ttm_to_xe_device(bo->bdev); xe_bo_shrink_purge() local
1292 struct xe_device *xe = ttm_to_xe_device(bo->bdev); xe_bo_shrink() local
1354 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_notifier_prepare_pinned() local
1423 struct xe_device *xe = xe_bo_device(bo); xe_bo_evict_pinned_copy() local
1491 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_evict_pinned() local
1561 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_restore_pinned() local
1682 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_ttm_bo_lock_in_destructor() local
1787 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_ttm_access_memory() local
1854 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_ttm_bo_destroy() local
1972 __xe_bo_cpu_fault(struct vm_fault * vmf,struct xe_device * xe,struct xe_bo * bo) __xe_bo_cpu_fault() argument
2024 xe_bo_cpu_fault_fastpath(struct vm_fault * vmf,struct xe_device * xe,struct xe_bo * bo,bool needs_rpm) xe_bo_cpu_fault_fastpath() argument
2094 struct xe_device *xe = to_xe_device(ddev); xe_bo_cpu_fault() local
2201 struct xe_device *xe = xe_bo_device(bo); xe_bo_vm_access() local
2328 xe_bo_init_locked(struct xe_device * xe,struct xe_bo * bo,struct xe_tile * tile,struct dma_resv * resv,struct ttm_lru_bulk_move * bulk,size_t size,u16 cpu_caching,enum ttm_bo_type type,u32 flags,struct dma_buf * dma_buf,struct drm_exec * exec) xe_bo_init_locked() argument
2487 __xe_bo_fixed_placement(struct xe_device * xe,struct xe_bo * bo,enum ttm_bo_type type,u32 flags,u64 start,u64 end,u64 size) __xe_bo_fixed_placement() argument
2529 __xe_bo_create_locked(struct xe_device * xe,struct xe_tile * tile,struct xe_vm * vm,size_t size,u64 start,u64 end,u16 cpu_caching,enum ttm_bo_type type,u32 flags,u64 alignment,struct drm_exec * exec) __xe_bo_create_locked() argument
2627 xe_bo_create_locked(struct xe_device * xe,struct xe_tile * tile,struct xe_vm * vm,size_t size,enum ttm_bo_type type,u32 flags,struct drm_exec * exec) xe_bo_create_locked() argument
2636 xe_bo_create_novm(struct xe_device * xe,struct xe_tile * tile,size_t size,u16 cpu_caching,enum ttm_bo_type type,u32 flags,u64 alignment,bool intr) xe_bo_create_novm() argument
2663 xe_bo_debug_mixed_mode_cur_index_advance(struct xe_device * xe,struct xe_bo * bo) xe_bo_debug_mixed_mode_cur_index_advance() argument
2683 get_flag_from_cur_index_in_mixed_mode(struct xe_device * xe,size_t * align_size,int * err) get_flag_from_cur_index_in_mixed_mode() argument
2717 xe_bo_apply_debug_page_size_policy(struct xe_device * xe,u32 * bo_flags,size_t * size) xe_bo_apply_debug_page_size_policy() argument
2788 xe_bo_apply_debug_page_size_policy(struct xe_device * xe,u32 * bo_flags,size_t * size) xe_bo_apply_debug_page_size_policy() argument
2795 xe_bo_debug_mixed_mode_cur_index_advance(struct xe_device * xe,struct xe_bo * bo) xe_bo_debug_mixed_mode_cur_index_advance() argument
2815 xe_bo_create_user(struct xe_device * xe,struct xe_vm * vm,size_t size,u16 cpu_caching,u32 flags,struct drm_exec * exec) xe_bo_create_user() argument
2863 xe_bo_create_pin_range_novm(struct xe_device * xe,struct xe_tile * tile,size_t size,u64 start,u64 end,enum ttm_bo_type type,u32 flags) xe_bo_create_pin_range_novm() argument
2895 xe_bo_create_pin_map_at_aligned(struct xe_device * xe,struct xe_tile * tile,struct xe_vm * vm,size_t size,u64 offset,enum ttm_bo_type type,u32 flags,u64 alignment,struct drm_exec * exec) xe_bo_create_pin_map_at_aligned() argument
2957 xe_bo_create_pin_map_at_novm(struct xe_device * xe,struct xe_tile * tile,size_t size,u64 offset,enum ttm_bo_type type,u32 flags,u64 alignment,bool intr) xe_bo_create_pin_map_at_novm() argument
3000 xe_bo_create_pin_map(struct xe_device * xe,struct xe_tile * tile,struct xe_vm * vm,size_t size,enum ttm_bo_type type,u32 flags,struct drm_exec * exec) xe_bo_create_pin_map() argument
3026 xe_bo_create_pin_map_novm(struct xe_device * xe,struct xe_tile * tile,size_t size,enum ttm_bo_type type,u32 flags,bool intr) xe_bo_create_pin_map_novm() argument
3038 xe_managed_bo_create_pin_map(struct xe_device * xe,struct xe_tile * tile,size_t size,u32 flags) xe_managed_bo_create_pin_map() argument
3061 xe_managed_bo_create_from_data(struct xe_device * xe,struct xe_tile * tile,const void * data,size_t size,u32 flags) xe_managed_bo_create_from_data() argument
3087 xe_managed_bo_reinit_in_vram(struct xe_device * xe,struct xe_tile * tile,struct xe_bo ** src) xe_managed_bo_reinit_in_vram() argument
3115 struct xe_device *xe = ttm_to_xe_device(res->bo->bdev); vram_region_gpu_offset() local
3143 struct xe_device *xe = xe_bo_device(bo); xe_bo_pin_external() local
3187 struct xe_device *xe = xe_bo_device(bo); xe_bo_pin() local
3244 struct xe_device *xe = xe_bo_device(bo); xe_bo_unpin_external() local
3269 struct xe_device *xe = xe_bo_device(bo); xe_bo_unpin() local
3355 struct xe_device *xe = xe_bo_device(bo); __xe_bo_addr() local
3387 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_vmap() local
3435 gem_create_set_pxp_type(struct xe_device * xe,struct xe_bo * bo,u64 value) gem_create_set_pxp_type() argument
3455 gem_create_user_ext_set_property(struct xe_device * xe,struct xe_bo * bo,u64 extension) gem_create_user_ext_set_property() argument
3490 gem_create_user_extensions(struct xe_device * xe,struct xe_bo * bo,u64 extensions,int ext_number) gem_create_user_extensions() argument
3525 struct xe_device *xe = to_xe_device(dev); xe_gem_create_ioctl() local
3668 struct xe_device *xe = to_xe_device(dev); xe_gem_mmap_offset_ioctl() local
3723 struct xe_device *xe = xe_bo_device(bo); xe_bo_decompress() local
3856 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_migrate() local
3938 struct xe_device *xe = xe_bo_device(bo); xe_bo_needs_ccs_pages() local
4060 struct xe_device *xe = to_xe_device(dev); xe_bo_dumb_create() local
[all...]
H A Dxe_vm_madvise.c60 vm_dbg(&vm->xe->drm, "VMA's in range: start=0x%016llx, end=0x%016llx", addr, addr + range); in get_vmas()
89 vm_dbg(&vm->xe->drm, "madvise_range-num_vmas = %d\n", madvise_range->num_vmas); in get_vmas()
94 static void madvise_preferred_mem_loc(struct xe_device *xe, struct xe_vm *vm, in madvise_preferred_mem_loc() argument
101 xe_assert(vm->xe, op->type == DRM_XE_MEM_RANGE_ATTR_PREFERRED_LOC); in madvise_preferred_mem_loc()
127 static void madvise_atomic(struct xe_device *xe, struct xe_vm *vm, in madvise_atomic() argument
135 xe_assert(vm->xe, op->type == DRM_XE_MEM_RANGE_ATTR_ATOMIC); in madvise_atomic()
136 xe_assert(vm->xe, op->atomic.val <= DRM_XE_ATOMIC_CPU); in madvise_atomic()
141 xe->info.has_device_atomics_on_smem)) { in madvise_atomic()
169 static void madvise_pat_index(struct xe_device *xe, struct xe_vm *vm, in madvise_pat_index() argument
176 xe_assert(vm->xe, op->type == DRM_XE_MEM_RANGE_ATTR_PAT); in madvise_pat_index()
[all …]
H A Dxe_vram.c41 static int determine_lmem_bar_size(struct xe_device *xe, struct xe_vram_region *lmem_bar) in determine_lmem_bar_size() argument
43 struct pci_dev *pdev = to_pci_dev(xe->drm.dev); in determine_lmem_bar_size()
46 drm_err(&xe->drm, "pci resource is not valid\n"); in determine_lmem_bar_size()
66 struct xe_device *xe = gt_to_xe(gt); in get_flat_ccs_offset() local
74 if (GRAPHICS_VER(xe) >= 20) { in get_flat_ccs_offset()
93 drm_info(&xe->drm, "FLAT_CCS base:%llx, aligned:%s\n", offset, in get_flat_ccs_offset()
111 xe_assert_msg(xe, offset + ccs_size <= in get_flat_ccs_offset()
146 struct xe_device *xe = tile_to_xe(tile); in tile_vram_size() local
151 if (IS_SRIOV_VF(xe)) { in tile_vram_size()
156 for_each_tile(t, xe, id) in tile_vram_size()
[all …]
H A Dxe_late_bind_fw.c58 struct xe_device *xe = late_bind_fw_to_xe(lb_fw); in parse_cpd_header() local
67 xe_assert(xe, manifest_entry); in parse_cpd_header()
73 drm_err(&xe->drm, "%s late binding fw: Invalid CPD header length %u!\n", in parse_cpd_header()
80 drm_err(&xe->drm, "%s late binding fw: too small! %zu < %zu\n", in parse_cpd_header()
92 drm_err(&xe->drm, "%s late binding fw: Failed to find manifest_entry\n", in parse_cpd_header()
99 drm_err(&xe->drm, "%s late binding fw: too small! %zu < %zu\n", in parse_cpd_header()
115 struct xe_device *xe = late_bind_fw_to_xe(lb_fw); in parse_lb_layout() local
123 xe_assert(xe, fpt_entry); in parse_lb_layout()
129 drm_err(&xe->drm, "%s late binding fw: Invalid FPT header length %u!\n", in parse_lb_layout()
136 drm_err(&xe->drm, "%s late binding fw: too small! %zu < %zu\n", in parse_lb_layout()
[all …]
H A Dxe_nvm.c44 static bool xe_nvm_non_posted_erase(struct xe_device *xe) in xe_nvm_non_posted_erase() argument
46 struct xe_mmio *mmio = xe_root_tile_mmio(xe); in xe_nvm_non_posted_erase()
48 switch (xe->info.platform) { in xe_nvm_non_posted_erase()
58 static bool xe_nvm_writable_override(struct xe_device *xe) in xe_nvm_writable_override() argument
60 struct xe_mmio *mmio = xe_root_tile_mmio(xe); in xe_nvm_writable_override()
65 switch (xe->info.platform) { in xe_nvm_writable_override()
92 drm_err(&xe->drm, "Unknown platform\n"); in xe_nvm_writable_override()
98 drm_info(&xe->drm, "NVM access overridden by jumper\n"); in xe_nvm_writable_override()
104 struct xe_device *xe = arg; in xe_nvm_fini() local
105 struct intel_dg_nvm_dev *nvm = xe->nvm; in xe_nvm_fini()
[all …]
H A Dxe_pmu.c93 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_to_gt() local
96 return xe_device_get_gt(xe, gt); in event_to_gt()
101 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_to_hwe() local
110 hwe = xe_hw_engine_lookup(xe, eci); in event_to_hwe()
135 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_gt_forcewake() local
143 gt = xe_device_get_gt(xe, config_to_gt_id(config)); in event_gt_forcewake()
163 struct xe_device *xe = container_of(pmu, typeof(*xe), pmu); in event_supported() local
164 struct xe_gt *gt = xe_device_get_gt(xe, gt_id); in event_supported()
175 struct xe_device *xe = container_of(event->pmu, typeof(*xe), pmu.base); in event_param_valid() local
180 gt = xe_device_get_gt(xe, config_to_gt_id(config)); in event_param_valid()
[all …]
H A Dxe_i2c.c53 PROPERTY_ENTRY_STRING("compatible", "intel,xe-i2c"),
157 * @xe: xe device instance
164 bool xe_i2c_present(struct xe_device *xe) in xe_i2c_present() argument
166 return xe->i2c && xe->i2c->ep.cookie == XE_I2C_EP_COOKIE_DEVICE; in xe_i2c_present()
169 static bool xe_i2c_irq_present(struct xe_device *xe) in xe_i2c_irq_present() argument
171 return xe->i2c && xe->i2c->ep.capabilities & XE_I2C_EP_CAP_IRQ && in xe_i2c_irq_present()
172 !xe_survivability_mode_is_boot_enabled(xe); in xe_i2c_irq_present()
183 xe_i2c_irq_handler(struct xe_device * xe,u32 master_ctl) xe_i2c_irq_handler() argument
191 xe_i2c_irq_reset(struct xe_device * xe) xe_i2c_irq_reset() argument
202 xe_i2c_irq_postinstall(struct xe_device * xe) xe_i2c_irq_postinstall() argument
293 xe_i2c_pm_suspend(struct xe_device * xe) xe_i2c_pm_suspend() argument
304 xe_i2c_pm_resume(struct xe_device * xe,bool d3cold) xe_i2c_pm_resume() argument
321 struct xe_device *xe = tile_to_xe(i2c->mmio->tile); xe_i2c_remove() local
345 xe_i2c_probe(struct xe_device * xe) xe_i2c_probe() argument
[all...]
H A Dxe_pagefault.c92 needs_vram = xe_vma_need_vram_for_atomic(vm->xe, vma, atomic); in xe_pagefault_handle_vma()
118 xe_validation_ctx_init(&ctx, &vm->xe->val, &exec, (struct xe_val_flags) {}); in xe_pagefault_handle_vma()
156 static struct xe_vm *xe_pagefault_asid_to_vm(struct xe_device *xe, u32 asid) in xe_pagefault_asid_to_vm() argument
160 down_read(&xe->usm.lock); in xe_pagefault_asid_to_vm()
161 vm = xa_load(&xe->usm.asid_to_vm, asid); in xe_pagefault_asid_to_vm()
166 up_read(&xe->usm.lock); in xe_pagefault_asid_to_vm()
174 struct xe_device *xe = gt_to_xe(gt); in xe_pagefault_service() local
184 vm = xe_pagefault_asid_to_vm(xe, pf->consumer.asid); in xe_pagefault_service()
267 static void xe_pagefault_save_to_vm(struct xe_device *xe, struct xe_pagefault *pf) in xe_pagefault_save_to_vm() argument
276 down_read(&xe->usm.lock); in xe_pagefault_save_to_vm()
[all …]
H A Dxe_i2c.h52 int xe_i2c_probe(struct xe_device *xe);
53 bool xe_i2c_present(struct xe_device *xe);
54 void xe_i2c_irq_handler(struct xe_device *xe, u32 master_ctl);
55 void xe_i2c_irq_postinstall(struct xe_device *xe);
56 void xe_i2c_irq_reset(struct xe_device *xe);
57 void xe_i2c_pm_suspend(struct xe_device *xe);
58 void xe_i2c_pm_resume(struct xe_device *xe, bool d3cold);
60 static inline int xe_i2c_probe(struct xe_device *xe) { return 0; } in xe_i2c_probe() argument
61 static inline bool xe_i2c_present(struct xe_device *xe) { return false; } in xe_i2c_present() argument
62 static inline void xe_i2c_irq_handler(struct xe_device *xe, u32 master_ctl) { } in xe_i2c_irq_handler() argument
[all …]
H A Dxe_shrinker.c27 struct xe_device *xe; member
59 struct xe_device *xe = shrinker->xe; in __xe_shrinker_runtime_pm_get() local
61 if (xe_pm_runtime_get_if_active(xe)) in __xe_shrinker_runtime_pm_get()
64 if (xe_rpm_reclaim_safe(xe) && !ttm_bo_shrink_avoid_wait()) { in __xe_shrinker_runtime_pm_get()
65 xe_pm_runtime_get(xe); in __xe_shrinker_runtime_pm_get()
69 queue_work(xe->unordered_wq, &shrinker->pm_worker); in __xe_shrinker_runtime_pm_get()
77 xe_pm_runtime_put(shrinker->xe); in xe_shrinker_runtime_pm_put()
86 struct xe_device *xe = shrinker->xe; in __xe_shrinker_walk() local
93 struct ttm_resource_manager *man = ttm_manager_type(&xe->ttm, mem_type); in __xe_shrinker_walk()
105 xe_device_is_l2_flush_optimized(xe)) { in __xe_shrinker_walk()
[all …]
H A Dxe_wopcm.c87 static bool __check_layout(struct xe_device *xe, u32 wopcm_size, in __check_layout() argument
97 drm_err(&xe->drm, in __check_layout()
106 drm_err(&xe->drm, "WOPCM: no space for %s: %uK < %uK\n", in __check_layout()
114 drm_err(&xe->drm, "WOPCM: no space for %s: %uK < %uK\n", in __check_layout()
138 static int __wopcm_init_regs(struct xe_device *xe, struct xe_gt *gt, in __wopcm_init_regs() argument
169 drm_notice(&xe->drm, "Failed to init uC WOPCM registers!\n"); in __wopcm_init_regs()
170 drm_notice(&xe->drm, "%s(%#x)=%#x\n", "DMA_GUC_WOPCM_OFFSET", in __wopcm_init_regs()
173 drm_notice(&xe->drm, "%s(%#x)=%#x\n", "GUC_WOPCM_SIZE", in __wopcm_init_regs()
180 u32 xe_wopcm_size(struct xe_device *xe) in xe_wopcm_size() argument
182 if (xe->info.platform >= XE_LUNARLAKE) in xe_wopcm_size()
[all …]
H A Dxe_vm.c115 bool vf_migration = IS_SRIOV_VF(vm->xe) && in wait_for_existing_preempt_fences()
116 xe_sriov_vf_migration_supported(vm->xe); in wait_for_existing_preempt_fences()
128 xe_assert(vm->xe, vf_migration); in wait_for_existing_preempt_fences()
166 xe_assert(vm->xe, link != list); in arm_preempt_fences()
245 xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm)); in xe_vm_add_compute_exec_queue()
248 err = xe_validation_exec_lock(&ctx, &vm_exec, &vm->xe->val); in xe_vm_add_compute_exec_queue()
362 if (!try_wait_for_completion(&vm->xe->pm_block)) in xe_gpuvm_validate()
452 struct xe_device *xe = vm->xe; in vm_suspend_rebind_worker() local
455 mutex_lock(&xe->rebind_resume_lock); in vm_suspend_rebind_worker()
456 if (!try_wait_for_completion(&vm->xe->pm_block)) { in vm_suspend_rebind_worker()
[all …]
H A Dxe_sriov_vf_ccs.h18 int xe_sriov_vf_ccs_init(struct xe_device *xe);
21 int xe_sriov_vf_ccs_register_context(struct xe_device *xe);
22 void xe_sriov_vf_ccs_rebase(struct xe_device *xe);
23 void xe_sriov_vf_ccs_print(struct xe_device *xe, struct drm_printer *p);
26 static inline bool xe_sriov_vf_ccs_ready(struct xe_device *xe) in xe_sriov_vf_ccs_ready() argument
28 xe_assert(xe, IS_SRIOV_VF(xe)); in xe_sriov_vf_ccs_ready()
29 return xe->sriov.vf.ccs.initialized; in xe_sriov_vf_ccs_ready()
32 #define IS_VF_CCS_READY(xe) ({ \ argument
33 struct xe_device *xe__ = (xe); \
/linux/drivers/gpu/drm/xe/tests/
H A Dxe_sriov_pf_service_kunit.c19 struct xe_device *xe; in pf_service_test_init() local
24 xe = test->priv; in pf_service_test_init()
25 KUNIT_ASSERT_EQ(test, xe_sriov_init(xe), 0); in pf_service_test_init()
27 xe_sriov_pf_service_init(xe); in pf_service_test_init()
33 KUNIT_ASSERT_NE(test, 0, xe->sriov.pf.service.version.base.major); in pf_service_test_init()
34 KUNIT_ASSERT_NE(test, 0, xe->sriov.pf.service.version.latest.major); in pf_service_test_init()
35 KUNIT_ASSERT_LE(test, xe->sriov.pf.service.version.base.major, in pf_service_test_init()
36 xe->sriov.pf.service.version.latest.major); in pf_service_test_init()
37 if (xe->sriov.pf.service.version.base.major == xe->sriov.pf.service.version.latest.major) in pf_service_test_init()
38 KUNIT_ASSERT_LE(test, xe->sriov.pf.service.version.base.minor, in pf_service_test_init()
[all …]
H A Dxe_migrate.c16 static bool sanity_fence_failed(struct xe_device *xe, struct dma_fence *fence, in sanity_fence_failed() argument
38 static int run_sanity_job(struct xe_migrate *m, struct xe_device *xe, in run_sanity_job() argument
42 u64 batch_base = xe_migrate_batch_base(m, xe->info.has_usm); in run_sanity_job()
58 if (sanity_fence_failed(xe, fence, str, test)) in run_sanity_job()
76 struct xe_device *xe = tile_to_xe(m->tile); in test_copy() local
83 struct xe_bo *remote = xe_bo_create_locked(xe, m->tile, NULL, in test_copy()
110 xe_map_memset(xe, &remote->vmap, 0, 0xd0, xe_bo_size(remote)); in test_copy()
113 if (!sanity_fence_failed(xe, fence, big ? "Clearing remote big bo" : in test_copy()
115 retval = xe_map_rd(xe, &remote->vmap, 0, u64); in test_copy()
118 retval = xe_map_rd(xe, &remote->vmap, xe_bo_size(remote) - 8, u64); in test_copy()
[all …]
H A Dxe_kunit_helpers.c36 struct xe_device *xe; in xe_kunit_helper_alloc_xe_device() local
38 xe = drm_kunit_helper_alloc_drm_device(test, dev, in xe_kunit_helper_alloc_xe_device()
41 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xe); in xe_kunit_helper_alloc_xe_device()
42 return xe; in xe_kunit_helper_alloc_xe_device()
73 struct xe_device *xe; in xe_kunit_helper_xe_device_test_init() local
80 xe = xe_kunit_helper_alloc_xe_device(test, dev); in xe_kunit_helper_xe_device_test_init()
81 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xe); in xe_kunit_helper_xe_device_test_init()
83 err = xe_pci_fake_device_init(xe); in xe_kunit_helper_xe_device_test_init()
89 test->priv = xe; in xe_kunit_helper_xe_device_test_init()
117 struct xe_device *xe = xe_device_const_cast(test->param_value); in xe_kunit_helper_xe_device_live_test_init() local
[all …]
/linux/drivers/gpu/drm/xe/display/
H A Dxe_hdcp_gsc.c27 struct xe_device *xe; member
37 struct xe_device *xe = to_xe_device(drm); in intel_hdcp_gsc_check_status() local
38 struct xe_tile *tile = xe_device_get_root_tile(xe); in intel_hdcp_gsc_check_status()
43 drm_dbg_kms(&xe->drm, in intel_hdcp_gsc_check_status()
51 drm_dbg_kms(&xe->drm, in intel_hdcp_gsc_check_status()
56 guard(xe_pm_runtime)(xe); in intel_hdcp_gsc_check_status()
59 drm_dbg_kms(&xe->drm, in intel_hdcp_gsc_check_status()
68 static int intel_hdcp_gsc_initialize_message(struct xe_device *xe, in intel_hdcp_gsc_initialize_message() argument
76 bo = xe_bo_create_pin_map_novm(xe, xe_device_get_root_tile(xe), PAGE_SIZE * 2, in intel_hdcp_gsc_initialize_message()
82 drm_err(&xe->drm, "Failed to allocate bo for HDCP streaming command!\n"); in intel_hdcp_gsc_initialize_message()
[all …]

123456789