Lines Matching refs:gvt
69 static int expose_firmware_sysfs(struct intel_gvt *gvt) in expose_firmware_sysfs() argument
71 struct intel_gvt_device_info *info = &gvt->device_info; in expose_firmware_sysfs()
72 struct drm_i915_private *i915 = gvt->gt->i915; in expose_firmware_sysfs()
96 memcpy(gvt->firmware.cfg_space, i915->vgpu.initial_cfg_space, in expose_firmware_sysfs()
98 memcpy(p, gvt->firmware.cfg_space, info->cfg_space_size); in expose_firmware_sysfs()
102 memcpy(gvt->firmware.mmio, i915->vgpu.initial_mmio, in expose_firmware_sysfs()
105 memcpy(p, gvt->firmware.mmio, info->mmio_size); in expose_firmware_sysfs()
121 static void clean_firmware_sysfs(struct intel_gvt *gvt) in clean_firmware_sysfs() argument
123 struct pci_dev *pdev = to_pci_dev(gvt->gt->i915->drm.dev); in clean_firmware_sysfs()
134 void intel_gvt_free_firmware(struct intel_gvt *gvt) in intel_gvt_free_firmware() argument
136 if (!gvt->firmware.firmware_loaded) in intel_gvt_free_firmware()
137 clean_firmware_sysfs(gvt); in intel_gvt_free_firmware()
139 kfree(gvt->firmware.cfg_space); in intel_gvt_free_firmware()
140 vfree(gvt->firmware.mmio); in intel_gvt_free_firmware()
143 static int verify_firmware(struct intel_gvt *gvt, in verify_firmware() argument
146 struct intel_gvt_device_info *info = &gvt->device_info; in verify_firmware()
147 struct pci_dev *pdev = to_pci_dev(gvt->gt->i915->drm.dev); in verify_firmware()
198 int intel_gvt_load_firmware(struct intel_gvt *gvt) in intel_gvt_load_firmware() argument
200 struct intel_gvt_device_info *info = &gvt->device_info; in intel_gvt_load_firmware()
201 struct pci_dev *pdev = to_pci_dev(gvt->gt->i915->drm.dev); in intel_gvt_load_firmware()
202 struct intel_gvt_firmware *firmware = &gvt->firmware; in intel_gvt_load_firmware()
236 ret = request_firmware(&fw, path, gvt->gt->i915->drm.dev); in intel_gvt_load_firmware()
244 ret = verify_firmware(gvt, fw); in intel_gvt_load_firmware()
264 expose_firmware_sysfs(gvt); in intel_gvt_load_firmware()