drm/i915: Unify uC variable types to avoid flooding checkpatch.pl
authorJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Fri, 6 Oct 2017 08:49:40 +0000 (11:49 +0300)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Fri, 6 Oct 2017 11:09:40 +0000 (14:09 +0300)
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)

Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: MichaƂ Winiarski <michal.winiarski@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171006084940.15910-1-joonas.lahtinen@linux.intel.com
drivers/gpu/drm/i915/i915_guc_submission.c
drivers/gpu/drm/i915/i915_guc_submission.h
drivers/gpu/drm/i915/intel_guc.h
drivers/gpu/drm/i915/intel_guc_fwif.h
drivers/gpu/drm/i915/intel_guc_log.c
drivers/gpu/drm/i915/intel_guc_log.h
drivers/gpu/drm/i915/intel_uc_fw.h

index 7460ab4a214c500bd6aed2b68d0c096bafe8f199..a2fad82532e4280108126cc787b3858b101b2550 100644 (file)
@@ -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;
index a7e61e6246ff11bf3cb06b3b732e9d9241aebbe4..cb4353b590595d4b89b61dc619f77f2ca5cd4ee5 100644 (file)
@@ -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);
index 094d64980882d95b3f2ddee2aedf3d5166669d58..aa9a7b55be6ead39c93a9a536c55537dd2a930ee 100644 (file)
@@ -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 {
index 7eb6b4fa1d6f953de393fe52d3f433aa968c7e7e..1c0a2a3de12111c8aad421c89111f9ed42ea2048 100644 (file)
  */
 
 struct uc_css_header {
-       uint32_t module_type;
+       u32 module_type;
        /* header_size includes all non-uCode bits, including css_header, rsa
         * key, modulus key and exponent data. */
-       uint32_t header_size_dw;
-       uint32_t header_version;
-       uint32_t module_id;
-       uint32_t module_vendor;
+       u32 header_size_dw;
+       u32 header_version;
+       u32 module_id;
+       u32 module_vendor;
        union {
                struct {
-                       uint8_t day;
-                       uint8_t month;
-                       uint16_t year;
+                       u8 day;
+                       u8 month;
+                       u16 year;
                };
-               uint32_t date;
+               u32 date;
        };
-       uint32_t size_dw; /* uCode plus header_size_dw */
-       uint32_t key_size_dw;
-       uint32_t modulus_size_dw;
-       uint32_t exponent_size_dw;
+       u32 size_dw; /* uCode plus header_size_dw */
+       u32 key_size_dw;
+       u32 modulus_size_dw;
+       u32 exponent_size_dw;
        union {
                struct {
-                       uint8_t hour;
-                       uint8_t min;
-                       uint16_t sec;
+                       u8 hour;
+                       u8 min;
+                       u16 sec;
                };
-               uint32_t time;
+               u32 time;
        };
 
        char username[8];
        char buildnumber[12];
        union {
                struct {
-                       uint32_t branch_client_version;
-                       uint32_t sw_version;
+                       u32 branch_client_version;
+                       u32 sw_version;
        } guc;
                struct {
-                       uint32_t sw_version;
-                       uint32_t reserved;
+                       u32 sw_version;
+                       u32 reserved;
        } huc;
        };
-       uint32_t prod_preprod_fw;
-       uint32_t reserved[12];
-       uint32_t header_info;
+       u32 prod_preprod_fw;
+       u32 reserved[12];
+       u32 header_info;
 } __packed;
 
 struct guc_doorbell_info {
index b7317a13354aeb8972cb5a47976fd7b8b879a9f2..76d3eb1e4614123052807b3bf978d716fefb59e9 100644 (file)
@@ -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);
index b5ec374d9b15b5a422e74c6efcac77ed6b150056..f512cf79339bc624d43faf540c0ca9ecee5dc636 100644 (file)
@@ -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 {
index fcaf597183009a23f018d26fdde294d5d575cb00..c3e9af4b9bf0eed2ff7b77d92f538f27f6cfef13 100644 (file)
@@ -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