if (!intel_uc_is_using_guc(uc))
return;
- intel_uc_fw_fetch(i915, &uc->guc.fw);
+ intel_uc_fw_fetch(&uc->guc.fw, i915);
if (intel_uc_is_using_huc(uc))
- intel_uc_fw_fetch(i915, &uc->huc.fw);
+ intel_uc_fw_fetch(&uc->huc.fw, i915);
}
void intel_uc_cleanup_firmwares(struct intel_uc *uc)
*
* Fetch uC firmware into GEM obj.
*/
-void intel_uc_fw_fetch(struct drm_i915_private *dev_priv,
- struct intel_uc_fw *uc_fw)
+void intel_uc_fw_fetch(struct intel_uc_fw *uc_fw, struct drm_i915_private *i915)
{
- struct pci_dev *pdev = dev_priv->drm.pdev;
struct drm_i915_gem_object *obj;
const struct firmware *fw = NULL;
struct uc_css_header *css;
GEM_BUG_ON(!intel_uc_fw_supported(uc_fw));
- err = request_firmware(&fw, uc_fw->path, &pdev->dev);
+ err = request_firmware(&fw, uc_fw->path, i915->drm.dev);
if (err)
goto fail;
goto fail;
}
- obj = i915_gem_object_create_shmem_from_data(dev_priv,
- fw->data, fw->size);
+ obj = i915_gem_object_create_shmem_from_data(i915, fw->data, fw->size);
if (IS_ERR(obj)) {
err = PTR_ERR(obj);
DRM_DEBUG_DRIVER("%s fw object_create err=%d\n",
void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw,
enum intel_uc_fw_type type,
struct drm_i915_private *i915);
-void intel_uc_fw_fetch(struct drm_i915_private *i915,
- struct intel_uc_fw *uc_fw);
+void intel_uc_fw_fetch(struct intel_uc_fw *uc_fw,
+ struct drm_i915_private *i915);
void intel_uc_fw_cleanup_fetch(struct intel_uc_fw *uc_fw);
int intel_uc_fw_upload(struct intel_uc_fw *uc_fw, struct intel_gt *gt,
u32 wopcm_offset, u32 dma_flags);