Lines Matching +full:0 +full:xe

36 static bool test_is_vf(struct xe_device *xe)  in test_is_vf()  argument
38 u32 value = xe_mmio_read32(xe_root_mmio_gt(xe), VF_CAP_REG); in test_is_vf()
45 * @xe: the &xe_device to probe mode on
54 void xe_sriov_probe_early(struct xe_device *xe) in xe_sriov_probe_early() argument
56 struct pci_dev *pdev = to_pci_dev(xe->drm.dev); in xe_sriov_probe_early()
58 bool has_sriov = xe->info.has_sriov; in xe_sriov_probe_early()
61 if (test_is_vf(xe)) in xe_sriov_probe_early()
63 else if (xe_sriov_pf_readiness(xe)) in xe_sriov_probe_early()
73 drm_info(&xe->drm, "Support for SR-IOV is not available\n"); in xe_sriov_probe_early()
74 pci_sriov_set_totalvfs(pdev, 0); in xe_sriov_probe_early()
77 xe_assert(xe, !xe->sriov.__mode); in xe_sriov_probe_early()
78 xe->sriov.__mode = mode; in xe_sriov_probe_early()
79 xe_assert(xe, xe->sriov.__mode); in xe_sriov_probe_early()
82 drm_info(&xe->drm, "Running in %s mode\n", in xe_sriov_probe_early()
83 xe_sriov_mode_to_string(xe_device_sriov_mode(xe))); in xe_sriov_probe_early()
88 struct xe_device *xe = arg; in fini_sriov() local
90 destroy_workqueue(xe->sriov.wq); in fini_sriov()
91 xe->sriov.wq = NULL; in fini_sriov()
96 * @xe: the &xe_device to initialize
101 * Return: 0 on success or a negative error code on failure.
103 int xe_sriov_init(struct xe_device *xe) in xe_sriov_init() argument
105 if (!IS_SRIOV(xe)) in xe_sriov_init()
106 return 0; in xe_sriov_init()
108 if (IS_SRIOV_PF(xe)) { in xe_sriov_init()
109 int err = xe_sriov_pf_init_early(xe); in xe_sriov_init()
115 xe_assert(xe, !xe->sriov.wq); in xe_sriov_init()
116 xe->sriov.wq = alloc_workqueue("xe-sriov-wq", 0, 0); in xe_sriov_init()
117 if (!xe->sriov.wq) in xe_sriov_init()
120 return drmm_add_action_or_reset(&xe->drm, fini_sriov, xe); in xe_sriov_init()
125 * @xe: the &xe_device to print info from
130 void xe_sriov_print_info(struct xe_device *xe, struct drm_printer *p) in xe_sriov_print_info() argument
132 drm_printf(p, "supported: %s\n", str_yes_no(xe_device_has_sriov(xe))); in xe_sriov_print_info()
133 drm_printf(p, "enabled: %s\n", str_yes_no(IS_SRIOV(xe))); in xe_sriov_print_info()
134 drm_printf(p, "mode: %s\n", xe_sriov_mode_to_string(xe_device_sriov_mode(xe))); in xe_sriov_print_info()