diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-11-12 21:52:46 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-11-12 21:52:46 +1100 |
commit | 925142431bd653175b80ae153bd7a8bc13628bde (patch) | |
tree | 594c1e65d3bf25b10961ea2b97dee5704b4f6cb5 /drivers/char/drm/via_video.c | |
parent | 792d2b9a12594522111fbe2a7f17460a4d7edff7 (diff) | |
download | blackbird-op-linux-925142431bd653175b80ae153bd7a8bc13628bde.tar.gz blackbird-op-linux-925142431bd653175b80ae153bd7a8bc13628bde.zip |
drm: update VIA driver to 2.7.2
Add PCI DMA blitengine to VIA DRM
Add portability code for porting VIA to FreeBSD.
Sync via_drm.h with 3d driver
From: Thomas Hellstrom <unichrome@shipmail.org>, Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/via_video.c')
-rw-r--r-- | drivers/char/drm/via_video.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/drm/via_video.c b/drivers/char/drm/via_video.c index 7fab9fbdf424..300ac61b09ed 100644 --- a/drivers/char/drm/via_video.c +++ b/drivers/char/drm/via_video.c @@ -50,8 +50,11 @@ void via_release_futex(drm_via_private_t * dev_priv, int context) unsigned int i; volatile int *lock; + if (!dev_priv->sarea_priv) + return; + for (i = 0; i < VIA_NR_XVMC_LOCKS; ++i) { - lock = (int *)XVMCLOCKPTR(dev_priv->sarea_priv, i); + lock = (volatile int *)XVMCLOCKPTR(dev_priv->sarea_priv, i); if ((_DRM_LOCKING_CONTEXT(*lock) == context)) { if (_DRM_LOCK_IS_HELD(*lock) && (*lock & _DRM_LOCK_CONT)) { @@ -79,7 +82,7 @@ int via_decoder_futex(DRM_IOCTL_ARGS) if (fx.lock > VIA_NR_XVMC_LOCKS) return -EFAULT; - lock = (int *)XVMCLOCKPTR(sAPriv, fx.lock); + lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx.lock); switch (fx.func) { case VIA_FUTEX_WAIT: |