| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_device.c | 90 struct xe_device *xe = to_xe_device(dev); in xe_file_open() 108 xef->xe = xe; in xe_file_open() 148 * xe_file_get() - Take a reference to the xe file object 149 * @xef: Pointer to the xe file in xe_file_get() 151 * Anyone with a pointer to xef must take a reference to the xe file in xe_file_get() 154 * Return: xe file pointer 163 * xe_file_put() - Drop a reference to the xe file object in xe_file_put() 164 * @xef: Pointer to the xe file in xe_file_put() 175 struct xe_device *xe in xe_file_close() 87 struct xe_device *xe = to_xe_device(dev); xe_file_open() local 168 struct xe_device *xe = to_xe_device(dev); xe_file_close() local 224 struct xe_device *xe = to_xe_device(file_priv->minor->dev); xe_drm_ioctl() local 242 struct xe_device *xe = to_xe_device(file_priv->minor->dev); xe_drm_compat_ioctl() local 326 struct xe_device *xe = to_xe_device(dev); xe_pci_barrier_mmap() local 449 xe_device_is_admin_only(const struct xe_device * xe) xe_device_is_admin_only() argument 458 struct xe_device *xe = to_xe_device(dev); xe_device_destroy() local 488 struct xe_device *xe; xe_device_create() local 522 xe_device_init_early(struct xe_device * xe) xe_device_init_early() argument 604 xe_driver_flr_disabled(struct xe_device * xe) xe_driver_flr_disabled() argument 630 __xe_driver_flr(struct xe_device * xe) __xe_driver_flr() argument 676 xe_driver_flr(struct xe_device * xe) xe_driver_flr() argument 686 struct xe_device *xe = arg; xe_driver_flr_fini() local 694 struct xe_device *xe = arg; xe_device_sanitize() local 702 xe_set_dma_info(struct xe_device * xe) xe_set_dma_info() argument 724 assert_lmem_ready(struct xe_device * xe) assert_lmem_ready() argument 733 vf_update_device_info(struct xe_device * xe) vf_update_device_info() argument 747 xe_device_vram_alloc(struct xe_device * xe) xe_device_vram_alloc() argument 772 xe_device_probe_early(struct xe_device * xe) xe_device_probe_early() argument 834 probe_has_flat_ccs(struct xe_device * xe) probe_has_flat_ccs() argument 873 detect_preproduction_hw(struct xe_device * xe) detect_preproduction_hw() argument 918 struct xe_device *xe = arg; xe_device_wedged_fini() local 925 xe_debug_page_size_alloc_ctrl_init(struct xe_device * xe) xe_debug_page_size_alloc_ctrl_init() argument 939 xe_debug_page_size_alloc_ctrl_init(struct xe_device * xe) xe_debug_page_size_alloc_ctrl_init() argument 945 xe_device_probe(struct xe_device * xe) xe_device_probe() argument 1164 xe_device_remove(struct xe_device * xe) xe_device_remove() argument 1173 xe_device_shutdown(struct xe_device * xe) xe_device_shutdown() argument 1204 xe_device_wmb(struct xe_device * xe) xe_device_wmb() argument 1214 tdf_request_sync(struct xe_device * xe) tdf_request_sync() argument 1245 xe_device_is_l2_flush_optimized(struct xe_device * xe) xe_device_is_l2_flush_optimized() argument 1262 xe_device_l2_flush(struct xe_device * xe) xe_device_l2_flush() argument 1304 xe_device_td_flush(struct xe_device * xe) xe_device_td_flush() argument 1333 xe_device_ccs_bytes(struct xe_device * xe,u64 size) xe_device_ccs_bytes() argument 1350 xe_device_assert_mem_access(struct xe_device * xe) xe_device_assert_mem_access() argument 1355 xe_device_snapshot_print(struct xe_device * xe,struct drm_printer * p) xe_device_snapshot_print() argument 1376 xe_device_canonicalize_addr(struct xe_device * xe,u64 address) xe_device_canonicalize_addr() argument 1381 xe_device_uncanonicalize_addr(struct xe_device * xe,u64 address) xe_device_uncanonicalize_addr() argument 1430 xe_device_set_wedged_method(struct xe_device * xe,unsigned long method) xe_device_set_wedged_method() argument 1453 xe_device_declare_wedged(struct xe_device * xe) xe_device_declare_wedged() argument 1504 xe_device_validate_wedged_mode(struct xe_device * xe,unsigned int mode) xe_device_validate_wedged_mode() argument 1550 xe_device_asid_to_vm(struct xe_device * xe,u32 asid) xe_device_asid_to_vm() argument [all...] |
| H A D | xe_bo_evict.c | 15 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 D | xe_pci_sriov.c | 26 static void pf_reset_vfs(struct xe_device *xe, unsigned int num_vfs) in pf_reset_vfs() argument 31 xe_sriov_pf_control_reset_vf(xe, n); in pf_reset_vfs() 34 static void pf_link_vfs(struct xe_device *xe, int num_vfs) in pf_link_vfs() argument 36 struct pci_dev *pdev_pf = to_pci_dev(xe->drm.dev); in pf_link_vfs() 56 xe_sriov_err(xe, "Cannot find VF%u device, aborting link%s creation!\n", in pf_link_vfs() 65 xe_sriov_notice(xe, "Failed linking VF%u\n", n); in pf_link_vfs() 71 static void pf_engine_activity_stats(struct xe_device *xe, unsigned int num_vfs, bool enable) in pf_engine_activity_stats() argument 77 for_each_gt(gt, xe, id) { in pf_engine_activity_stats() 85 static int pf_resize_vf_vram_bar(struct xe_device *xe, int num_vfs) in pf_resize_vf_vram_bar() argument 87 struct pci_dev *pdev = to_pci_dev(xe->drm.dev); in pf_resize_vf_vram_bar() [all …]
|
| H A D | xe_sriov_pf_migration.c | 19 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 D | xe_rtp.c | 28 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 D | xe_sriov_pf_service.c | 24 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 D | xe_sriov_vf_ccs.c | 123 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() 212 * @xe: the &xe_device. 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 in xe_sriov_vf_ccs_rebase() 257 xe_sriov_vf_ccs_register_context(struct xe_device * xe) xe_sriov_vf_ccs_register_context() argument 283 vf_migration_ccs_bb_needed(struct xe_device * xe) vf_migration_ccs_bb_needed() argument 298 vf_migration_ccs_bb_support_check(struct xe_device * xe) vf_migration_ccs_bb_support_check() argument 336 xe_sriov_vf_ccs_init(struct xe_device * xe) xe_sriov_vf_ccs_init() argument 399 struct xe_device *xe = gt_to_xe(ctx->mig_q->gt); xe_sriov_vf_ccs_rw_update_bb_addr() local 420 struct xe_device *xe = xe_bo_device(bo); xe_sriov_vf_ccs_attach_bo() local 468 struct xe_device *xe = xe_bo_device(bo); xe_sriov_vf_ccs_detach_bo() local 502 xe_sriov_vf_ccs_print(struct xe_device * xe,struct drm_printer * p) xe_sriov_vf_ccs_print() argument [all...] |
| H A D | xe_sysctrl.c | 51 struct xe_device *xe = arg; 52 struct xe_sysctrl *sc = &xe->sc; 55 xe->soc_remapper.set_sysctrl_region(xe, 0); 61 struct xe_device *xe = sc_to_xe(sc); in xe_sysctrl_init() 63 guard(xe_pm_runtime)(xe); in xe_sysctrl_init() 69 * @xe: xe device instance in xe_sysctrl_init() 76 int xe_sysctrl_init(struct xe_device *xe) in xe_sysctrl_init() 78 struct xe_tile *tile = xe_device_get_root_tile(xe); in xe_sysctrl_init() 34 struct xe_device *xe = arg; sysctrl_fini() local 44 struct xe_device *xe = sc_to_xe(sc); xe_sysctrl_work() local 59 xe_sysctrl_init(struct xe_device * xe) xe_sysctrl_init() argument 100 xe_sysctrl_irq_handler(struct xe_device * xe,u32 master_ctl) xe_sysctrl_irq_handler() argument 118 xe_sysctrl_pm_resume(struct xe_device * xe) xe_sysctrl_pm_resume() argument [all...] |
| H A D | xe_heci_gsc.c | 108 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 D | xe_bo.c | 96 static bool resource_is_stolen_vram(struct xe_device *xe, struct ttm_resource *res) in resource_is_stolen_vram() 98 return res->mem_type == XE_PL_STOLEN && IS_DGFX(xe); in resource_is_stolen_vram() 177 mem_type_to_migrate(struct xe_device *xe, u32 mem_type) in try_add_system() 181 xe_assert(xe, mem_type == XE_PL_STOLEN || mem_type_is_vram(mem_type)); in try_add_system() 182 tile = &xe->tiles[mem_type == XE_PL_STOLEN ? 0 : (mem_type - XE_PL_VRAM0)]; in try_add_system() 186 static void try_add_system(struct xe_device *xe, struct xe_bo *bo, in try_add_system() 190 xe_assert(xe, *c < ARRAY_SIZE(bo->placements)); 219 static u8 vram_bo_flag_to_tile_id(struct xe_device *xe, u32 vram_bo_flag) in bo_vram_flags_to_vram_placement() 221 xe_assert(xe, vram_bo_flag & XE_BO_FLAG_VRAM_MASK); in bo_vram_flags_to_vram_placement() 222 xe_assert(xe, (vram_bo_fla in bo_vram_flags_to_vram_placement() 95 resource_is_stolen_vram(struct xe_device * xe,struct ttm_resource * res) resource_is_stolen_vram() argument 167 mem_type_to_migrate(struct xe_device * xe,u32 mem_type) mem_type_to_migrate() argument 176 try_add_system(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,u32 * c) try_add_system() argument 209 vram_bo_flag_to_tile_id(struct xe_device * xe,u32 vram_bo_flag) vram_bo_flag_to_tile_id() argument 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 388 xe_tt_map_sg(struct xe_device * xe,struct ttm_tt * tt) xe_tt_map_sg() argument 420 xe_tt_unmap_sg(struct xe_device * xe,struct ttm_tt * tt) xe_tt_unmap_sg() argument 444 xe_ttm_tt_account_add(struct xe_device * xe,struct ttm_tt * tt) xe_ttm_tt_account_add() argument 454 xe_ttm_tt_account_subtract(struct xe_device * xe,struct ttm_tt * tt) xe_ttm_tt_account_subtract() argument 491 struct xe_device *xe = xe_bo_device(bo); xe_bo_account_pin() local 515 struct xe_device *xe = xe_bo_device(bo); xe_bo_account_unpin() local 562 struct xe_device *xe = ttm_to_xe_device(ttm_dev); update_global_total_pages() local 575 struct xe_device *xe = xe_bo_device(bo); xe_ttm_tt_create() local 682 struct xe_device *xe = ttm_to_xe_device(ttm_dev); xe_ttm_tt_unpopulate() local 701 xe_ttm_resource_visible(struct xe_device * xe,struct ttm_resource * mem) xe_ttm_resource_visible() argument 735 struct xe_device *xe = ttm_to_xe_device(bdev); xe_ttm_io_mem_reserve() local 769 xe_bo_trigger_rebind(struct xe_device * xe,struct xe_bo * bo,const struct ttm_operation_ctx * ctx) xe_bo_trigger_rebind() argument 851 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_bo_move_dmabuf() local 909 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_bo_move_notify() local 961 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_bo_set_purgeable_shrinker() local 998 struct xe_device *xe = xe_bo_device(bo); xe_bo_set_purgeable_state() local 1070 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_bo_move() local 1316 struct xe_device *xe = ttm_to_xe_device(bo->bdev); xe_bo_shrink_purge() local 1395 struct xe_device *xe = ttm_to_xe_device(bo->bdev); xe_bo_shrink() local 1457 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_notifier_prepare_pinned() local 1527 struct xe_device *xe = xe_bo_device(bo); xe_bo_evict_pinned_copy() local 1595 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_evict_pinned() local 1665 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_restore_pinned() local 1786 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_ttm_bo_lock_in_destructor() local 1891 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_ttm_access_memory() local 1958 struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev); xe_ttm_bo_destroy() local 2076 __xe_bo_cpu_fault(struct vm_fault * vmf,struct xe_device * xe,struct xe_bo * bo) __xe_bo_cpu_fault() argument 2119 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 2189 struct xe_device *xe = to_xe_device(ddev); xe_bo_cpu_fault() local 2296 struct xe_device *xe = xe_bo_device(bo); xe_bo_vm_access() local 2423 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 2582 __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 2624 __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 2722 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 2731 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 2758 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 2778 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 2812 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 2883 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 2890 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 2910 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 2958 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 2990 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 3052 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 3095 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 3121 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 3133 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 3156 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 3182 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 3210 struct xe_device *xe = ttm_to_xe_device(res->bo->bdev); vram_region_gpu_offset() local 3238 struct xe_device *xe = xe_bo_device(bo); xe_bo_pin_external() local 3281 struct xe_device *xe = xe_bo_device(bo); xe_bo_pin() local 3336 struct xe_device *xe = xe_bo_device(bo); xe_bo_unpin_external() local 3354 struct xe_device *xe = xe_bo_device(bo); xe_bo_unpin() local 3435 struct xe_device *xe = xe_bo_device(bo); __xe_bo_addr() local 3467 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_vmap() local 3515 gem_create_set_pxp_type(struct xe_device * xe,struct xe_bo * bo,u64 value) gem_create_set_pxp_type() argument 3535 gem_create_user_ext_set_property(struct xe_device * xe,struct xe_bo * bo,u64 extension) gem_create_user_ext_set_property() argument 3570 gem_create_user_extensions(struct xe_device * xe,struct xe_bo * bo,u64 extensions,int ext_number) gem_create_user_extensions() argument 3605 struct xe_device *xe = to_xe_device(dev); xe_gem_create_ioctl() local 3748 struct xe_device *xe = to_xe_device(dev); xe_gem_mmap_offset_ioctl() local 3803 struct xe_device *xe = xe_bo_device(bo); xe_bo_decompress() local 3936 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); xe_bo_migrate() local 4018 struct xe_device *xe = xe_bo_device(bo); xe_bo_needs_ccs_pages() local 4140 struct xe_device *xe = to_xe_device(dev); xe_bo_dumb_create() local [all...] |
| H A D | xe_vm_madvise.c | 60 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, o in madvise_pat_index() 200 madvise_purgeable(struct xe_device * xe,struct xe_vm * vm,struct xe_vma ** vmas,int num_vmas,struct drm_xe_madvise * op,struct xe_madvise_details * details) madvise_purgeable() argument 349 madvise_args_are_sane(struct xe_device * xe,const struct drm_xe_madvise * args) madvise_args_are_sane() argument 443 struct xe_device *xe = vm->xe; xe_madvise_details_init() local 496 check_pat_args_are_sane(struct xe_device * xe,struct xe_vmas_in_madvise_range * madvise_range,u16 pat_index) check_pat_args_are_sane() argument 538 struct xe_device *xe = vm->xe; check_bo_args_are_sane() local 583 struct xe_device *xe = to_xe_device(dev); xe_vm_madvise_ioctl() local [all...] |
| H A D | xe_vram.c | 44 static int determine_lmem_bar_size(struct xe_device *xe, struct xe_vram_region *lmem_bar) in determine_lmem_bar_size() 46 struct pci_dev *pdev = to_pci_dev(xe->drm.dev); in determine_lmem_bar_size() 49 drm_err(&xe->drm, "pci resource is not valid\n"); in determine_lmem_bar_size() 58 /* XXX: Need to change when xe link code is ready */ 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() 41 determine_lmem_bar_size(struct xe_device * xe,struct xe_vram_region * lmem_bar) determine_lmem_bar_size() argument 195 struct xe_device *xe = arg; vram_fini() local 208 xe_vram_region_alloc(struct xe_device * xe,u8 id,u32 placement) xe_vram_region_alloc() argument 228 print_vram_region_info(struct xe_device * xe,struct xe_vram_region * vram) print_vram_region_info() argument 243 vram_region_init(struct xe_device * xe,struct xe_vram_region * vram,struct xe_vram_region * lmem_bar,u64 offset,u64 usable_size,u64 region_size,resource_size_t remain_io_size) vram_region_init() argument 279 struct xe_device *xe = ttm_to_xe_device(res->bo->bdev); xe_map_resource_to_region() local 298 xe_vram_probe(struct xe_device * xe) xe_vram_probe() argument [all...] |
| H A D | xe_late_bind_fw.c | 58 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 in parse_lb_layout() 189 struct xe_device *xe = late_bind_to_xe(late_bind); xe_late_bind_fw_num_fans() local 198 struct xe_device *xe = late_bind_to_xe(late_bind); xe_late_bind_wait_for_worker_completion() local 217 struct xe_device *xe = late_bind_to_xe(late_bind); xe_late_bind_work() local 274 struct xe_device *xe = late_bind_to_xe(late_bind); xe_late_bind_fw_load() local 296 struct xe_device *xe = late_bind_to_xe(late_bind); __xe_late_bind_fw_init() local 386 struct xe_device *xe = kdev_to_xe_device(xe_kdev); xe_late_bind_component_bind() local 398 struct xe_device *xe = kdev_to_xe_device(xe_kdev); xe_late_bind_component_unbind() local 414 struct xe_device *xe = late_bind_to_xe(late_bind); xe_late_bind_remove() local 435 struct xe_device *xe = late_bind_to_xe(late_bind); xe_late_bind_init() local [all...] |
| H A D | xe_pmu.c | 93 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 D | xe_mmio.c | 46 static void mmio_multi_tile_setup(struct xe_device *xe, size_t tile_mmio_size) in mmio_multi_tile_setup() 51 for_each_remote_tile(tile, xe, id) in mmio_multi_tile_setup() 52 xe_mmio_init(&tile->mmio, tile, xe->mmio.regs + id * tile_mmio_size, SZ_4M); in mmio_multi_tile_setup() 57 * @xe: the &xe_device 63 int xe_mmio_probe_tiles(struct xe_device *xe) in xe_mmio_probe_tiles() 71 if (xe->info.tile_count == 1) in xe_mmio_probe_tiles() 74 if (xe->mmio.size < xe->info.tile_count * tile_mmio_size) { in xe_mmio_probe_tiles() 75 xe_err(xe, "GTTMMADR_BAR is too small for %d tiles: %zu\n", in xe_mmio_probe_tiles() 76 xe in xe_mmio_probe_tiles() 45 mmio_multi_tile_setup(struct xe_device * xe,size_t tile_mmio_size) mmio_multi_tile_setup() argument 62 xe_mmio_probe_tiles(struct xe_device * xe) xe_mmio_probe_tiles() argument 85 struct xe_device *xe = arg; mmio_fini() local 101 xe_mmio_probe_early(struct xe_device * xe) xe_mmio_probe_early() argument 422 vf_regs_stride(struct xe_device * xe) vf_regs_stride() argument 436 struct xe_device *xe = tile->xe; xe_mmio_init_vf_view() local [all...] |
| H A D | xe_nvm.c | 45 static bool xe_nvm_non_posted_erase(struct xe_device *xe) in xe_nvm_non_posted_erase() 47 struct xe_mmio *mmio = xe_root_tile_mmio(xe); in xe_nvm_non_posted_erase() 49 switch (xe->info.platform) { in xe_nvm_non_posted_erase() 59 static bool xe_nvm_writable_override(struct xe_device *xe) in xe_nvm_writable_override() 61 struct xe_mmio *mmio = xe_root_tile_mmio(xe); in xe_nvm_writable_override() 66 switch (xe->info.platform) { in xe_nvm_writable_override() 93 drm_err(&xe->drm, "Unknown platform\n"); in xe_nvm_writable_override() 99 drm_info(&xe->drm, "NVM access overridden by jumper\n"); in xe_nvm_writable_override() 105 struct xe_device *xe = arg; in xe_nvm_fini() 106 struct intel_dg_nvm_dev *nvm = xe in xe_nvm_fini() 44 xe_nvm_non_posted_erase(struct xe_device * xe) xe_nvm_non_posted_erase() argument 58 xe_nvm_writable_override(struct xe_device * xe) xe_nvm_writable_override() argument 104 struct xe_device *xe = arg; xe_nvm_fini() local 123 xe_nvm_init(struct xe_device * xe) xe_nvm_init() argument [all...] |
| H A D | xe_i2c.c | 53 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 348 xe_i2c_probe(struct xe_device * xe) xe_i2c_probe() argument [all...] |
| H A D | xe_pagefault.c | 160 needs_vram = xe_vma_need_vram_for_atomic(vm->xe, vma, atomic); in xe_pagefault_asid_to_vm() 201 xe_validation_ctx_init(&ctx, &vm->xe->val, &exec, in xe_pagefault_service() 248 struct xe_device *xe = gt_to_xe(pf->gt); in xe_pagefault_print() 251 down_read(&xe->usm.lock); in xe_pagefault_print() 252 vm = xa_load(&xe->usm.asid_to_vm, asid); in xe_pagefault_print() 262 up_read(&xe->usm.lock); in xe_pagefault_print() 270 struct xe_device *xe = gt_to_xe(gt); in xe_pagefault_save_to_vm() 284 trace_xe_pagefault_fail(xe, NULL, NULL, asid, in xe_pagefault_save_to_vm() 324 trace_xe_pagefault_fail(xe, vm, vma, asid, in xe_pagefault_queue_work() 359 struct xe_device *xe in xe_pagefault_queue_init() 156 xe_pagefault_asid_to_vm(struct xe_device * xe,u32 asid) xe_pagefault_asid_to_vm() argument 174 struct xe_device *xe = gt_to_xe(gt); xe_pagefault_service() local 267 xe_pagefault_save_to_vm(struct xe_device * xe,struct xe_pagefault * pf) xe_pagefault_save_to_vm() argument 296 struct xe_device *xe = pf_queue->xe; xe_pagefault_queue_work() local 340 xe_pagefault_queue_init(struct xe_device * xe,struct xe_pagefault_queue * pf_queue) xe_pagefault_queue_init() argument 390 struct xe_device *xe = arg; xe_pagefault_fini() local 403 xe_pagefault_init(struct xe_device * xe) xe_pagefault_init() argument 429 xe_pagefault_queue_reset(struct xe_device * xe,struct xe_gt * gt,struct xe_pagefault_queue * pf_queue) xe_pagefault_queue_reset() argument 459 xe_pagefault_reset(struct xe_device * xe,struct xe_gt * gt) xe_pagefault_reset() argument 485 xe_pagefault_handler(struct xe_device * xe,struct xe_pagefault * pf) xe_pagefault_handler() argument [all...] |
| H A D | xe_i2c.h | 52 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 D | xe_shrinker.c | 19 * @xe: Back pointer to the device. 27 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 in __xe_shrinker_walk() local 204 struct xe_device *xe = shrinker->xe; xe_shrinker_runtime_pm_get() local 297 xe_shrinker_create(struct xe_device * xe) xe_shrinker_create() argument [all...] |
| H A D | xe_wopcm.c | 87 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 in xe_wopcm_size() 192 max_wopcm_size(struct xe_device * xe) max_wopcm_size() argument 212 struct xe_device *xe = wopcm_to_xe(wopcm); xe_wopcm_init() local [all...] |
| /linux/drivers/gpu/drm/xe/tests/ |
| H A D | xe_sriov_pf_service_kunit.c | 19 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 D | xe_migrate.c | 16 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 D | xe_kunit_helpers.c | 36 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() 43 dev_set_drvdata(xe->drm.dev, &xe->drm); in xe_kunit_helper_alloc_xe_device() 44 KUNIT_ASSERT_PTR_EQ(test, xe, kdev_to_xe_device(dev)); 46 return xe; in kunit_action_restore_priv() 77 struct xe_device *xe; in xe_kunit_helper_xe_device_test_init() 84 xe = xe_kunit_helper_alloc_xe_device(test, dev); in xe_kunit_helper_xe_device_test_init() 85 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xe); in xe_kunit_helper_xe_device_test_init() 73 struct xe_device *xe; xe_kunit_helper_xe_device_test_init() local 117 struct xe_device *xe = xe_device_const_cast(test->param_value); xe_kunit_helper_xe_device_live_test_init() local [all...] |
| /linux/drivers/gpu/drm/xe/display/ |
| H A D | xe_hdcp_gsc.c | 27 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 …]
|