diff options
Diffstat (limited to 'drivers/char/drm/r128_state.c')
-rw-r--r-- | drivers/char/drm/r128_state.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/char/drm/r128_state.c b/drivers/char/drm/r128_state.c index b7f483cac6d4..51a9afce7b9b 100644 --- a/drivers/char/drm/r128_state.c +++ b/drivers/char/drm/r128_state.c | |||
@@ -42,7 +42,7 @@ static void r128_emit_clip_rects(drm_r128_private_t * dev_priv, | |||
42 | { | 42 | { |
43 | u32 aux_sc_cntl = 0x00000000; | 43 | u32 aux_sc_cntl = 0x00000000; |
44 | RING_LOCALS; | 44 | RING_LOCALS; |
45 | DRM_DEBUG(" %s\n", __FUNCTION__); | 45 | DRM_DEBUG("\n"); |
46 | 46 | ||
47 | BEGIN_RING((count < 3 ? count : 3) * 5 + 2); | 47 | BEGIN_RING((count < 3 ? count : 3) * 5 + 2); |
48 | 48 | ||
@@ -85,7 +85,7 @@ static __inline__ void r128_emit_core(drm_r128_private_t * dev_priv) | |||
85 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; | 85 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; |
86 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; | 86 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; |
87 | RING_LOCALS; | 87 | RING_LOCALS; |
88 | DRM_DEBUG(" %s\n", __FUNCTION__); | 88 | DRM_DEBUG("\n"); |
89 | 89 | ||
90 | BEGIN_RING(2); | 90 | BEGIN_RING(2); |
91 | 91 | ||
@@ -100,7 +100,7 @@ static __inline__ void r128_emit_context(drm_r128_private_t * dev_priv) | |||
100 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; | 100 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; |
101 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; | 101 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; |
102 | RING_LOCALS; | 102 | RING_LOCALS; |
103 | DRM_DEBUG(" %s\n", __FUNCTION__); | 103 | DRM_DEBUG("\n"); |
104 | 104 | ||
105 | BEGIN_RING(13); | 105 | BEGIN_RING(13); |
106 | 106 | ||
@@ -126,7 +126,7 @@ static __inline__ void r128_emit_setup(drm_r128_private_t * dev_priv) | |||
126 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; | 126 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; |
127 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; | 127 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; |
128 | RING_LOCALS; | 128 | RING_LOCALS; |
129 | DRM_DEBUG(" %s\n", __FUNCTION__); | 129 | DRM_DEBUG("\n"); |
130 | 130 | ||
131 | BEGIN_RING(3); | 131 | BEGIN_RING(3); |
132 | 132 | ||
@@ -142,7 +142,7 @@ static __inline__ void r128_emit_masks(drm_r128_private_t * dev_priv) | |||
142 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; | 142 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; |
143 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; | 143 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; |
144 | RING_LOCALS; | 144 | RING_LOCALS; |
145 | DRM_DEBUG(" %s\n", __FUNCTION__); | 145 | DRM_DEBUG("\n"); |
146 | 146 | ||
147 | BEGIN_RING(5); | 147 | BEGIN_RING(5); |
148 | 148 | ||
@@ -161,7 +161,7 @@ static __inline__ void r128_emit_window(drm_r128_private_t * dev_priv) | |||
161 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; | 161 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; |
162 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; | 162 | drm_r128_context_regs_t *ctx = &sarea_priv->context_state; |
163 | RING_LOCALS; | 163 | RING_LOCALS; |
164 | DRM_DEBUG(" %s\n", __FUNCTION__); | 164 | DRM_DEBUG("\n"); |
165 | 165 | ||
166 | BEGIN_RING(2); | 166 | BEGIN_RING(2); |
167 | 167 | ||
@@ -178,7 +178,7 @@ static __inline__ void r128_emit_tex0(drm_r128_private_t * dev_priv) | |||
178 | drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[0]; | 178 | drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[0]; |
179 | int i; | 179 | int i; |
180 | RING_LOCALS; | 180 | RING_LOCALS; |
181 | DRM_DEBUG(" %s\n", __FUNCTION__); | 181 | DRM_DEBUG("\n"); |
182 | 182 | ||
183 | BEGIN_RING(7 + R128_MAX_TEXTURE_LEVELS); | 183 | BEGIN_RING(7 + R128_MAX_TEXTURE_LEVELS); |
184 | 184 | ||
@@ -204,7 +204,7 @@ static __inline__ void r128_emit_tex1(drm_r128_private_t * dev_priv) | |||
204 | drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[1]; | 204 | drm_r128_texture_regs_t *tex = &sarea_priv->tex_state[1]; |
205 | int i; | 205 | int i; |
206 | RING_LOCALS; | 206 | RING_LOCALS; |
207 | DRM_DEBUG(" %s\n", __FUNCTION__); | 207 | DRM_DEBUG("\n"); |
208 | 208 | ||
209 | BEGIN_RING(5 + R128_MAX_TEXTURE_LEVELS); | 209 | BEGIN_RING(5 + R128_MAX_TEXTURE_LEVELS); |
210 | 210 | ||
@@ -226,7 +226,7 @@ static void r128_emit_state(drm_r128_private_t * dev_priv) | |||
226 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; | 226 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; |
227 | unsigned int dirty = sarea_priv->dirty; | 227 | unsigned int dirty = sarea_priv->dirty; |
228 | 228 | ||
229 | DRM_DEBUG("%s: dirty=0x%08x\n", __FUNCTION__, dirty); | 229 | DRM_DEBUG("dirty=0x%08x\n", dirty); |
230 | 230 | ||
231 | if (dirty & R128_UPLOAD_CORE) { | 231 | if (dirty & R128_UPLOAD_CORE) { |
232 | r128_emit_core(dev_priv); | 232 | r128_emit_core(dev_priv); |
@@ -362,7 +362,7 @@ static void r128_cce_dispatch_clear(struct drm_device * dev, | |||
362 | unsigned int flags = clear->flags; | 362 | unsigned int flags = clear->flags; |
363 | int i; | 363 | int i; |
364 | RING_LOCALS; | 364 | RING_LOCALS; |
365 | DRM_DEBUG("%s\n", __FUNCTION__); | 365 | DRM_DEBUG("\n"); |
366 | 366 | ||
367 | if (dev_priv->page_flipping && dev_priv->current_page == 1) { | 367 | if (dev_priv->page_flipping && dev_priv->current_page == 1) { |
368 | unsigned int tmp = flags; | 368 | unsigned int tmp = flags; |
@@ -466,7 +466,7 @@ static void r128_cce_dispatch_swap(struct drm_device * dev) | |||
466 | struct drm_clip_rect *pbox = sarea_priv->boxes; | 466 | struct drm_clip_rect *pbox = sarea_priv->boxes; |
467 | int i; | 467 | int i; |
468 | RING_LOCALS; | 468 | RING_LOCALS; |
469 | DRM_DEBUG("%s\n", __FUNCTION__); | 469 | DRM_DEBUG("\n"); |
470 | 470 | ||
471 | #if R128_PERFORMANCE_BOXES | 471 | #if R128_PERFORMANCE_BOXES |
472 | /* Do some trivial performance monitoring... | 472 | /* Do some trivial performance monitoring... |
@@ -528,8 +528,7 @@ static void r128_cce_dispatch_flip(struct drm_device * dev) | |||
528 | { | 528 | { |
529 | drm_r128_private_t *dev_priv = dev->dev_private; | 529 | drm_r128_private_t *dev_priv = dev->dev_private; |
530 | RING_LOCALS; | 530 | RING_LOCALS; |
531 | DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n", | 531 | DRM_DEBUG("page=%d pfCurrentPage=%d\n", |
532 | __FUNCTION__, | ||
533 | dev_priv->current_page, dev_priv->sarea_priv->pfCurrentPage); | 532 | dev_priv->current_page, dev_priv->sarea_priv->pfCurrentPage); |
534 | 533 | ||
535 | #if R128_PERFORMANCE_BOXES | 534 | #if R128_PERFORMANCE_BOXES |
@@ -1156,7 +1155,7 @@ static int r128_cce_dispatch_read_pixels(struct drm_device * dev, | |||
1156 | int count, *x, *y; | 1155 | int count, *x, *y; |
1157 | int i, xbuf_size, ybuf_size; | 1156 | int i, xbuf_size, ybuf_size; |
1158 | RING_LOCALS; | 1157 | RING_LOCALS; |
1159 | DRM_DEBUG("%s\n", __FUNCTION__); | 1158 | DRM_DEBUG("\n"); |
1160 | 1159 | ||
1161 | count = depth->n; | 1160 | count = depth->n; |
1162 | if (count > 4096 || count <= 0) | 1161 | if (count > 4096 || count <= 0) |
@@ -1226,7 +1225,7 @@ static void r128_cce_dispatch_stipple(struct drm_device * dev, u32 * stipple) | |||
1226 | drm_r128_private_t *dev_priv = dev->dev_private; | 1225 | drm_r128_private_t *dev_priv = dev->dev_private; |
1227 | int i; | 1226 | int i; |
1228 | RING_LOCALS; | 1227 | RING_LOCALS; |
1229 | DRM_DEBUG("%s\n", __FUNCTION__); | 1228 | DRM_DEBUG("\n"); |
1230 | 1229 | ||
1231 | BEGIN_RING(33); | 1230 | BEGIN_RING(33); |
1232 | 1231 | ||
@@ -1309,7 +1308,7 @@ static int r128_do_cleanup_pageflip(struct drm_device * dev) | |||
1309 | static int r128_cce_flip(struct drm_device *dev, void *data, struct drm_file *file_priv) | 1308 | static int r128_cce_flip(struct drm_device *dev, void *data, struct drm_file *file_priv) |
1310 | { | 1309 | { |
1311 | drm_r128_private_t *dev_priv = dev->dev_private; | 1310 | drm_r128_private_t *dev_priv = dev->dev_private; |
1312 | DRM_DEBUG("%s\n", __FUNCTION__); | 1311 | DRM_DEBUG("\n"); |
1313 | 1312 | ||
1314 | LOCK_TEST_WITH_RETURN(dev, file_priv); | 1313 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
1315 | 1314 | ||
@@ -1328,7 +1327,7 @@ static int r128_cce_swap(struct drm_device *dev, void *data, struct drm_file *fi | |||
1328 | { | 1327 | { |
1329 | drm_r128_private_t *dev_priv = dev->dev_private; | 1328 | drm_r128_private_t *dev_priv = dev->dev_private; |
1330 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; | 1329 | drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv; |
1331 | DRM_DEBUG("%s\n", __FUNCTION__); | 1330 | DRM_DEBUG("\n"); |
1332 | 1331 | ||
1333 | LOCK_TEST_WITH_RETURN(dev, file_priv); | 1332 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
1334 | 1333 | ||
@@ -1356,7 +1355,7 @@ static int r128_cce_vertex(struct drm_device *dev, void *data, struct drm_file * | |||
1356 | LOCK_TEST_WITH_RETURN(dev, file_priv); | 1355 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
1357 | 1356 | ||
1358 | if (!dev_priv) { | 1357 | if (!dev_priv) { |
1359 | DRM_ERROR("%s called with no initialization\n", __FUNCTION__); | 1358 | DRM_ERROR("called with no initialization\n"); |
1360 | return -EINVAL; | 1359 | return -EINVAL; |
1361 | } | 1360 | } |
1362 | 1361 | ||
@@ -1412,7 +1411,7 @@ static int r128_cce_indices(struct drm_device *dev, void *data, struct drm_file | |||
1412 | LOCK_TEST_WITH_RETURN(dev, file_priv); | 1411 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
1413 | 1412 | ||
1414 | if (!dev_priv) { | 1413 | if (!dev_priv) { |
1415 | DRM_ERROR("%s called with no initialization\n", __FUNCTION__); | 1414 | DRM_ERROR("called with no initialization\n"); |
1416 | return -EINVAL; | 1415 | return -EINVAL; |
1417 | } | 1416 | } |
1418 | 1417 | ||
@@ -1557,11 +1556,11 @@ static int r128_cce_indirect(struct drm_device *dev, void *data, struct drm_file | |||
1557 | LOCK_TEST_WITH_RETURN(dev, file_priv); | 1556 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
1558 | 1557 | ||
1559 | if (!dev_priv) { | 1558 | if (!dev_priv) { |
1560 | DRM_ERROR("%s called with no initialization\n", __FUNCTION__); | 1559 | DRM_ERROR("called with no initialization\n"); |
1561 | return -EINVAL; | 1560 | return -EINVAL; |
1562 | } | 1561 | } |
1563 | 1562 | ||
1564 | DRM_DEBUG("indirect: idx=%d s=%d e=%d d=%d\n", | 1563 | DRM_DEBUG("idx=%d s=%d e=%d d=%d\n", |
1565 | indirect->idx, indirect->start, indirect->end, | 1564 | indirect->idx, indirect->start, indirect->end, |
1566 | indirect->discard); | 1565 | indirect->discard); |
1567 | 1566 | ||
@@ -1622,7 +1621,7 @@ static int r128_getparam(struct drm_device *dev, void *data, struct drm_file *fi | |||
1622 | int value; | 1621 | int value; |
1623 | 1622 | ||
1624 | if (!dev_priv) { | 1623 | if (!dev_priv) { |
1625 | DRM_ERROR("%s called with no initialization\n", __FUNCTION__); | 1624 | DRM_ERROR("called with no initialization\n"); |
1626 | return -EINVAL; | 1625 | return -EINVAL; |
1627 | } | 1626 | } |
1628 | 1627 | ||