Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205006
b: refs/heads/master
c: bc5e9d6
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Kaiser authored and Dave Airlie committed Aug 2, 2010
1 parent 1c87a37 commit 95d140f
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 163 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2b2cb790ee873b6853ec99478d68dd9cd083132
refs/heads/master: bc5e9d6a22f49fb4a7a5ec385062d1eb473bfec4
52 changes: 24 additions & 28 deletions trunk/drivers/gpu/drm/r128/r128_cce.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

MODULE_FIRMWARE(FIRMWARE_NAME);

static int R128_READ_PLL(struct drm_device * dev, int addr)
static int R128_READ_PLL(struct drm_device *dev, int addr)
{
drm_r128_private_t *dev_priv = dev->dev_private;

Expand All @@ -53,7 +53,7 @@ static int R128_READ_PLL(struct drm_device * dev, int addr)
}

#if R128_FIFO_DEBUG
static void r128_status(drm_r128_private_t * dev_priv)
static void r128_status(drm_r128_private_t *dev_priv)
{
printk("GUI_STAT = 0x%08x\n",
(unsigned int)R128_READ(R128_GUI_STAT));
Expand All @@ -74,7 +74,7 @@ static void r128_status(drm_r128_private_t * dev_priv)
* Engine, FIFO control
*/

static int r128_do_pixcache_flush(drm_r128_private_t * dev_priv)
static int r128_do_pixcache_flush(drm_r128_private_t *dev_priv)
{
u32 tmp;
int i;
Expand All @@ -83,9 +83,8 @@ static int r128_do_pixcache_flush(drm_r128_private_t * dev_priv)
R128_WRITE(R128_PC_NGUI_CTLSTAT, tmp);

for (i = 0; i < dev_priv->usec_timeout; i++) {
if (!(R128_READ(R128_PC_NGUI_CTLSTAT) & R128_PC_BUSY)) {
if (!(R128_READ(R128_PC_NGUI_CTLSTAT) & R128_PC_BUSY))
return 0;
}
DRM_UDELAY(1);
}

Expand All @@ -95,7 +94,7 @@ static int r128_do_pixcache_flush(drm_r128_private_t * dev_priv)
return -EBUSY;
}

static int r128_do_wait_for_fifo(drm_r128_private_t * dev_priv, int entries)
static int r128_do_wait_for_fifo(drm_r128_private_t *dev_priv, int entries)
{
int i;

Expand All @@ -112,7 +111,7 @@ static int r128_do_wait_for_fifo(drm_r128_private_t * dev_priv, int entries)
return -EBUSY;
}

static int r128_do_wait_for_idle(drm_r128_private_t * dev_priv)
static int r128_do_wait_for_idle(drm_r128_private_t *dev_priv)
{
int i, ret;

Expand Down Expand Up @@ -189,7 +188,7 @@ static int r128_cce_load_microcode(drm_r128_private_t *dev_priv)
* prior to a wait for idle, as it informs the engine that the command
* stream is ending.
*/
static void r128_do_cce_flush(drm_r128_private_t * dev_priv)
static void r128_do_cce_flush(drm_r128_private_t *dev_priv)
{
u32 tmp;

Expand All @@ -199,7 +198,7 @@ static void r128_do_cce_flush(drm_r128_private_t * dev_priv)

/* Wait for the CCE to go idle.
*/
int r128_do_cce_idle(drm_r128_private_t * dev_priv)
int r128_do_cce_idle(drm_r128_private_t *dev_priv)
{
int i;

Expand All @@ -225,7 +224,7 @@ int r128_do_cce_idle(drm_r128_private_t * dev_priv)

/* Start the Concurrent Command Engine.
*/
static void r128_do_cce_start(drm_r128_private_t * dev_priv)
static void r128_do_cce_start(drm_r128_private_t *dev_priv)
{
r128_do_wait_for_idle(dev_priv);

Expand All @@ -242,7 +241,7 @@ static void r128_do_cce_start(drm_r128_private_t * dev_priv)
* commands, so you must wait for the CCE command stream to complete
* before calling this routine.
*/
static void r128_do_cce_reset(drm_r128_private_t * dev_priv)
static void r128_do_cce_reset(drm_r128_private_t *dev_priv)
{
R128_WRITE(R128_PM4_BUFFER_DL_WPTR, 0);
R128_WRITE(R128_PM4_BUFFER_DL_RPTR, 0);
Expand All @@ -253,7 +252,7 @@ static void r128_do_cce_reset(drm_r128_private_t * dev_priv)
* commands, so you must flush the command stream and wait for the CCE
* to go idle before calling this routine.
*/
static void r128_do_cce_stop(drm_r128_private_t * dev_priv)
static void r128_do_cce_stop(drm_r128_private_t *dev_priv)
{
R128_WRITE(R128_PM4_MICRO_CNTL, 0);
R128_WRITE(R128_PM4_BUFFER_CNTL,
Expand All @@ -264,7 +263,7 @@ static void r128_do_cce_stop(drm_r128_private_t * dev_priv)

/* Reset the engine. This will stop the CCE if it is running.
*/
static int r128_do_engine_reset(struct drm_device * dev)
static int r128_do_engine_reset(struct drm_device *dev)
{
drm_r128_private_t *dev_priv = dev->dev_private;
u32 clock_cntl_index, mclk_cntl, gen_reset_cntl;
Expand Down Expand Up @@ -301,8 +300,8 @@ static int r128_do_engine_reset(struct drm_device * dev)
return 0;
}

static void r128_cce_init_ring_buffer(struct drm_device * dev,
drm_r128_private_t * dev_priv)
static void r128_cce_init_ring_buffer(struct drm_device *dev,
drm_r128_private_t *dev_priv)
{
u32 ring_start;
u32 tmp;
Expand Down Expand Up @@ -340,7 +339,7 @@ static void r128_cce_init_ring_buffer(struct drm_device * dev,
R128_WRITE(R128_BUS_CNTL, tmp);
}

static int r128_do_init_cce(struct drm_device * dev, drm_r128_init_t * init)
static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init)
{
drm_r128_private_t *dev_priv;
int rc;
Expand Down Expand Up @@ -588,7 +587,7 @@ static int r128_do_init_cce(struct drm_device * dev, drm_r128_init_t * init)
return rc;
}

int r128_do_cleanup_cce(struct drm_device * dev)
int r128_do_cleanup_cce(struct drm_device *dev)
{

/* Make sure interrupts are disabled here because the uninstall ioctl
Expand Down Expand Up @@ -682,9 +681,8 @@ int r128_cce_stop(struct drm_device *dev, void *data, struct drm_file *file_priv
/* Flush any pending CCE commands. This ensures any outstanding
* commands are exectuted by the engine before we turn it off.
*/
if (stop->flush) {
if (stop->flush)
r128_do_cce_flush(dev_priv);
}

/* If we fail to make the engine go idle, we return an error
* code so that the DRM ioctl wrapper can try again.
Expand Down Expand Up @@ -735,9 +733,8 @@ int r128_cce_idle(struct drm_device *dev, void *data, struct drm_file *file_priv

DEV_INIT_TEST_WITH_RETURN(dev_priv);

if (dev_priv->cce_running) {
if (dev_priv->cce_running)
r128_do_cce_flush(dev_priv);
}

return r128_do_cce_idle(dev_priv);
}
Expand Down Expand Up @@ -765,7 +762,7 @@ int r128_fullscreen(struct drm_device *dev, void *data, struct drm_file *file_pr
#define R128_BUFFER_FREE 0

#if 0
static int r128_freelist_init(struct drm_device * dev)
static int r128_freelist_init(struct drm_device *dev)
{
struct drm_device_dma *dma = dev->dma;
drm_r128_private_t *dev_priv = dev->dev_private;
Expand Down Expand Up @@ -848,7 +845,7 @@ static struct drm_buf *r128_freelist_get(struct drm_device * dev)
return NULL;
}

void r128_freelist_reset(struct drm_device * dev)
void r128_freelist_reset(struct drm_device *dev)
{
struct drm_device_dma *dma = dev->dma;
int i;
Expand All @@ -864,7 +861,7 @@ void r128_freelist_reset(struct drm_device * dev)
* CCE command submission
*/

int r128_wait_ring(drm_r128_private_t * dev_priv, int n)
int r128_wait_ring(drm_r128_private_t *dev_priv, int n)
{
drm_r128_ring_buffer_t *ring = &dev_priv->ring;
int i;
Expand All @@ -881,9 +878,9 @@ int r128_wait_ring(drm_r128_private_t * dev_priv, int n)
return -EBUSY;
}

static int r128_cce_get_buffers(struct drm_device * dev,
static int r128_cce_get_buffers(struct drm_device *dev,
struct drm_file *file_priv,
struct drm_dma * d)
struct drm_dma *d)
{
int i;
struct drm_buf *buf;
Expand Down Expand Up @@ -933,9 +930,8 @@ int r128_cce_buffers(struct drm_device *dev, void *data, struct drm_file *file_p

d->granted_count = 0;

if (d->request_count) {
if (d->request_count)
ret = r128_cce_get_buffers(dev, file_priv, d);
}

return ret;
}
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/r128/r128_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static struct drm_driver driver = {
.patchlevel = DRIVER_PATCHLEVEL,
};

int r128_driver_load(struct drm_device * dev, unsigned long flags)
int r128_driver_load(struct drm_device *dev, unsigned long flags)
{
return drm_vblank_init(dev, 1);
}
Expand Down
Loading

0 comments on commit 95d140f

Please sign in to comment.