Commit faf65486 authored by Joonas Lahtinen's avatar Joonas Lahtinen

drm/i915: Unify uC variable types to avoid flooding 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)
Signed-off-by: default avatarJoonas 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: default avatarSagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171006084940.15910-1-joonas.lahtinen@linux.intel.com
parent 822a4b67
...@@ -338,7 +338,7 @@ static void guc_stage_desc_init(struct intel_guc *guc, ...@@ -338,7 +338,7 @@ static void guc_stage_desc_init(struct intel_guc *guc,
for_each_engine_masked(engine, dev_priv, client->engines, tmp) { for_each_engine_masked(engine, dev_priv, client->engines, tmp) {
struct intel_context *ce = &ctx->engine[engine->id]; 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]; struct guc_execlist_context *lrc = &desc->lrc[guc_engine_id];
/* TODO: We have a design issue to be solved here. Only when we /* 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, ...@@ -388,13 +388,13 @@ static void guc_stage_desc_init(struct intel_guc *guc,
gfx_addr = guc_ggtt_offset(client->vma); gfx_addr = guc_ggtt_offset(client->vma);
desc->db_trigger_phy = sg_dma_address(client->vma->pages->sgl) + desc->db_trigger_phy = sg_dma_address(client->vma->pages->sgl) +
client->doorbell_offset; 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->db_trigger_uk = gfx_addr + client->doorbell_offset;
desc->process_desc = gfx_addr + client->proc_desc_offset; desc->process_desc = gfx_addr + client->proc_desc_offset;
desc->wq_addr = gfx_addr + GUC_DB_SIZE; desc->wq_addr = gfx_addr + GUC_DB_SIZE;
desc->wq_size = GUC_WQ_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, static void guc_stage_desc_fini(struct intel_guc *guc,
...@@ -755,8 +755,8 @@ static int guc_init_doorbell_hw(struct intel_guc *guc) ...@@ -755,8 +755,8 @@ static int guc_init_doorbell_hw(struct intel_guc *guc)
*/ */
static struct i915_guc_client * static struct i915_guc_client *
guc_client_alloc(struct drm_i915_private *dev_priv, guc_client_alloc(struct drm_i915_private *dev_priv,
uint32_t engines, u32 engines,
uint32_t priority, u32 priority,
struct i915_gem_context *ctx) struct i915_gem_context *ctx)
{ {
struct i915_guc_client *client; struct i915_guc_client *client;
......
...@@ -59,17 +59,17 @@ struct i915_guc_client { ...@@ -59,17 +59,17 @@ struct i915_guc_client {
struct intel_guc *guc; struct intel_guc *guc;
/* bitmap of (host) engine ids */ /* bitmap of (host) engine ids */
uint32_t engines; u32 engines;
uint32_t priority; u32 priority;
u32 stage_id; u32 stage_id;
uint32_t proc_desc_offset; u32 proc_desc_offset;
u16 doorbell_id; u16 doorbell_id;
unsigned long doorbell_offset; unsigned long doorbell_offset;
spinlock_t wq_lock; spinlock_t wq_lock;
/* Per-engine counts of GuC submissions */ /* 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); int i915_guc_submission_init(struct drm_i915_private *dev_priv);
......
...@@ -52,7 +52,8 @@ struct intel_guc { ...@@ -52,7 +52,8 @@ struct intel_guc {
struct i915_guc_client *execbuf_client; struct i915_guc_client *execbuf_client;
DECLARE_BITMAP(doorbell_bitmap, GUC_NUM_DOORBELLS); 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 */ /* GuC's FW specific registers used in MMIO send */
struct { struct {
......
...@@ -178,49 +178,49 @@ ...@@ -178,49 +178,49 @@
*/ */
struct uc_css_header { struct uc_css_header {
uint32_t module_type; u32 module_type;
/* header_size includes all non-uCode bits, including css_header, rsa /* header_size includes all non-uCode bits, including css_header, rsa
* key, modulus key and exponent data. */ * key, modulus key and exponent data. */
uint32_t header_size_dw; u32 header_size_dw;
uint32_t header_version; u32 header_version;
uint32_t module_id; u32 module_id;
uint32_t module_vendor; u32 module_vendor;
union { union {
struct { struct {
uint8_t day; u8 day;
uint8_t month; u8 month;
uint16_t year; u16 year;
}; };
uint32_t date; u32 date;
}; };
uint32_t size_dw; /* uCode plus header_size_dw */ u32 size_dw; /* uCode plus header_size_dw */
uint32_t key_size_dw; u32 key_size_dw;
uint32_t modulus_size_dw; u32 modulus_size_dw;
uint32_t exponent_size_dw; u32 exponent_size_dw;
union { union {
struct { struct {
uint8_t hour; u8 hour;
uint8_t min; u8 min;
uint16_t sec; u16 sec;
}; };
uint32_t time; u32 time;
}; };
char username[8]; char username[8];
char buildnumber[12]; char buildnumber[12];
union { union {
struct { struct {
uint32_t branch_client_version; u32 branch_client_version;
uint32_t sw_version; u32 sw_version;
} guc; } guc;
struct { struct {
uint32_t sw_version; u32 sw_version;
uint32_t reserved; u32 reserved;
} huc; } huc;
}; };
uint32_t prod_preprod_fw; u32 prod_preprod_fw;
uint32_t reserved[12]; u32 reserved[12];
uint32_t header_info; u32 header_info;
} __packed; } __packed;
struct guc_doorbell_info { struct guc_doorbell_info {
......
...@@ -528,7 +528,8 @@ int intel_guc_log_create(struct intel_guc *guc) ...@@ -528,7 +528,8 @@ int intel_guc_log_create(struct intel_guc *guc)
{ {
struct i915_vma *vma; struct i915_vma *vma;
unsigned long offset; unsigned long offset;
uint32_t size, flags; u32 flags;
u32 size;
int ret; int ret;
GEM_BUG_ON(guc->log.vma); GEM_BUG_ON(guc->log.vma);
......
...@@ -33,7 +33,7 @@ struct drm_i915_private; ...@@ -33,7 +33,7 @@ struct drm_i915_private;
struct intel_guc; struct intel_guc;
struct intel_guc_log { struct intel_guc_log {
uint32_t flags; u32 flags;
struct i915_vma *vma; struct i915_vma *vma;
/* The runtime stuff gets created only when GuC logging gets enabled */ /* The runtime stuff gets created only when GuC logging gets enabled */
struct { struct {
......
...@@ -50,18 +50,18 @@ struct intel_uc_fw { ...@@ -50,18 +50,18 @@ struct intel_uc_fw {
enum intel_uc_fw_status fetch_status; enum intel_uc_fw_status fetch_status;
enum intel_uc_fw_status load_status; enum intel_uc_fw_status load_status;
uint16_t major_ver_wanted; u16 major_ver_wanted;
uint16_t minor_ver_wanted; u16 minor_ver_wanted;
uint16_t major_ver_found; u16 major_ver_found;
uint16_t minor_ver_found; u16 minor_ver_found;
enum intel_uc_fw_type type; enum intel_uc_fw_type type;
uint32_t header_size; u32 header_size;
uint32_t header_offset; u32 header_offset;
uint32_t rsa_size; u32 rsa_size;
uint32_t rsa_offset; u32 rsa_offset;
uint32_t ucode_size; u32 ucode_size;
uint32_t ucode_offset; u32 ucode_offset;
}; };
static inline static inline
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment