Commit 5a01892a authored by Jani Nikula's avatar Jani Nikula

drm/i915/csr: switch to kernel types

Mixed C99 and kernel types use is getting ugly. Prefer kernel types.

sed -i 's/\buint\(8\|16\|32\|64\)_t\b/u\1/g'

Minor checkpatch/whitepace fixes sprinkled on top of the changed lines.

v2: more whitespace fixes (Ville, José)
Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190118120125.15484-5-jani.nikula@intel.com
parent 3d0c5005
...@@ -70,50 +70,50 @@ MODULE_FIRMWARE(BXT_CSR_PATH); ...@@ -70,50 +70,50 @@ MODULE_FIRMWARE(BXT_CSR_PATH);
struct intel_css_header { struct intel_css_header {
/* 0x09 for DMC */ /* 0x09 for DMC */
uint32_t module_type; u32 module_type;
/* Includes the DMC specific header in dwords */ /* Includes the DMC specific header in dwords */
uint32_t header_len; u32 header_len;
/* always value would be 0x10000 */ /* always value would be 0x10000 */
uint32_t header_ver; u32 header_ver;
/* Not used */ /* Not used */
uint32_t module_id; u32 module_id;
/* Not used */ /* Not used */
uint32_t module_vendor; u32 module_vendor;
/* in YYYYMMDD format */ /* in YYYYMMDD format */
uint32_t date; u32 date;
/* Size in dwords (CSS_Headerlen + PackageHeaderLen + dmc FWsLen)/4 */ /* Size in dwords (CSS_Headerlen + PackageHeaderLen + dmc FWsLen)/4 */
uint32_t size; u32 size;
/* Not used */ /* Not used */
uint32_t key_size; u32 key_size;
/* Not used */ /* Not used */
uint32_t modulus_size; u32 modulus_size;
/* Not used */ /* Not used */
uint32_t exponent_size; u32 exponent_size;
/* Not used */ /* Not used */
uint32_t reserved1[12]; u32 reserved1[12];
/* Major Minor */ /* Major Minor */
uint32_t version; u32 version;
/* Not used */ /* Not used */
uint32_t reserved2[8]; u32 reserved2[8];
/* Not used */ /* Not used */
uint32_t kernel_header_info; u32 kernel_header_info;
} __packed; } __packed;
struct intel_fw_info { struct intel_fw_info {
uint16_t reserved1; u16 reserved1;
/* Stepping (A, B, C, ..., *). * is a wildcard */ /* Stepping (A, B, C, ..., *). * is a wildcard */
char stepping; char stepping;
...@@ -121,8 +121,8 @@ struct intel_fw_info { ...@@ -121,8 +121,8 @@ struct intel_fw_info {
/* Sub-stepping (0, 1, ..., *). * is a wildcard */ /* Sub-stepping (0, 1, ..., *). * is a wildcard */
char substepping; char substepping;
uint32_t offset; u32 offset;
uint32_t reserved2; u32 reserved2;
} __packed; } __packed;
struct intel_package_header { struct intel_package_header {
...@@ -135,14 +135,14 @@ struct intel_package_header { ...@@ -135,14 +135,14 @@ struct intel_package_header {
unsigned char reserved[10]; unsigned char reserved[10];
/* Number of valid entries in the FWInfo array below */ /* Number of valid entries in the FWInfo array below */
uint32_t num_entries; u32 num_entries;
struct intel_fw_info fw_info[20]; struct intel_fw_info fw_info[20];
} __packed; } __packed;
struct intel_dmc_header { struct intel_dmc_header {
/* always value would be 0x40403E3E */ /* always value would be 0x40403E3E */
uint32_t signature; u32 signature;
/* DMC binary header length */ /* DMC binary header length */
unsigned char header_len; unsigned char header_len;
...@@ -151,30 +151,30 @@ struct intel_dmc_header { ...@@ -151,30 +151,30 @@ struct intel_dmc_header {
unsigned char header_ver; unsigned char header_ver;
/* Reserved */ /* Reserved */
uint16_t dmcc_ver; u16 dmcc_ver;
/* Major, Minor */ /* Major, Minor */
uint32_t project; u32 project;
/* Firmware program size (excluding header) in dwords */ /* Firmware program size (excluding header) in dwords */
uint32_t fw_size; u32 fw_size;
/* Major Minor version */ /* Major Minor version */
uint32_t fw_version; u32 fw_version;
/* Number of valid MMIO cycles present. */ /* Number of valid MMIO cycles present. */
uint32_t mmio_count; u32 mmio_count;
/* MMIO address */ /* MMIO address */
uint32_t mmioaddr[8]; u32 mmioaddr[8];
/* MMIO data */ /* MMIO data */
uint32_t mmiodata[8]; u32 mmiodata[8];
/* FW filename */ /* FW filename */
unsigned char dfile[32]; unsigned char dfile[32];
uint32_t reserved1[2]; u32 reserved1[2];
} __packed; } __packed;
struct stepping_info { struct stepping_info {
...@@ -230,7 +230,7 @@ intel_get_stepping_info(struct drm_i915_private *dev_priv) ...@@ -230,7 +230,7 @@ intel_get_stepping_info(struct drm_i915_private *dev_priv)
static void gen9_set_dc_state_debugmask(struct drm_i915_private *dev_priv) static void gen9_set_dc_state_debugmask(struct drm_i915_private *dev_priv)
{ {
uint32_t val, mask; u32 val, mask;
mask = DC_STATE_DEBUG_MASK_MEMORY_UP; mask = DC_STATE_DEBUG_MASK_MEMORY_UP;
...@@ -257,7 +257,7 @@ static void gen9_set_dc_state_debugmask(struct drm_i915_private *dev_priv) ...@@ -257,7 +257,7 @@ static void gen9_set_dc_state_debugmask(struct drm_i915_private *dev_priv)
void intel_csr_load_program(struct drm_i915_private *dev_priv) void intel_csr_load_program(struct drm_i915_private *dev_priv)
{ {
u32 *payload = dev_priv->csr.dmc_payload; u32 *payload = dev_priv->csr.dmc_payload;
uint32_t i, fw_size; u32 i, fw_size;
if (!HAS_CSR(dev_priv)) { if (!HAS_CSR(dev_priv)) {
DRM_ERROR("No CSR support available for this platform\n"); DRM_ERROR("No CSR support available for this platform\n");
...@@ -289,17 +289,17 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv) ...@@ -289,17 +289,17 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv)
gen9_set_dc_state_debugmask(dev_priv); gen9_set_dc_state_debugmask(dev_priv);
} }
static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv, static u32 *parse_csr_fw(struct drm_i915_private *dev_priv,
const struct firmware *fw) const struct firmware *fw)
{ {
struct intel_css_header *css_header; struct intel_css_header *css_header;
struct intel_package_header *package_header; struct intel_package_header *package_header;
struct intel_dmc_header *dmc_header; struct intel_dmc_header *dmc_header;
struct intel_csr *csr = &dev_priv->csr; struct intel_csr *csr = &dev_priv->csr;
const struct stepping_info *si = intel_get_stepping_info(dev_priv); const struct stepping_info *si = intel_get_stepping_info(dev_priv);
uint32_t dmc_offset = CSR_DEFAULT_FW_OFFSET, readcount = 0, nbytes; u32 dmc_offset = CSR_DEFAULT_FW_OFFSET, readcount = 0, nbytes;
uint32_t i; u32 i;
uint32_t *dmc_payload; u32 *dmc_payload;
if (!fw) if (!fw)
return NULL; return NULL;
......
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