Skip to contentSkip to conversation

drm/i915: Unify uC variable types to avoid floding checkpatch.pl

PATCH In review Joonas Lahtinen 3 participants 4 messages Oct 6, 2017

Subsystems (2)
lore
Share & tools
lore

Joonas Lahtinen

author maintainer
#0 lore raw

PATCH v2 1/1 drm/i915: Unify uC variable types to avoid floding checkpatch.pl

With the code motion mostly done, convert all the uC code away from uint??_t at once (only a couple dozen variables), so that reading the checkpatch.pl output should actually pinpoint if a new uint??_t was accidentally introduced.

v2: - Include intel_uc_fw.h too (Sagar)

Cc Michal Wajdeczko <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michał Winiarski <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Sujaritha Sundaresan <[email protected]>
---
 drivers/gpu/drm/i915/i915_guc_submission.c | 10 +++----
 drivers/gpu/drm/i915/i915_guc_submission.h |  8 ++---
 drivers/gpu/drm/i915/intel_guc.h           |  3 +-
 drivers/gpu/drm/i915/intel_guc_fwif.h      | 48 +++++++++++++++---------------
 drivers/gpu/drm/i915/intel_guc_log.c       |  3 +-
 drivers/gpu/drm/i915/intel_guc_log.h       |  2 +-
 drivers/gpu/drm/i915/intel_uc_fw.h         | 20 ++++++-------
 7 files changed, 48 insertions(+), 46 deletions(-)
