diff mbox series

drm/i915/uc: Reorder params in intel_uc_fw_fetch

Message ID 20190725210314.21188-1-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/uc: Reorder params in intel_uc_fw_fetch | expand

Commit Message

Michal Wajdeczko July 25, 2019, 9:03 p.m. UTC
All intel_uc_fw_* functions are taking uc_fw as first param
except intel_uc_fw_fetch() which is taking i915. Fix that.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_uc.c    | 4 ++--
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 8 +++-----
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 4 ++--
 3 files changed, 7 insertions(+), 9 deletions(-)

Comments

Chris Wilson July 25, 2019, 9:42 p.m. UTC | #1
Quoting Michal Wajdeczko (2019-07-25 22:03:14)
> All intel_uc_fw_* functions are taking uc_fw as first param
> except intel_uc_fw_fetch() which is taking i915. Fix that.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Has a certain logic to it,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Chris Wilson July 26, 2019, 12:26 a.m. UTC | #2
Quoting Patchwork (2019-07-26 00:51:44)
> == Series Details ==
> 
> Series: drm/i915/uc: Reorder params in intel_uc_fw_fetch
> URL   : https://patchwork.freedesktop.org/series/64265/
> State : success
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_6555 -> Patchwork_13758
> ====================================================
> 
> Summary
> -------
> 
>   **SUCCESS**

And with sanity confirmed, pushed.  Thanks,
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index b1815abecf30..8205b3c81048 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -355,10 +355,10 @@  void intel_uc_fetch_firmwares(struct intel_uc *uc)
 	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)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
index 168d368bcd3e..676ee84ef6ab 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -190,10 +190,8 @@  void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw,
  *
  * 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;
@@ -202,7 +200,7 @@  void intel_uc_fw_fetch(struct drm_i915_private *dev_priv,
 
 	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;
 
@@ -295,7 +293,7 @@  void intel_uc_fw_fetch(struct drm_i915_private *dev_priv,
 		goto fail;
 	}
 
-	obj = i915_gem_object_create_shmem_from_data(dev_priv,
+	obj = i915_gem_object_create_shmem_from_data(i915,
 						     fw->data, fw->size);
 	if (IS_ERR(obj)) {
 		err = PTR_ERR(obj);
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
index ff684c0c808e..eddbb237fabe 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
@@ -169,8 +169,8 @@  static inline u32 intel_uc_fw_get_upload_size(struct intel_uc_fw *uc_fw)
 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);