Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282464
b: refs/heads/master
c: 9242fe2
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Dave Airlie committed Dec 6, 2011
1 parent 9fd3191 commit f4fa2e4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 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: 1f0d0b5183c8dd4d58678e8ba35553cabaf87390
refs/heads/master: 9242fe23d2ebab9c61dbc50d65f30cfa20a856ae
10 changes: 6 additions & 4 deletions trunk/drivers/gpu/drm/gma500/accel_2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ static int psbfb_2d_submit(struct drm_psb_private *dev_priv, uint32_t *cmdbuf,
int ret = 0;
int i;
unsigned submit_size;
unsigned long flags;

mutex_lock(&dev_priv->mutex_2d);
spin_lock_irqsave(&dev_priv->lock_2d, flags);
while (size > 0) {
submit_size = (size < 0x60) ? size : 0x60;
size -= submit_size;
Expand All @@ -127,7 +128,7 @@ static int psbfb_2d_submit(struct drm_psb_private *dev_priv, uint32_t *cmdbuf,

(void)PSB_RSGX32(PSB_SGX_2D_SLAVE_PORT + i - 4);
}
mutex_unlock(&dev_priv->mutex_2d);
spin_unlock_irqrestore(&dev_priv->lock_2d, flags);
return ret;
}

Expand Down Expand Up @@ -327,8 +328,9 @@ int psbfb_sync(struct fb_info *info)
struct drm_psb_private *dev_priv = dev->dev_private;
unsigned long _end = jiffies + DRM_HZ;
int busy = 0;
unsigned long flags;

mutex_lock(&dev_priv->mutex_2d);
spin_lock_irqsave(&dev_priv->lock_2d, flags);
/*
* First idle the 2D engine.
*/
Expand Down Expand Up @@ -357,6 +359,6 @@ int psbfb_sync(struct fb_info *info)
_PSB_C2B_STATUS_BUSY) != 0);

out:
mutex_unlock(&dev_priv->mutex_2d);
spin_unlock_irqrestore(&dev_priv->lock_2d, flags);
return (busy) ? -EBUSY : 0;
}
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/gma500/psb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static int psb_do_init(struct drm_device *dev)


spin_lock_init(&dev_priv->irqmask_lock);
mutex_init(&dev_priv->mutex_2d);
spin_lock_init(&dev_priv->lock_2d);

PSB_WSGX32(0x00000000, PSB_CR_BIF_BANK0);
PSB_WSGX32(0x00000000, PSB_CR_BIF_BANK1);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/gma500/psb_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ struct drm_psb_private {
void *fbdev;

/* 2D acceleration */
struct mutex mutex_2d;
spinlock_t lock_2d;
};


Expand Down

0 comments on commit f4fa2e4

Please sign in to comment.