Re: [Intel-gfx] [PATCH 10/17] drm/i915/sprite: switch to kernel types
On Wed, 2019-01-16 at 11:15 +0200, Jani Nikula wrote: > 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' Reviewed-by: José Roberto de Souza > > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/i915/intel_sprite.c | 60 ++- > -- > 1 file changed, 30 insertions(+), 30 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_sprite.c > b/drivers/gpu/drm/i915/intel_sprite.c > index 87a06fcca284..b02d3d9809e3 100644 > --- a/drivers/gpu/drm/i915/intel_sprite.c > +++ b/drivers/gpu/drm/i915/intel_sprite.c > @@ -321,8 +321,8 @@ skl_program_scaler(struct intel_plane *plane, > _state->scaler_state.scalers[scaler_id]; > int crtc_x = plane_state->base.dst.x1; > int crtc_y = plane_state->base.dst.y1; > - uint32_t crtc_w = drm_rect_width(_state->base.dst); > - uint32_t crtc_h = drm_rect_height(_state->base.dst); > + u32 crtc_w = drm_rect_width(_state->base.dst); > + u32 crtc_h = drm_rect_height(_state->base.dst); > u16 y_hphase, uv_rgb_hphase; > u16 y_vphase, uv_rgb_vphase; > int hscale, vscale; > @@ -477,10 +477,10 @@ skl_program_plane(struct intel_plane *plane, > u32 aux_stride = skl_plane_stride(plane_state, 1); > int crtc_x = plane_state->base.dst.x1; > int crtc_y = plane_state->base.dst.y1; > - uint32_t x = plane_state->color_plane[color_plane].x; > - uint32_t y = plane_state->color_plane[color_plane].y; > - uint32_t src_w = drm_rect_width(_state->base.src) >> 16; > - uint32_t src_h = drm_rect_height(_state->base.src) >> 16; > + u32 x = plane_state->color_plane[color_plane].x; > + u32 y = plane_state->color_plane[color_plane].y; > + u32 src_w = drm_rect_width(_state->base.src) >> 16; > + u32 src_h = drm_rect_height(_state->base.src) >> 16; > struct intel_plane *linked = plane_state->linked_plane; > const struct drm_framebuffer *fb = plane_state->base.fb; > u8 alpha = plane_state->base.alpha >> 8; > @@ -814,10 +814,10 @@ vlv_update_plane(struct intel_plane *plane, > const struct drm_intel_sprite_colorkey *key = _state- > >ckey; > int crtc_x = plane_state->base.dst.x1; > int crtc_y = plane_state->base.dst.y1; > - uint32_t crtc_w = drm_rect_width(_state->base.dst); > - uint32_t crtc_h = drm_rect_height(_state->base.dst); > - uint32_t x = plane_state->color_plane[0].x; > - uint32_t y = plane_state->color_plane[0].y; > + u32 crtc_w = drm_rect_width(_state->base.dst); > + u32 crtc_h = drm_rect_height(_state->base.dst); > + u32 x = plane_state->color_plane[0].x; > + u32 y = plane_state->color_plane[0].y; > unsigned long irqflags; > > /* Sizes are 0 based */ > @@ -976,12 +976,12 @@ ivb_update_plane(struct intel_plane *plane, > const struct drm_intel_sprite_colorkey *key = _state- > >ckey; > int crtc_x = plane_state->base.dst.x1; > int crtc_y = plane_state->base.dst.y1; > - uint32_t crtc_w = drm_rect_width(_state->base.dst); > - uint32_t crtc_h = drm_rect_height(_state->base.dst); > - uint32_t x = plane_state->color_plane[0].x; > - uint32_t y = plane_state->color_plane[0].y; > - uint32_t src_w = drm_rect_width(_state->base.src) >> 16; > - uint32_t src_h = drm_rect_height(_state->base.src) >> 16; > + u32 crtc_w = drm_rect_width(_state->base.dst); > + u32 crtc_h = drm_rect_height(_state->base.dst); > + u32 x = plane_state->color_plane[0].x; > + u32 y = plane_state->color_plane[0].y; > + u32 src_w = drm_rect_width(_state->base.src) >> 16; > + u32 src_h = drm_rect_height(_state->base.src) >> 16; > unsigned long irqflags; > > /* Sizes are 0 based */ > @@ -1152,12 +1152,12 @@ g4x_update_plane(struct intel_plane *plane, > const struct drm_intel_sprite_colorkey *key = _state- > >ckey; > int crtc_x = plane_state->base.dst.x1; > int crtc_y = plane_state->base.dst.y1; > - uint32_t crtc_w = drm_rect_width(_state->base.dst); > - uint32_t crtc_h = drm_rect_height(_state->base.dst); > - uint32_t x = plane_state->color_plane[0].x; > - uint32_t y = plane_state->color_plane[0].y; > - uint32_t src_w = drm_rect_width(_state->base.src) >> 16; > - uint32_t src_h = drm_rect_height(_state->base.src) >> 16; > + u32 crtc_w = drm_rect_width(_state->base.dst); > + u32 crtc_h = drm_rect_height(_state->base.dst); > + u32 x = plane_state->color_plane[0].x; > + u32 y = plane_state->color_plane[0].y; > + u32 src_w = drm_rect_width(_state->base.src) >> 16; > + u32 src_h = drm_rect_height(_state->base.src) >> 16; > unsigned long irqflags; > > /* Sizes are 0 based */ > @@ -1706,7 +1706,7 @@ int intel_sprite_set_colorkey_ioctl(struct > drm_device *dev, void *data, > return ret; > } > > -static const uint32_t g4x_plane_formats[] = { > +static const u32 g4x_plane_formats[] = { > DRM_FORMAT_XRGB, >
[Intel-gfx] [PATCH 10/17] drm/i915/sprite: 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' Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/intel_sprite.c | 60 ++--- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 87a06fcca284..b02d3d9809e3 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -321,8 +321,8 @@ skl_program_scaler(struct intel_plane *plane, _state->scaler_state.scalers[scaler_id]; int crtc_x = plane_state->base.dst.x1; int crtc_y = plane_state->base.dst.y1; - uint32_t crtc_w = drm_rect_width(_state->base.dst); - uint32_t crtc_h = drm_rect_height(_state->base.dst); + u32 crtc_w = drm_rect_width(_state->base.dst); + u32 crtc_h = drm_rect_height(_state->base.dst); u16 y_hphase, uv_rgb_hphase; u16 y_vphase, uv_rgb_vphase; int hscale, vscale; @@ -477,10 +477,10 @@ skl_program_plane(struct intel_plane *plane, u32 aux_stride = skl_plane_stride(plane_state, 1); int crtc_x = plane_state->base.dst.x1; int crtc_y = plane_state->base.dst.y1; - uint32_t x = plane_state->color_plane[color_plane].x; - uint32_t y = plane_state->color_plane[color_plane].y; - uint32_t src_w = drm_rect_width(_state->base.src) >> 16; - uint32_t src_h = drm_rect_height(_state->base.src) >> 16; + u32 x = plane_state->color_plane[color_plane].x; + u32 y = plane_state->color_plane[color_plane].y; + u32 src_w = drm_rect_width(_state->base.src) >> 16; + u32 src_h = drm_rect_height(_state->base.src) >> 16; struct intel_plane *linked = plane_state->linked_plane; const struct drm_framebuffer *fb = plane_state->base.fb; u8 alpha = plane_state->base.alpha >> 8; @@ -814,10 +814,10 @@ vlv_update_plane(struct intel_plane *plane, const struct drm_intel_sprite_colorkey *key = _state->ckey; int crtc_x = plane_state->base.dst.x1; int crtc_y = plane_state->base.dst.y1; - uint32_t crtc_w = drm_rect_width(_state->base.dst); - uint32_t crtc_h = drm_rect_height(_state->base.dst); - uint32_t x = plane_state->color_plane[0].x; - uint32_t y = plane_state->color_plane[0].y; + u32 crtc_w = drm_rect_width(_state->base.dst); + u32 crtc_h = drm_rect_height(_state->base.dst); + u32 x = plane_state->color_plane[0].x; + u32 y = plane_state->color_plane[0].y; unsigned long irqflags; /* Sizes are 0 based */ @@ -976,12 +976,12 @@ ivb_update_plane(struct intel_plane *plane, const struct drm_intel_sprite_colorkey *key = _state->ckey; int crtc_x = plane_state->base.dst.x1; int crtc_y = plane_state->base.dst.y1; - uint32_t crtc_w = drm_rect_width(_state->base.dst); - uint32_t crtc_h = drm_rect_height(_state->base.dst); - uint32_t x = plane_state->color_plane[0].x; - uint32_t y = plane_state->color_plane[0].y; - uint32_t src_w = drm_rect_width(_state->base.src) >> 16; - uint32_t src_h = drm_rect_height(_state->base.src) >> 16; + u32 crtc_w = drm_rect_width(_state->base.dst); + u32 crtc_h = drm_rect_height(_state->base.dst); + u32 x = plane_state->color_plane[0].x; + u32 y = plane_state->color_plane[0].y; + u32 src_w = drm_rect_width(_state->base.src) >> 16; + u32 src_h = drm_rect_height(_state->base.src) >> 16; unsigned long irqflags; /* Sizes are 0 based */ @@ -1152,12 +1152,12 @@ g4x_update_plane(struct intel_plane *plane, const struct drm_intel_sprite_colorkey *key = _state->ckey; int crtc_x = plane_state->base.dst.x1; int crtc_y = plane_state->base.dst.y1; - uint32_t crtc_w = drm_rect_width(_state->base.dst); - uint32_t crtc_h = drm_rect_height(_state->base.dst); - uint32_t x = plane_state->color_plane[0].x; - uint32_t y = plane_state->color_plane[0].y; - uint32_t src_w = drm_rect_width(_state->base.src) >> 16; - uint32_t src_h = drm_rect_height(_state->base.src) >> 16; + u32 crtc_w = drm_rect_width(_state->base.dst); + u32 crtc_h = drm_rect_height(_state->base.dst); + u32 x = plane_state->color_plane[0].x; + u32 y = plane_state->color_plane[0].y; + u32 src_w = drm_rect_width(_state->base.src) >> 16; + u32 src_h = drm_rect_height(_state->base.src) >> 16; unsigned long irqflags; /* Sizes are 0 based */ @@ -1706,7 +1706,7 @@ int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data, return ret; } -static const uint32_t g4x_plane_formats[] = { +static const u32 g4x_plane_formats[] = { DRM_FORMAT_XRGB, DRM_FORMAT_YUYV, DRM_FORMAT_YVYU, @@ -1714,13 +1714,13 @@ static const uint32_t g4x_plane_formats[] = { DRM_FORMAT_VYUY, }; -static