Lines Matching +full:0 +full:xe

39 static bool test_is_vf(struct xe_device *xe)
41 u32 value = xe_mmio_read32(xe_root_tile_mmio(xe), VF_CAP_REG);
48 * @xe: the &xe_device to probe mode on
57 void xe_sriov_probe_early(struct xe_device *xe)
59 struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
61 bool has_sriov = xe->info.has_sriov;
64 if (test_is_vf(xe))
66 else if (xe_sriov_pf_readiness(xe))
76 drm_info(&xe->drm, "Support for SR-IOV is not available\n");
77 pci_sriov_set_totalvfs(pdev, 0);
80 xe_assert(xe, !xe->sriov.__mode);
81 xe->sriov.__mode = mode;
82 xe_assert(xe, xe->sriov.__mode);
84 if (IS_SRIOV(xe))
85 drm_info(&xe->drm, "Running in %s mode\n",
86 xe_sriov_mode_to_string(xe_device_sriov_mode(xe)));
91 struct xe_device *xe = arg;
93 destroy_workqueue(xe->sriov.wq);
94 xe->sriov.wq = NULL;
99 * @xe: the &xe_device to initialize
104 * Return: 0 on success or a negative error code on failure.
106 int xe_sriov_init(struct xe_device *xe)
108 if (!IS_SRIOV(xe))
109 return 0;
111 if (IS_SRIOV_PF(xe)) {
112 int err = xe_sriov_pf_init_early(xe);
118 if (IS_SRIOV_VF(xe))
119 xe_sriov_vf_init_early(xe);
121 xe_assert(xe, !xe->sriov.wq);
122 xe->sriov.wq = alloc_workqueue("xe-sriov-wq", 0, 0);
123 if (!xe->sriov.wq)
126 return drmm_add_action_or_reset(&xe->drm, fini_sriov, xe);
132 * @xe: the &xe_device to print info from
137 void xe_sriov_print_info(struct xe_device *xe, struct drm_printer *p)
139 drm_printf(p, "supported: %s\n", str_yes_no(xe_device_has_sriov(xe)));
140 drm_printf(p, "enabled: %s\n", str_yes_no(IS_SRIOV(xe)));
141 drm_printf(p, "mode: %s\n", xe_sriov_mode_to_string(xe_device_sriov_mode(xe)));