drm/i915: small isolated c99 types to kernel types switch
authorJani Nikula <jani.nikula@intel.com>
Wed, 16 Jan 2019 09:15:19 +0000 (11:15 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 17 Jan 2019 07:02:00 +0000 (09:02 +0200)
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 fixes sprinkled on top of the changed lines.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/14ed72e7f04c9340a057855c5950b54811f8a477.1547629303.git.jani.nikula@intel.com
18 files changed:
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_fence_reg.c
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_perf.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_atomic.c
drivers/gpu/drm/i915/intel_atomic_plane.c
drivers/gpu/drm/i915/intel_dp_mst.c
drivers/gpu/drm/i915/intel_dpio_phy.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_fbc.c
drivers/gpu/drm/i915/intel_fifo_underrun.c
drivers/gpu/drm/i915/intel_hdcp.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_pipe_crc.c
drivers/gpu/drm/i915/intel_psr.c
drivers/gpu/drm/i915/intel_ringbuffer.h
drivers/gpu/drm/i915/intel_runtime_pm.c

index 7185a5b4a5ca1a95fe7b72b4ca11536ab69b506c..b359390ba22c09b46d19d75697ccafb78ac8c148 100644 (file)
@@ -713,8 +713,8 @@ void i915_gem_object_free(struct drm_i915_gem_object *obj)
 static int
 i915_gem_create(struct drm_file *file,
                struct drm_i915_private *dev_priv,
-               uint64_t size,
-               uint32_t *handle_p)
+               u64 size,
+               u32 *handle_p)
 {
        struct drm_i915_gem_object *obj;
        int ret;
@@ -1573,8 +1573,8 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
 {
        struct drm_i915_gem_set_domain *args = data;
        struct drm_i915_gem_object *obj;
-       uint32_t read_domains = args->read_domains;
-       uint32_t write_domain = args->write_domain;
+       u32 read_domains = args->read_domains;
+       u32 write_domain = args->write_domain;
        int err;
 
        /* Only handle setting domains to types used by the CPU. */
@@ -1756,7 +1756,7 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
        if (IS_ERR((void *)addr))
                return addr;
 
-       args->addr_ptr = (uint64_t) addr;
+       args->addr_ptr = (u64)addr;
 
        return 0;
 }
@@ -2158,8 +2158,8 @@ static void i915_gem_object_free_mmap_offset(struct drm_i915_gem_object *obj)
 int
 i915_gem_mmap_gtt(struct drm_file *file,
                  struct drm_device *dev,
-                 uint32_t handle,
-                 uint64_t *offset)
+                 u32 handle,
+                 u64 *offset)
 {
        struct drm_i915_gem_object *obj;
        int ret;
index f7947d89cf453aa1029940718fb785020297ab92..46e259661294e6d715765a9a390b630d3ad57f80 100644 (file)
@@ -555,8 +555,8 @@ void i915_gem_restore_fences(struct drm_i915_private *dev_priv)
 void
 i915_gem_detect_bit_6_swizzle(struct drm_i915_private *dev_priv)
 {
-       uint32_t swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
-       uint32_t swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
+       u32 swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
+       u32 swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
 
        if (INTEL_GEN(dev_priv) >= 8 || IS_VALLEYVIEW(dev_priv)) {
                /*
@@ -579,7 +579,7 @@ i915_gem_detect_bit_6_swizzle(struct drm_i915_private *dev_priv)
                                swizzle_y = I915_BIT_6_SWIZZLE_NONE;
                        }
                } else {
-                       uint32_t dimm_c0, dimm_c1;
+                       u32 dimm_c0, dimm_c1;
                        dimm_c0 = I915_READ(MAD_DIMM_C0);
                        dimm_c1 = I915_READ(MAD_DIMM_C1);
                        dimm_c0 &= MAD_DIMM_A_SIZE_MASK | MAD_DIMM_B_SIZE_MASK;
@@ -611,7 +611,7 @@ i915_gem_detect_bit_6_swizzle(struct drm_i915_private *dev_priv)
                swizzle_y = I915_BIT_6_SWIZZLE_NONE;
        } else if (IS_MOBILE(dev_priv) ||
                   IS_I915G(dev_priv) || IS_I945G(dev_priv)) {
-               uint32_t dcc;
+               u32 dcc;
 
                /* On 9xx chipsets, channel interleave by the CPU is
                 * determined by DCC.  For single-channel, neither the CPU
index 5eaf586c4d48cfe173990aad6b68362824c17afc..1f8e80e31b499e92c8413686c9a3f89940dc5ff0 100644 (file)
@@ -1082,7 +1082,7 @@ i915_error_object_create(struct drm_i915_private *i915,
 /* The error capture is special as tries to run underneath the normal
  * locking rules - so we use the raw version of the i915_gem_active lookup.
  */
-static inline uint32_t
+static inline u32
 __active_get_seqno(struct i915_gem_active *active)
 {
        struct i915_request *request;
@@ -1153,11 +1153,11 @@ static u32 capture_error_bo(struct drm_i915_error_buffer *err,
  *
  * It's only a small step better than a random number in its current form.
  */
-static uint32_t i915_error_generate_code(struct drm_i915_private *dev_priv,
-                                        struct i915_gpu_state *error,
-                                        int *engine_id)
+static u32 i915_error_generate_code(struct drm_i915_private *dev_priv,
+                                   struct i915_gpu_state *error,
+                                   int *engine_id)
 {
-       uint32_t error_code = 0;
+       u32 error_code = 0;
        int i;
 
        /* IPEHR would be an ideal way to detect errors, as it's the gross
index faff6cf1aaa14061bb88ec99b2d2ee9883601734..727118301f919dfbe594692229e8b53f7f958cd8 100644 (file)
@@ -3021,7 +3021,7 @@ static bool chv_is_valid_mux_addr(struct drm_i915_private *dev_priv, u32 addr)
                (addr >= 0x182300 && addr <= 0x1823A4);
 }
 
-static uint32_t mask_reg_value(u32 reg, u32 val)
+static u32 mask_reg_value(u32 reg, u32 val)
 {
        /* HALF_SLICE_CHICKEN2 is programmed with a the
         * WaDisableSTUnitPowerOptimization workaround. Make sure the value
index fad5a9e8b44d357b8ead2ca435d1b68bc861b613..9a1340cfda6c28500b99feef1eac5ee902d44d21 100644 (file)
  */
 
 typedef struct {
-       uint32_t reg;
+       u32 reg;
 } i915_reg_t;
 
 #define _MMIO(r) ((const i915_reg_t){ .reg = (r) })
 
 #define INVALID_MMIO_REG _MMIO(0)
 
-static inline uint32_t i915_mmio_reg_offset(i915_reg_t reg)
+static inline u32 i915_mmio_reg_offset(i915_reg_t reg)
 {
        return reg.reg;
 }
index d8dbc9980281521973ceae05928430333e0c070e..16263add3cdda4bf1ef90a1ed4f7d5adcfcacdcc 100644 (file)
@@ -46,7 +46,7 @@
 int intel_digital_connector_atomic_get_property(struct drm_connector *connector,
                                                const struct drm_connector_state *state,
                                                struct drm_property *property,
-                                               uint64_t *val)
+                                               u64 *val)
 {
        struct drm_device *dev = connector->dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
@@ -78,7 +78,7 @@ int intel_digital_connector_atomic_get_property(struct drm_connector *connector,
 int intel_digital_connector_atomic_set_property(struct drm_connector *connector,
                                                struct drm_connector_state *state,
                                                struct drm_property *property,
-                                               uint64_t val)
+                                               u64 val)
 {
        struct drm_device *dev = connector->dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
index 683a75dad4fb4d7d52b89ca2b4cd132e593f42c3..9a2fdc77ebcbbab9bcbce736dafbd3440eea92f9 100644 (file)
@@ -311,7 +311,7 @@ int
 intel_plane_atomic_get_property(struct drm_plane *plane,
                                const struct drm_plane_state *state,
                                struct drm_property *property,
-                               uint64_t *val)
+                               u64 *val)
 {
        DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n",
                      property->base.id, property->name);
@@ -334,7 +334,7 @@ int
 intel_plane_atomic_set_property(struct drm_plane *plane,
                                struct drm_plane_state *state,
                                struct drm_property *property,
-                               uint64_t val)
+                               u64 val)
 {
        DRM_DEBUG_KMS("Unknown property [PROP:%d:%s]\n",
                      property->base.id, property->name);
index 778c887108b76662db723069d2d2c20664cc9f77..909b9f5554583f8e302ac99ed9961017b6cebbf6 100644 (file)
@@ -239,7 +239,7 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
        struct intel_connector *connector =
                to_intel_connector(conn_state->connector);
        int ret;
-       uint32_t temp;
+       u32 temp;
 
        /* MST encoders are bound to a crtc, not to a connector,
         * force the mapping here for get_hw_state.
index 3c7f10d1765824ba32d0899b6e50e84d488518e8..95cb8b154f87938946b22d1f867ac43e38fe9c37 100644 (file)
@@ -413,7 +413,7 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,
        }
 
        if (phy_info->rcomp_phy != -1) {
-               uint32_t grc_code;
+               u32 grc_code;
 
                bxt_phy_wait_grc_done(dev_priv, phy_info->rcomp_phy);
 
@@ -445,7 +445,7 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,
 void bxt_ddi_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy)
 {
        const struct bxt_ddi_phy_info *phy_info;
-       uint32_t val;
+       u32 val;
 
        phy_info = bxt_get_phy_info(dev_priv, phy);
 
@@ -515,7 +515,7 @@ bool bxt_ddi_phy_verify_state(struct drm_i915_private *dev_priv,
                              enum dpio_phy phy)
 {
        const struct bxt_ddi_phy_info *phy_info;
-       uint32_t mask;
+       u32 mask;
        bool ok;
 
        phy_info = bxt_get_phy_info(dev_priv, phy);
@@ -567,8 +567,8 @@ bool bxt_ddi_phy_verify_state(struct drm_i915_private *dev_priv,
 #undef _CHK
 }
 
-uint8_t
-bxt_ddi_phy_calc_lane_lat_optim_mask(uint8_t lane_count)
+u8
+bxt_ddi_phy_calc_lane_lat_optim_mask(u8 lane_count)
 {
        switch (lane_count) {
        case 1:
@@ -585,7 +585,7 @@ bxt_ddi_phy_calc_lane_lat_optim_mask(uint8_t lane_count)
 }
 
 void bxt_ddi_phy_set_lane_optim_mask(struct intel_encoder *encoder,
-                                    uint8_t lane_lat_optim_mask)
+                                    u8 lane_lat_optim_mask)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
        enum port port = encoder->port;
@@ -610,7 +610,7 @@ void bxt_ddi_phy_set_lane_optim_mask(struct intel_encoder *encoder,
        }
 }
 
-uint8_t
+u8
 bxt_ddi_phy_get_lane_lat_optim_mask(struct intel_encoder *encoder)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
@@ -618,7 +618,7 @@ bxt_ddi_phy_get_lane_lat_optim_mask(struct intel_encoder *encoder)
        enum dpio_phy phy;
        enum dpio_channel ch;
        int lane;
-       uint8_t mask;
+       u8 mask;
 
        bxt_port_to_phy_channel(dev_priv, port, &phy, &ch);
 
@@ -739,7 +739,7 @@ void chv_data_lane_soft_reset(struct intel_encoder *encoder,
        enum dpio_channel ch = vlv_dport_to_channel(enc_to_dig_port(&encoder->base));
        struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
        enum pipe pipe = crtc->pipe;
-       uint32_t val;
+       u32 val;
 
        val = vlv_dpio_read(dev_priv, pipe, VLV_PCS01_DW0(ch));
        if (reset)
index eed0da03ff5e4262640c45244d246d30720e8c93..cc6379422bc06d1d44be8c5521d71c766486c389 100644 (file)
@@ -800,15 +800,15 @@ u32 intel_calculate_mcr_s_ss_select(struct drm_i915_private *dev_priv)
        return mcr_s_ss_select;
 }
 
-static inline uint32_t
+static inline u32
 read_subslice_reg(struct drm_i915_private *dev_priv, int slice,
                  int subslice, i915_reg_t reg)
 {
-       uint32_t mcr_slice_subslice_mask;
-       uint32_t mcr_slice_subslice_select;
-       uint32_t default_mcr_s_ss_select;
-       uint32_t mcr;
-       uint32_t ret;
+       u32 mcr_slice_subslice_mask;
+       u32 mcr_slice_subslice_select;
+       u32 default_mcr_s_ss_select;
+       u32 mcr;
+       u32 ret;
        enum forcewake_domains fw_domains;
 
        if (INTEL_GEN(dev_priv) >= 11) {
index ccd5e110a19c9e659ce30252bf4047d3c27230e3..ec72be4b7a7bb7a31d5c2f0ed9ab8ddcc7cde5f6 100644 (file)
@@ -594,7 +594,7 @@ static bool stride_is_valid(struct drm_i915_private *dev_priv,
 }
 
 static bool pixel_format_is_valid(struct drm_i915_private *dev_priv,
-                                 uint32_t pixel_format)
+                                 u32 pixel_format)
 {
        switch (pixel_format) {
        case DRM_FORMAT_XRGB8888:
index 9b39975c8389a6d3e15aab2736bd7bd70ab1b10d..3b9285130ef54a8a15c35e3f009c27418e05c40b 100644 (file)
@@ -127,8 +127,8 @@ static void ironlake_set_fifo_underrun_reporting(struct drm_device *dev,
                                                 enum pipe pipe, bool enable)
 {
        struct drm_i915_private *dev_priv = to_i915(dev);
-       uint32_t bit = (pipe == PIPE_A) ? DE_PIPEA_FIFO_UNDERRUN :
-                                         DE_PIPEB_FIFO_UNDERRUN;
+       u32 bit = (pipe == PIPE_A) ?
+               DE_PIPEA_FIFO_UNDERRUN : DE_PIPEB_FIFO_UNDERRUN;
 
        if (enable)
                ilk_enable_display_irq(dev_priv, bit);
@@ -140,7 +140,7 @@ static void ivybridge_check_fifo_underruns(struct intel_crtc *crtc)
 {
        struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
        enum pipe pipe = crtc->pipe;
-       uint32_t err_int = I915_READ(GEN7_ERR_INT);
+       u32 err_int = I915_READ(GEN7_ERR_INT);
 
        lockdep_assert_held(&dev_priv->irq_lock);
 
@@ -193,8 +193,8 @@ static void ibx_set_fifo_underrun_reporting(struct drm_device *dev,
                                            bool enable)
 {
        struct drm_i915_private *dev_priv = to_i915(dev);
-       uint32_t bit = (pch_transcoder == PIPE_A) ?
-                      SDE_TRANSA_FIFO_UNDER : SDE_TRANSB_FIFO_UNDER;
+       u32 bit = (pch_transcoder == PIPE_A) ?
+               SDE_TRANSA_FIFO_UNDER : SDE_TRANSB_FIFO_UNDER;
 
        if (enable)
                ibx_enable_display_interrupt(dev_priv, bit);
@@ -206,7 +206,7 @@ static void cpt_check_pch_fifo_underruns(struct intel_crtc *crtc)
 {
        struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
        enum pipe pch_transcoder = crtc->pipe;
-       uint32_t serr_int = I915_READ(SERR_INT);
+       u32 serr_int = I915_READ(SERR_INT);
 
        lockdep_assert_held(&dev_priv->irq_lock);
 
index 3fcb3b7759485e4084298b495e01615a00c1e480..ce7ba3a9c0002c7fd65b5378e7d82be4fc7afd92 100644 (file)
@@ -838,8 +838,8 @@ void intel_hdcp_atomic_check(struct drm_connector *connector,
                             struct drm_connector_state *old_state,
                             struct drm_connector_state *new_state)
 {
-       uint64_t old_cp = old_state->content_protection;
-       uint64_t new_cp = new_state->content_protection;
+       u64 old_cp = old_state->content_protection;
+       u64 new_cp = new_state->content_protection;
        struct drm_crtc_state *crtc_state;
 
        if (!new_state->crtc) {
index a62ad80fdf97a4345e7fa5c3f7031c7bb3f34eae..f0fa0f767eb6a85e159601dfcb02cc1cc846f92d 100644 (file)
@@ -2608,7 +2608,7 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx,
 {
        struct drm_i915_gem_object *ctx_obj;
        struct i915_vma *vma;
-       uint32_t context_size;
+       u32 context_size;
        struct intel_ring *ring;
        struct i915_timeline *timeline;
        int ret;
index 56d614b0230230989f53d4ac6721fe86f1a0df61..a8554dc4f196fb7a626173a4e8714e4ca4fe78f3 100644 (file)
@@ -44,7 +44,7 @@ static const char * const pipe_crc_sources[] = {
 };
 
 static int i8xx_pipe_crc_ctl_reg(enum intel_pipe_crc_source *source,
-                                uint32_t *val)
+                                u32 *val)
 {
        if (*source == INTEL_PIPE_CRC_SOURCE_AUTO)
                *source = INTEL_PIPE_CRC_SOURCE_PIPE;
@@ -120,7 +120,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,
 static int vlv_pipe_crc_ctl_reg(struct drm_i915_private *dev_priv,
                                enum pipe pipe,
                                enum intel_pipe_crc_source *source,
-                               uint32_t *val)
+                               u32 *val)
 {
        bool need_stable_symbols = false;
 
@@ -165,7 +165,7 @@ static int vlv_pipe_crc_ctl_reg(struct drm_i915_private *dev_priv,
         *   - DisplayPort scrambling: used for EMI reduction
         */
        if (need_stable_symbols) {
-               uint32_t tmp = I915_READ(PORT_DFT2_G4X);
+               u32 tmp = I915_READ(PORT_DFT2_G4X);
 
                tmp |= DC_BALANCE_RESET_VLV;
                switch (pipe) {
@@ -190,7 +190,7 @@ static int vlv_pipe_crc_ctl_reg(struct drm_i915_private *dev_priv,
 static int i9xx_pipe_crc_ctl_reg(struct drm_i915_private *dev_priv,
                                 enum pipe pipe,
                                 enum intel_pipe_crc_source *source,
-                                uint32_t *val)
+                                u32 *val)
 {
        bool need_stable_symbols = false;
 
@@ -244,7 +244,7 @@ static int i9xx_pipe_crc_ctl_reg(struct drm_i915_private *dev_priv,
         *   - DisplayPort scrambling: used for EMI reduction
         */
        if (need_stable_symbols) {
-               uint32_t tmp = I915_READ(PORT_DFT2_G4X);
+               u32 tmp = I915_READ(PORT_DFT2_G4X);
 
                WARN_ON(!IS_G4X(dev_priv));
 
@@ -265,7 +265,7 @@ static int i9xx_pipe_crc_ctl_reg(struct drm_i915_private *dev_priv,
 static void vlv_undo_pipe_scramble_reset(struct drm_i915_private *dev_priv,
                                         enum pipe pipe)
 {
-       uint32_t tmp = I915_READ(PORT_DFT2_G4X);
+       u32 tmp = I915_READ(PORT_DFT2_G4X);
 
        switch (pipe) {
        case PIPE_A:
@@ -289,7 +289,7 @@ static void vlv_undo_pipe_scramble_reset(struct drm_i915_private *dev_priv,
 static void g4x_undo_pipe_scramble_reset(struct drm_i915_private *dev_priv,
                                         enum pipe pipe)
 {
-       uint32_t tmp = I915_READ(PORT_DFT2_G4X);
+       u32 tmp = I915_READ(PORT_DFT2_G4X);
 
        if (pipe == PIPE_A)
                tmp &= ~PIPE_A_SCRAMBLE_RESET;
@@ -304,7 +304,7 @@ static void g4x_undo_pipe_scramble_reset(struct drm_i915_private *dev_priv,
 }
 
 static int ilk_pipe_crc_ctl_reg(enum intel_pipe_crc_source *source,
-                               uint32_t *val)
+                               u32 *val)
 {
        if (*source == INTEL_PIPE_CRC_SOURCE_AUTO)
                *source = INTEL_PIPE_CRC_SOURCE_PIPE;
@@ -392,7 +392,7 @@ unlock:
 static int ivb_pipe_crc_ctl_reg(struct drm_i915_private *dev_priv,
                                enum pipe pipe,
                                enum intel_pipe_crc_source *source,
-                               uint32_t *val,
+                               u32 *val,
                                bool set_wa)
 {
        if (*source == INTEL_PIPE_CRC_SOURCE_AUTO)
index 0f6b2b4702e38ff135726ec1edc1c693674b5469..8dbf26c212cc376577f4327c21c4afdc4b87cc7a 100644 (file)
@@ -230,7 +230,7 @@ void intel_psr_irq_handler(struct drm_i915_private *dev_priv, u32 psr_iir)
 
 static bool intel_dp_get_colorimetry_status(struct intel_dp *intel_dp)
 {
-       uint8_t dprx = 0;
+       u8 dprx = 0;
 
        if (drm_dp_dpcd_readb(&intel_dp->aux, DP_DPRX_FEATURE_ENUMERATION_LIST,
                              &dprx) != 1)
@@ -240,7 +240,7 @@ static bool intel_dp_get_colorimetry_status(struct intel_dp *intel_dp)
 
 static bool intel_dp_get_alpm_status(struct intel_dp *intel_dp)
 {
-       uint8_t alpm_caps = 0;
+       u8 alpm_caps = 0;
 
        if (drm_dp_dpcd_readb(&intel_dp->aux, DP_RECEIVER_ALPM_CAP,
                              &alpm_caps) != 1)
@@ -384,7 +384,7 @@ static void hsw_psr_setup_aux(struct intel_dp *intel_dp)
        struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
        u32 aux_clock_divider, aux_ctl;
        int i;
-       static const uint8_t aux_msg[] = {
+       static const u8 aux_msg[] = {
                [0] = DP_AUX_NATIVE_WRITE << 4,
                [1] = DP_SET_POWER >> 8,
                [2] = DP_SET_POWER & 0xff,
index 3c1366c58cf3eec01b8f78852d3443dc020bafd9..616f6bbb18ad74f64746c0c3cf6e3583846adc04 100644 (file)
@@ -28,7 +28,7 @@ struct i915_sched_attr;
  * workarounds!
  */
 #define CACHELINE_BYTES 64
-#define CACHELINE_DWORDS (CACHELINE_BYTES / sizeof(uint32_t))
+#define CACHELINE_DWORDS (CACHELINE_BYTES / sizeof(u32))
 
 struct intel_hw_status_page {
        struct i915_vma *vma;
index 79f00610860b9988e803131899b03719d6bce341..a017a4232c0fae4580da8b0a59bf54a9ba7fdecb 100644 (file)
@@ -903,10 +903,10 @@ void gen9_sanitize_dc_state(struct drm_i915_private *dev_priv)
  * back on and register state is restored. This is guaranteed by the MMIO write
  * to DC_STATE_EN blocking until the state is restored.
  */
-static void gen9_set_dc_state(struct drm_i915_private *dev_priv, uint32_t state)
+static void gen9_set_dc_state(struct drm_i915_private *dev_priv, u32 state)
 {
-       uint32_t val;
-       uint32_t mask;
+       u32 val;
+       u32 mask;
 
        if (WARN_ON_ONCE(state & ~dev_priv->csr.allowed_dc_mask))
                state &= dev_priv->csr.allowed_dc_mask;
@@ -1538,7 +1538,7 @@ static void chv_dpio_cmn_power_well_enable(struct drm_i915_private *dev_priv,
 {
        enum dpio_phy phy;
        enum pipe pipe;
-       uint32_t tmp;
+       u32 tmp;
 
        WARN_ON_ONCE(power_well->desc->id != VLV_DISP_PW_DPIO_CMN_BC &&
                     power_well->desc->id != CHV_DISP_PW_DPIO_CMN_D);
@@ -3328,10 +3328,10 @@ sanitize_disable_power_well_option(const struct drm_i915_private *dev_priv,
        return 1;
 }
 
-static uint32_t get_allowed_dc_mask(const struct drm_i915_private *dev_priv,
-                                   int enable_dc)
+static u32 get_allowed_dc_mask(const struct drm_i915_private *dev_priv,
+                              int enable_dc)
 {
-       uint32_t mask;
+       u32 mask;
        int requested_dc;
        int max_dc;
 
@@ -3596,7 +3596,7 @@ static void icl_dbuf_disable(struct drm_i915_private *dev_priv)
 
 static void icl_mbus_init(struct drm_i915_private *dev_priv)
 {
-       uint32_t val;
+       u32 val;
 
        val = MBUS_ABOX_BT_CREDIT_POOL1(16) |
              MBUS_ABOX_BT_CREDIT_POOL2(16) |
@@ -3907,7 +3907,7 @@ static void chv_phy_control_init(struct drm_i915_private *dev_priv)
         * current lane status.
         */
        if (cmn_bc->desc->ops->is_enabled(dev_priv, cmn_bc)) {
-               uint32_t status = I915_READ(DPLL(PIPE_A));
+               u32 status = I915_READ(DPLL(PIPE_A));
                unsigned int mask;
 
                mask = status & DPLL_PORTB_READY_MASK;
@@ -3938,7 +3938,7 @@ static void chv_phy_control_init(struct drm_i915_private *dev_priv)
        }
 
        if (cmn_d->desc->ops->is_enabled(dev_priv, cmn_d)) {
-               uint32_t status = I915_READ(DPIO_PHY_STATUS);
+               u32 status = I915_READ(DPIO_PHY_STATUS);
                unsigned int mask;
 
                mask = status & DPLL_PORTD_READY_MASK;