aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_overlay.c
diff options
context:
space:
mode:
authorAkshay Joshi <me@akshayjoshi.com>2011-08-16 15:34:10 -0400
committerKeith Packard <keithp@keithp.com>2011-09-19 21:01:47 -0400
commit0206e353a0416ad63ce07f53c807c2c725633b87 (patch)
tree4b3233535d2f3b9cf408c823b7a32773a8d971e7 /drivers/gpu/drm/i915/intel_overlay.c
parentb6fd41e29dea9c6753b1843a77e50433e6123bcb (diff)
Drivers: i915: Fix all space related issues.
Various issues involved with the space character were generating warnings in the checkpatch.pl file. This patch removes most of those warnings. Signed-off-by: Akshay Joshi <me@akshayjoshi.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c146
1 files changed, 73 insertions, 73 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index d36038086826..cdf17d4cc1f7 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -117,57 +117,57 @@
117 117
118/* memory bufferd overlay registers */ 118/* memory bufferd overlay registers */
119struct overlay_registers { 119struct overlay_registers {
120 u32 OBUF_0Y; 120 u32 OBUF_0Y;
121 u32 OBUF_1Y; 121 u32 OBUF_1Y;
122 u32 OBUF_0U; 122 u32 OBUF_0U;
123 u32 OBUF_0V; 123 u32 OBUF_0V;
124 u32 OBUF_1U; 124 u32 OBUF_1U;
125 u32 OBUF_1V; 125 u32 OBUF_1V;
126 u32 OSTRIDE; 126 u32 OSTRIDE;
127 u32 YRGB_VPH; 127 u32 YRGB_VPH;
128 u32 UV_VPH; 128 u32 UV_VPH;
129 u32 HORZ_PH; 129 u32 HORZ_PH;
130 u32 INIT_PHS; 130 u32 INIT_PHS;
131 u32 DWINPOS; 131 u32 DWINPOS;
132 u32 DWINSZ; 132 u32 DWINSZ;
133 u32 SWIDTH; 133 u32 SWIDTH;
134 u32 SWIDTHSW; 134 u32 SWIDTHSW;
135 u32 SHEIGHT; 135 u32 SHEIGHT;
136 u32 YRGBSCALE; 136 u32 YRGBSCALE;
137 u32 UVSCALE; 137 u32 UVSCALE;
138 u32 OCLRC0; 138 u32 OCLRC0;
139 u32 OCLRC1; 139 u32 OCLRC1;
140 u32 DCLRKV; 140 u32 DCLRKV;
141 u32 DCLRKM; 141 u32 DCLRKM;
142 u32 SCLRKVH; 142 u32 SCLRKVH;
143 u32 SCLRKVL; 143 u32 SCLRKVL;
144 u32 SCLRKEN; 144 u32 SCLRKEN;
145 u32 OCONFIG; 145 u32 OCONFIG;
146 u32 OCMD; 146 u32 OCMD;
147 u32 RESERVED1; /* 0x6C */ 147 u32 RESERVED1; /* 0x6C */
148 u32 OSTART_0Y; 148 u32 OSTART_0Y;
149 u32 OSTART_1Y; 149 u32 OSTART_1Y;
150 u32 OSTART_0U; 150 u32 OSTART_0U;
151 u32 OSTART_0V; 151 u32 OSTART_0V;
152 u32 OSTART_1U; 152 u32 OSTART_1U;
153 u32 OSTART_1V; 153 u32 OSTART_1V;
154 u32 OTILEOFF_0Y; 154 u32 OTILEOFF_0Y;
155 u32 OTILEOFF_1Y; 155 u32 OTILEOFF_1Y;
156 u32 OTILEOFF_0U; 156 u32 OTILEOFF_0U;
157 u32 OTILEOFF_0V; 157 u32 OTILEOFF_0V;
158 u32 OTILEOFF_1U; 158 u32 OTILEOFF_1U;
159 u32 OTILEOFF_1V; 159 u32 OTILEOFF_1V;
160 u32 FASTHSCALE; /* 0xA0 */ 160 u32 FASTHSCALE; /* 0xA0 */
161 u32 UVSCALEV; /* 0xA4 */ 161 u32 UVSCALEV; /* 0xA4 */
162 u32 RESERVEDC[(0x200 - 0xA8) / 4]; /* 0xA8 - 0x1FC */ 162 u32 RESERVEDC[(0x200 - 0xA8) / 4]; /* 0xA8 - 0x1FC */
163 u16 Y_VCOEFS[N_VERT_Y_TAPS * N_PHASES]; /* 0x200 */ 163 u16 Y_VCOEFS[N_VERT_Y_TAPS * N_PHASES]; /* 0x200 */
164 u16 RESERVEDD[0x100 / 2 - N_VERT_Y_TAPS * N_PHASES]; 164 u16 RESERVEDD[0x100 / 2 - N_VERT_Y_TAPS * N_PHASES];
165 u16 Y_HCOEFS[N_HORIZ_Y_TAPS * N_PHASES]; /* 0x300 */ 165 u16 Y_HCOEFS[N_HORIZ_Y_TAPS * N_PHASES]; /* 0x300 */
166 u16 RESERVEDE[0x200 / 2 - N_HORIZ_Y_TAPS * N_PHASES]; 166 u16 RESERVEDE[0x200 / 2 - N_HORIZ_Y_TAPS * N_PHASES];
167 u16 UV_VCOEFS[N_VERT_UV_TAPS * N_PHASES]; /* 0x500 */ 167 u16 UV_VCOEFS[N_VERT_UV_TAPS * N_PHASES]; /* 0x500 */
168 u16 RESERVEDF[0x100 / 2 - N_VERT_UV_TAPS * N_PHASES]; 168 u16 RESERVEDF[0x100 / 2 - N_VERT_UV_TAPS * N_PHASES];
169 u16 UV_HCOEFS[N_HORIZ_UV_TAPS * N_PHASES]; /* 0x600 */ 169 u16 UV_HCOEFS[N_HORIZ_UV_TAPS * N_PHASES]; /* 0x600 */
170 u16 RESERVEDG[0x100 / 2 - N_HORIZ_UV_TAPS * N_PHASES]; 170 u16 RESERVEDG[0x100 / 2 - N_HORIZ_UV_TAPS * N_PHASES];
171}; 171};
172 172
173struct intel_overlay { 173struct intel_overlay {
@@ -192,7 +192,7 @@ struct intel_overlay {
192static struct overlay_registers * 192static struct overlay_registers *
193intel_overlay_map_regs(struct intel_overlay *overlay) 193intel_overlay_map_regs(struct intel_overlay *overlay)
194{ 194{
195 drm_i915_private_t *dev_priv = overlay->dev->dev_private; 195 drm_i915_private_t *dev_priv = overlay->dev->dev_private;
196 struct overlay_registers *regs; 196 struct overlay_registers *regs;
197 197
198 if (OVERLAY_NEEDS_PHYSICAL(overlay->dev)) 198 if (OVERLAY_NEEDS_PHYSICAL(overlay->dev))
@@ -264,7 +264,7 @@ i830_activate_pipe_a(struct drm_device *dev)
264 264
265 mode = drm_mode_duplicate(dev, &vesa_640x480); 265 mode = drm_mode_duplicate(dev, &vesa_640x480);
266 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); 266 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);
267 if(!drm_crtc_helper_set_mode(&crtc->base, mode, 267 if (!drm_crtc_helper_set_mode(&crtc->base, mode,
268 crtc->base.x, crtc->base.y, 268 crtc->base.x, crtc->base.y,
269 crtc->base.fb)) 269 crtc->base.fb))
270 return 0; 270 return 0;
@@ -332,7 +332,7 @@ static int intel_overlay_continue(struct intel_overlay *overlay,
332 bool load_polyphase_filter) 332 bool load_polyphase_filter)
333{ 333{
334 struct drm_device *dev = overlay->dev; 334 struct drm_device *dev = overlay->dev;
335 drm_i915_private_t *dev_priv = dev->dev_private; 335 drm_i915_private_t *dev_priv = dev->dev_private;
336 struct drm_i915_gem_request *request; 336 struct drm_i915_gem_request *request;
337 u32 flip_addr = overlay->flip_addr; 337 u32 flip_addr = overlay->flip_addr;
338 u32 tmp; 338 u32 tmp;
@@ -359,7 +359,7 @@ static int intel_overlay_continue(struct intel_overlay *overlay,
359 } 359 }
360 OUT_RING(MI_OVERLAY_FLIP | MI_OVERLAY_CONTINUE); 360 OUT_RING(MI_OVERLAY_FLIP | MI_OVERLAY_CONTINUE);
361 OUT_RING(flip_addr); 361 OUT_RING(flip_addr);
362 ADVANCE_LP_RING(); 362 ADVANCE_LP_RING();
363 363
364 ret = i915_add_request(LP_RING(dev_priv), NULL, request); 364 ret = i915_add_request(LP_RING(dev_priv), NULL, request);
365 if (ret) { 365 if (ret) {
@@ -583,7 +583,7 @@ static u32 calc_swidthsw(struct drm_device *dev, u32 offset, u32 width)
583 ret = ((offset + width + mask) >> shift) - (offset >> shift); 583 ret = ((offset + width + mask) >> shift) - (offset >> shift);
584 if (!IS_GEN2(dev)) 584 if (!IS_GEN2(dev))
585 ret <<= 1; 585 ret <<= 1;
586 ret -=1; 586 ret -= 1;
587 return ret << 2; 587 return ret << 2;
588} 588}
589 589
@@ -817,7 +817,7 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
817 regs->SWIDTHSW = calc_swidthsw(overlay->dev, 817 regs->SWIDTHSW = calc_swidthsw(overlay->dev,
818 params->offset_Y, tmp_width); 818 params->offset_Y, tmp_width);
819 regs->SHEIGHT = params->src_h; 819 regs->SHEIGHT = params->src_h;
820 regs->OBUF_0Y = new_bo->gtt_offset + params-> offset_Y; 820 regs->OBUF_0Y = new_bo->gtt_offset + params->offset_Y;
821 regs->OSTRIDE = params->stride_Y; 821 regs->OSTRIDE = params->stride_Y;
822 822
823 if (params->format & I915_OVERLAY_YUV_PLANAR) { 823 if (params->format & I915_OVERLAY_YUV_PLANAR) {
@@ -917,7 +917,7 @@ static void update_pfit_vscale_ratio(struct intel_overlay *overlay)
917 * line with the intel documentation for the i965 917 * line with the intel documentation for the i965
918 */ 918 */
919 if (INTEL_INFO(dev)->gen >= 4) { 919 if (INTEL_INFO(dev)->gen >= 4) {
920 /* on i965 use the PGM reg to read out the autoscaler values */ 920 /* on i965 use the PGM reg to read out the autoscaler values */
921 ratio = I915_READ(PFIT_PGM_RATIOS) >> PFIT_VERT_SCALE_SHIFT_965; 921 ratio = I915_READ(PFIT_PGM_RATIOS) >> PFIT_VERT_SCALE_SHIFT_965;
922 } else { 922 } else {
923 if (pfit_control & VERT_AUTO_SCALE) 923 if (pfit_control & VERT_AUTO_SCALE)
@@ -1098,7 +1098,7 @@ static int intel_panel_fitter_pipe(struct drm_device *dev)
1098} 1098}
1099 1099
1100int intel_overlay_put_image(struct drm_device *dev, void *data, 1100int intel_overlay_put_image(struct drm_device *dev, void *data,
1101 struct drm_file *file_priv) 1101 struct drm_file *file_priv)
1102{ 1102{
1103 struct drm_intel_overlay_put_image *put_image_rec = data; 1103 struct drm_intel_overlay_put_image *put_image_rec = data;
1104 drm_i915_private_t *dev_priv = dev->dev_private; 1104 drm_i915_private_t *dev_priv = dev->dev_private;
@@ -1301,10 +1301,10 @@ static int check_gamma(struct drm_intel_overlay_attrs *attrs)
1301} 1301}
1302 1302
1303int intel_overlay_attrs(struct drm_device *dev, void *data, 1303int intel_overlay_attrs(struct drm_device *dev, void *data,
1304 struct drm_file *file_priv) 1304 struct drm_file *file_priv)
1305{ 1305{
1306 struct drm_intel_overlay_attrs *attrs = data; 1306 struct drm_intel_overlay_attrs *attrs = data;
1307 drm_i915_private_t *dev_priv = dev->dev_private; 1307 drm_i915_private_t *dev_priv = dev->dev_private;
1308 struct intel_overlay *overlay; 1308 struct intel_overlay *overlay;
1309 struct overlay_registers *regs; 1309 struct overlay_registers *regs;
1310 int ret; 1310 int ret;
@@ -1393,7 +1393,7 @@ out_unlock:
1393 1393
1394void intel_setup_overlay(struct drm_device *dev) 1394void intel_setup_overlay(struct drm_device *dev)
1395{ 1395{
1396 drm_i915_private_t *dev_priv = dev->dev_private; 1396 drm_i915_private_t *dev_priv = dev->dev_private;
1397 struct intel_overlay *overlay; 1397 struct intel_overlay *overlay;
1398 struct drm_i915_gem_object *reg_bo; 1398 struct drm_i915_gem_object *reg_bo;
1399 struct overlay_registers *regs; 1399 struct overlay_registers *regs;
@@ -1421,24 +1421,24 @@ void intel_setup_overlay(struct drm_device *dev)
1421 ret = i915_gem_attach_phys_object(dev, reg_bo, 1421 ret = i915_gem_attach_phys_object(dev, reg_bo,
1422 I915_GEM_PHYS_OVERLAY_REGS, 1422 I915_GEM_PHYS_OVERLAY_REGS,
1423 PAGE_SIZE); 1423 PAGE_SIZE);
1424 if (ret) { 1424 if (ret) {
1425 DRM_ERROR("failed to attach phys overlay regs\n"); 1425 DRM_ERROR("failed to attach phys overlay regs\n");
1426 goto out_free_bo; 1426 goto out_free_bo;
1427 } 1427 }
1428 overlay->flip_addr = reg_bo->phys_obj->handle->busaddr; 1428 overlay->flip_addr = reg_bo->phys_obj->handle->busaddr;
1429 } else { 1429 } else {
1430 ret = i915_gem_object_pin(reg_bo, PAGE_SIZE, true); 1430 ret = i915_gem_object_pin(reg_bo, PAGE_SIZE, true);
1431 if (ret) { 1431 if (ret) {
1432 DRM_ERROR("failed to pin overlay register bo\n"); 1432 DRM_ERROR("failed to pin overlay register bo\n");
1433 goto out_free_bo; 1433 goto out_free_bo;
1434 } 1434 }
1435 overlay->flip_addr = reg_bo->gtt_offset; 1435 overlay->flip_addr = reg_bo->gtt_offset;
1436 1436
1437 ret = i915_gem_object_set_to_gtt_domain(reg_bo, true); 1437 ret = i915_gem_object_set_to_gtt_domain(reg_bo, true);
1438 if (ret) { 1438 if (ret) {
1439 DRM_ERROR("failed to move overlay register bo into the GTT\n"); 1439 DRM_ERROR("failed to move overlay register bo into the GTT\n");
1440 goto out_unpin_bo; 1440 goto out_unpin_bo;
1441 } 1441 }
1442 } 1442 }
1443 1443
1444 /* init all values */ 1444 /* init all values */
@@ -1525,7 +1525,7 @@ static void intel_overlay_unmap_regs_atomic(struct intel_overlay *overlay,
1525struct intel_overlay_error_state * 1525struct intel_overlay_error_state *
1526intel_overlay_capture_error_state(struct drm_device *dev) 1526intel_overlay_capture_error_state(struct drm_device *dev)
1527{ 1527{
1528 drm_i915_private_t *dev_priv = dev->dev_private; 1528 drm_i915_private_t *dev_priv = dev->dev_private;
1529 struct intel_overlay *overlay = dev_priv->overlay; 1529 struct intel_overlay *overlay = dev_priv->overlay;
1530 struct intel_overlay_error_state *error; 1530 struct intel_overlay_error_state *error;
1531 struct overlay_registers __iomem *regs; 1531 struct overlay_registers __iomem *regs;