Lines Matching refs:xe
39 static bool test_is_vf(struct xe_device *xe) in test_is_vf() argument
41 u32 value = xe_mmio_read32(xe_root_tile_mmio(xe), VF_CAP_REG); in test_is_vf()
57 void xe_sriov_probe_early(struct xe_device *xe) in xe_sriov_probe_early() argument
59 struct pci_dev *pdev = to_pci_dev(xe->drm.dev); in xe_sriov_probe_early()
61 bool has_sriov = xe->info.has_sriov; in xe_sriov_probe_early()
64 if (test_is_vf(xe)) in xe_sriov_probe_early()
66 else if (xe_sriov_pf_readiness(xe)) in xe_sriov_probe_early()
76 drm_info(&xe->drm, "Support for SR-IOV is not available\n"); in xe_sriov_probe_early()
80 xe_assert(xe, !xe->sriov.__mode); in xe_sriov_probe_early()
81 xe->sriov.__mode = mode; in xe_sriov_probe_early()
82 xe_assert(xe, xe->sriov.__mode); in xe_sriov_probe_early()
85 drm_info(&xe->drm, "Running in %s mode\n", in xe_sriov_probe_early()
86 xe_sriov_mode_to_string(xe_device_sriov_mode(xe))); in xe_sriov_probe_early()
91 struct xe_device *xe = arg; in fini_sriov() local
93 destroy_workqueue(xe->sriov.wq); in fini_sriov()
94 xe->sriov.wq = NULL; in fini_sriov()
106 int xe_sriov_init(struct xe_device *xe) in xe_sriov_init() argument
108 if (!IS_SRIOV(xe)) in xe_sriov_init()
111 if (IS_SRIOV_PF(xe)) { in xe_sriov_init()
112 int err = xe_sriov_pf_init_early(xe); in xe_sriov_init()
118 if (IS_SRIOV_VF(xe)) in xe_sriov_init()
119 xe_sriov_vf_init_early(xe); in xe_sriov_init()
121 xe_assert(xe, !xe->sriov.wq); in xe_sriov_init()
122 xe->sriov.wq = alloc_workqueue("xe-sriov-wq", 0, 0); in xe_sriov_init()
123 if (!xe->sriov.wq) in xe_sriov_init()
126 return drmm_add_action_or_reset(&xe->drm, fini_sriov, xe); in xe_sriov_init()
137 void xe_sriov_print_info(struct xe_device *xe, struct drm_printer *p) in xe_sriov_print_info() argument
139 drm_printf(p, "supported: %s\n", str_yes_no(xe_device_has_sriov(xe))); in xe_sriov_print_info()
140 drm_printf(p, "enabled: %s\n", str_yes_no(IS_SRIOV(xe))); in xe_sriov_print_info()
141 drm_printf(p, "mode: %s\n", xe_sriov_mode_to_string(xe_device_sriov_mode(xe))); in xe_sriov_print_info()