Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56499113 authored by Nicolas Kaiser's avatar Nicolas Kaiser Committed by Dave Airlie
Browse files

drm/i830: fixed brace and spacing coding style issues



Fixed brace and spacing coding style issues.

Signed-off-by: default avatarNicolas Kaiser <nikai@nikai.net>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent aca791c2
Loading
Loading
Loading
Loading
+44 −51
Original line number Diff line number Diff line
@@ -62,10 +62,9 @@ static struct drm_buf *i830_freelist_get(struct drm_device * dev)
		/* In use is already a pointer */
		used = cmpxchg(buf_priv->in_use, I830_BUF_FREE,
			       I830_BUF_CLIENT);
		if (used == I830_BUF_FREE) {
		if (used == I830_BUF_FREE)
			return buf;
	}
	}
	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->dev_private;

		if (dev_priv->ring.virtual_start) {
		if (dev_priv->ring.virtual_start)
			drm_core_ioremapfree(&dev_priv->ring.map, dev);
		}
		if (dev_priv->hw_status_page) {
			pci_free_consistent(dev->pdev, PAGE_SIZE,
					    dev_priv->hw_status_page,
@@ -603,9 +601,8 @@ static void i830EmitTexPalette(struct drm_device * dev,
	} else {
		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(0);
	/* 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 + h) << 16) | (x + w));

	if (dev_priv->current_page == 1) {
	if (dev_priv->current_page == 1)
		OUT_RING(dev_priv->front_offset);
	} else {
	else
		OUT_RING(dev_priv->back_offset);
	}

	OUT_RING(color);
	ADVANCE_LP_RING();
@@ -1100,10 +1096,9 @@ static void i830_dma_dispatch_vertex(struct drm_device * dev,
	if (discard) {
		u = cmpxchg(buf_priv->in_use, I830_BUF_CLIENT,
			    I830_BUF_HARDWARE);
		if (u != I830_BUF_CLIENT) {
		if (u != I830_BUF_CLIENT)
			DRM_DEBUG("xxxx 2\n");
	}
	}

	if (used > 4 * 1023)
		used = 0;
@@ -1316,9 +1311,8 @@ static int i830_clear_bufs(struct drm_device *dev, void *data,
	LOCK_TEST_WITH_RETURN(dev, file_priv);

	/* GH: Someone's doing nasty things... */
	if (!dev->dev_private) {
	if (!dev->dev_private)
		return -EINVAL;
	}

	i830_dma_dispatch_clear(dev, clear->flags,
				clear->clear_color,
@@ -1499,11 +1493,10 @@ void i830_driver_preclose(struct drm_device * dev, struct drm_file *file_priv)
{
	if (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);
	}
}
}

void i830_driver_reclaim_buffers_locked(struct drm_device *dev, struct drm_file *file_priv)
{
+25 −23
Original line number Diff line number Diff line
@@ -166,7 +166,8 @@ extern int i830_driver_device_is_agp(struct drm_device * dev);
} while (0)

#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;		\
	outcount++;						\
	outring += 4;						\
@@ -174,7 +175,8 @@ extern int i830_driver_device_is_agp(struct drm_device * dev);
} while (0)

#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.space -= outcount * 4;			\
	I830_WRITE(LP_RING + RING_TAIL, outring);		\
+5 −5

File changed.

Contains only whitespace changes.