drm/i830: fixed brace and spacing coding style issues
Fixed brace and spacing coding style issues. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
aca791c28a
commit
5649911316
@@ -62,10 +62,9 @@ static struct drm_buf *i830_freelist_get(struct drm_device * dev)
|
|||||||
/* In use is already a pointer */
|
/* In use is already a pointer */
|
||||||
used = cmpxchg(buf_priv->in_use, I830_BUF_FREE,
|
used = cmpxchg(buf_priv->in_use, I830_BUF_FREE,
|
||||||
I830_BUF_CLIENT);
|
I830_BUF_CLIENT);
|
||||||
if (used == I830_BUF_FREE) {
|
if (used == I830_BUF_FREE)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,9 +221,8 @@ static int i830_dma_cleanup(struct drm_device * dev)
|
|||||||
drm_i830_private_t *dev_priv =
|
drm_i830_private_t *dev_priv =
|
||||||
(drm_i830_private_t *) dev->dev_private;
|
(drm_i830_private_t *) dev->dev_private;
|
||||||
|
|
||||||
if (dev_priv->ring.virtual_start) {
|
if (dev_priv->ring.virtual_start)
|
||||||
drm_core_ioremapfree(&dev_priv->ring.map, dev);
|
drm_core_ioremapfree(&dev_priv->ring.map, dev);
|
||||||
}
|
|
||||||
if (dev_priv->hw_status_page) {
|
if (dev_priv->hw_status_page) {
|
||||||
pci_free_consistent(dev->pdev, PAGE_SIZE,
|
pci_free_consistent(dev->pdev, PAGE_SIZE,
|
||||||
dev_priv->hw_status_page,
|
dev_priv->hw_status_page,
|
||||||
@@ -603,9 +601,8 @@ static void i830EmitTexPalette(struct drm_device * dev,
|
|||||||
} else {
|
} else {
|
||||||
OUT_RING(CMD_OP_MAP_PALETTE_LOAD | MAP_PALETTE_NUM(number));
|
OUT_RING(CMD_OP_MAP_PALETTE_LOAD | MAP_PALETTE_NUM(number));
|
||||||
}
|
}
|
||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++)
|
||||||
OUT_RING(palette[i]);
|
OUT_RING(palette[i]);
|
||||||
}
|
|
||||||
OUT_RING(0);
|
OUT_RING(0);
|
||||||
/* KW: WHERE IS THE ADVANCE_LP_RING? This is effectively a noop!
|
/* KW: WHERE IS THE ADVANCE_LP_RING? This is effectively a noop!
|
||||||
*/
|
*/
|
||||||
@@ -816,11 +813,10 @@ static void i830_fill_box(struct drm_device * dev,
|
|||||||
OUT_RING((y << 16) | x);
|
OUT_RING((y << 16) | x);
|
||||||
OUT_RING(((y + h) << 16) | (x + w));
|
OUT_RING(((y + h) << 16) | (x + w));
|
||||||
|
|
||||||
if (dev_priv->current_page == 1) {
|
if (dev_priv->current_page == 1)
|
||||||
OUT_RING(dev_priv->front_offset);
|
OUT_RING(dev_priv->front_offset);
|
||||||
} else {
|
else
|
||||||
OUT_RING(dev_priv->back_offset);
|
OUT_RING(dev_priv->back_offset);
|
||||||
}
|
|
||||||
|
|
||||||
OUT_RING(color);
|
OUT_RING(color);
|
||||||
ADVANCE_LP_RING();
|
ADVANCE_LP_RING();
|
||||||
@@ -1100,10 +1096,9 @@ static void i830_dma_dispatch_vertex(struct drm_device * dev,
|
|||||||
if (discard) {
|
if (discard) {
|
||||||
u = cmpxchg(buf_priv->in_use, I830_BUF_CLIENT,
|
u = cmpxchg(buf_priv->in_use, I830_BUF_CLIENT,
|
||||||
I830_BUF_HARDWARE);
|
I830_BUF_HARDWARE);
|
||||||
if (u != I830_BUF_CLIENT) {
|
if (u != I830_BUF_CLIENT)
|
||||||
DRM_DEBUG("xxxx 2\n");
|
DRM_DEBUG("xxxx 2\n");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (used > 4 * 1023)
|
if (used > 4 * 1023)
|
||||||
used = 0;
|
used = 0;
|
||||||
@@ -1316,9 +1311,8 @@ static int i830_clear_bufs(struct drm_device *dev, void *data,
|
|||||||
LOCK_TEST_WITH_RETURN(dev, file_priv);
|
LOCK_TEST_WITH_RETURN(dev, file_priv);
|
||||||
|
|
||||||
/* GH: Someone's doing nasty things... */
|
/* GH: Someone's doing nasty things... */
|
||||||
if (!dev->dev_private) {
|
if (!dev->dev_private)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
|
||||||
|
|
||||||
i830_dma_dispatch_clear(dev, clear->flags,
|
i830_dma_dispatch_clear(dev, clear->flags,
|
||||||
clear->clear_color,
|
clear->clear_color,
|
||||||
@@ -1499,11 +1493,10 @@ void i830_driver_preclose(struct drm_device * dev, struct drm_file *file_priv)
|
|||||||
{
|
{
|
||||||
if (dev->dev_private) {
|
if (dev->dev_private) {
|
||||||
drm_i830_private_t *dev_priv = dev->dev_private;
|
drm_i830_private_t *dev_priv = dev->dev_private;
|
||||||
if (dev_priv->page_flipping) {
|
if (dev_priv->page_flipping)
|
||||||
i830_do_cleanup_pageflip(dev);
|
i830_do_cleanup_pageflip(dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void i830_driver_reclaim_buffers_locked(struct drm_device *dev, struct drm_file *file_priv)
|
void i830_driver_reclaim_buffers_locked(struct drm_device *dev, struct drm_file *file_priv)
|
||||||
{
|
{
|
||||||
|
@@ -166,7 +166,8 @@ extern int i830_driver_device_is_agp(struct drm_device * dev);
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define OUT_RING(n) do { \
|
#define OUT_RING(n) do { \
|
||||||
if (I830_VERBOSE) printk(" OUT_RING %x\n", (int)(n)); \
|
if (I830_VERBOSE) \
|
||||||
|
printk(" OUT_RING %x\n", (int)(n)); \
|
||||||
*(volatile unsigned int *)(virt + outring) = n; \
|
*(volatile unsigned int *)(virt + outring) = n; \
|
||||||
outcount++; \
|
outcount++; \
|
||||||
outring += 4; \
|
outring += 4; \
|
||||||
@@ -174,7 +175,8 @@ extern int i830_driver_device_is_agp(struct drm_device * dev);
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define ADVANCE_LP_RING() do { \
|
#define ADVANCE_LP_RING() do { \
|
||||||
if (I830_VERBOSE) printk("ADVANCE_LP_RING %x\n", outring); \
|
if (I830_VERBOSE) \
|
||||||
|
printk("ADVANCE_LP_RING %x\n", outring); \
|
||||||
dev_priv->ring.tail = outring; \
|
dev_priv->ring.tail = outring; \
|
||||||
dev_priv->ring.space -= outcount * 4; \
|
dev_priv->ring.space -= outcount * 4; \
|
||||||
I830_WRITE(LP_RING + RING_TAIL, outring); \
|
I830_WRITE(LP_RING + RING_TAIL, outring); \
|
||||||
|
Reference in New Issue
Block a user