drivers/gpu/drm/i915/i915_guc_submission.c +5 -5
index 7460ab4a214c..a2fad82532e4 100644
@@ -338,7 +338,7 @@ static void guc_stage_desc_init(struct intel_guc *guc,
 
 	for_each_engine_masked(engine, dev_priv, client->engines, tmp) {
 		struct intel_context *ce = &ctx->engine[engine->id];
-		uint32_t guc_engine_id = engine->guc_id;
+		u32 guc_engine_id = engine->guc_id;
 		struct guc_execlist_context *lrc = &desc->lrc[guc_engine_id];
 
 		/* TODO: We have a design issue to be solved here. Only when we
@@ -388,13 +388,13 @@ static void guc_stage_desc_init(struct intel_guc *guc,
 	gfx_addr = guc_ggtt_offset(client->vma);
 	desc->db_trigger_phy = sg_dma_address(client->vma->pages->sgl) +
 				client->doorbell_offset;
-	desc->db_trigger_cpu = (uintptr_t)__get_doorbell(client);
+	desc->db_trigger_cpu = (u64)__get_doorbell(client);
 	desc->db_trigger_uk = gfx_addr + client->doorbell_offset;
 	desc->process_desc = gfx_addr + client->proc_desc_offset;
 	desc->wq_addr = gfx_addr + GUC_DB_SIZE;
 	desc->wq_size = GUC_WQ_SIZE;
 
-	desc->desc_private = (uintptr_t)client;
+	desc->desc_private = (u64)client;
 }
 
 static void guc_stage_desc_fini(struct intel_guc *guc,
@@ -755,8 +755,8 @@ static int guc_init_doorbell_hw(struct intel_guc *guc)
  */
 static struct i915_guc_client *
 guc_client_alloc(struct drm_i915_private *dev_priv,
-		 uint32_t engines,
-		 uint32_t priority,
+		 u32 engines,
+		 u32 priority,
 		 struct i915_gem_context *ctx)
 {
 	struct i915_guc_client *client;
drivers/gpu/drm/i915/i915_guc_submission.h +4 -4
index a7e61e6246ff..cb4353b59059 100644
@@ -59,17 +59,17 @@ struct i915_guc_client {
 	struct intel_guc *guc;
 
 	/* bitmap of (host) engine ids */
-	uint32_t engines;
-	uint32_t priority;
+	u32 engines;
+	u32 priority;
 	u32 stage_id;
-	uint32_t proc_desc_offset;
+	u32 proc_desc_offset;
 
 	u16 doorbell_id;
 	unsigned long doorbell_offset;
 
 	spinlock_t wq_lock;
 	/* Per-engine counts of GuC submissions */
-	uint64_t submissions[I915_NUM_ENGINES];
+	u64 submissions[I915_NUM_ENGINES];
 };
 
 int i915_guc_submission_init(struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/intel_guc.h +2 -1
index 094d64980882..aa9a7b55be6e 100644
@@ -52,7 +52,8 @@ struct intel_guc {
 	struct i915_guc_client *execbuf_client;
 
 	DECLARE_BITMAP(doorbell_bitmap, GUC_NUM_DOORBELLS);
-	uint32_t db_cacheline;		/* Cyclic counter mod pagesize	*/
+	/* Cyclic counter mod pagesize	*/
+	u32 db_cacheline;
 
 	/* GuC's FW specific registers used in MMIO send */
 	struct {
drivers/gpu/drm/i915/intel_guc_fwif.h +24 -24

73 lines not on this page · raw message

drivers/gpu/drm/i915/intel_guc_log.c +2 -1
index b7317a13354a..76d3eb1e4614 100644
@@ -528,7 +528,8 @@ int intel_guc_log_create(struct intel_guc *guc)
 {
 	struct i915_vma *vma;
 	unsigned long offset;
-	uint32_t size, flags;
+	u32 flags;
+	u32 size;
 	int ret;
 
 	GEM_BUG_ON(guc->log.vma);
drivers/gpu/drm/i915/intel_guc_log.h +1 -1
index b5ec374d9b15..f512cf79339b 100644
@@ -33,7 +33,7 @@ struct drm_i915_private;
 struct intel_guc;
 
 struct intel_guc_log {
-	uint32_t flags;
+	u32 flags;
 	struct i915_vma *vma;
 	/* The runtime stuff gets created only when GuC logging gets enabled */
 	struct {
drivers/gpu/drm/i915/intel_uc_fw.h +10 -10
index fcaf59718300..c3e9af4b9bf0 100644
@@ -50,18 +50,18 @@ struct intel_uc_fw {
 	enum intel_uc_fw_status fetch_status;
 	enum intel_uc_fw_status load_status;
 
-	uint16_t major_ver_wanted;
-	uint16_t minor_ver_wanted;
-	uint16_t major_ver_found;
-	uint16_t minor_ver_found;
+	u16 major_ver_wanted;
+	u16 minor_ver_wanted;
+	u16 major_ver_found;
+	u16 minor_ver_found;
 
 	enum intel_uc_fw_type type;
-	uint32_t header_size;
-	uint32_t header_offset;
-	uint32_t rsa_size;
-	uint32_t rsa_offset;
-	uint32_t ucode_size;
-	uint32_t ucode_offset;
+	u32 header_size;
+	u32 header_offset;
+	u32 rsa_size;
+	u32 rsa_offset;
+	u32 ucode_size;
+	u32 ucode_offset;
 };
 
 static inline
Signature · 6 lines
2.13.6

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v2 1/1
#1 lore raw
Quoted 15 lines · Joonas Lahtinen

With the code motion mostly done, convert all the uC code away from uint??_t at once (only a couple dozen variables), so that reading the checkpatch.pl output should actually pinpoint if a new uint??_t was accidentally introduced.

v2: - Include intel_uc_fw.h too (Sagar)

Cc Michal Wajdeczko <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michał Winiarski <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Sujaritha Sundaresan <[email protected]>
Quoted 1 line

---

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author maintainer
#2 lore raw
Quoted 20 lines · Michal Wajdeczko
Quoted 15 lines · Joonas Lahtinen

With the code motion mostly done, convert all the uC code away from uint??_t at once (only a couple dozen variables), so that reading the checkpatch.pl output should actually pinpoint if a new uint??_t was accidentally introduced.

v2: - Include intel_uc_fw.h too (Sagar)

Cc Michal Wajdeczko <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Michał Winiarski <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Sujaritha Sundaresan <[email protected]>
Quoted 1 line

---

Quoted 1 line

Thanks for the review, I fixed a typo and pushed this.

Regards, Joonas

Signature · 7 lines
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

✗ Fi.CI.BAT: failure for drm/i915: Unify uC variable types to avoid floding checkpatch.pl

In reply to Joonas Lahtinen
== Series Details ==

== Series Details ==

Series: drm/i915: Unify uC variable types to avoid floding checkpatch.pl
URL : https://patchwork.freedesktop.org/series/31473/
State : failure

== Summary ==

Series 31473 revision 1 was fully merged or fully failed: no git log

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx