aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/via_video.c')
-rw-r--r--drivers/char/drm/via_video.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/drivers/char/drm/via_video.c b/drivers/char/drm/via_video.c
index 1e2d444587bf..7fab9fbdf424 100644
--- a/drivers/char/drm/via_video.c
+++ b/drivers/char/drm/via_video.c
@@ -29,8 +29,7 @@
29#include "via_drm.h" 29#include "via_drm.h"
30#include "via_drv.h" 30#include "via_drv.h"
31 31
32void 32void via_init_futex(drm_via_private_t * dev_priv)
33via_init_futex(drm_via_private_t *dev_priv)
34{ 33{
35 unsigned int i; 34 unsigned int i;
36 35
@@ -42,30 +41,28 @@ via_init_futex(drm_via_private_t *dev_priv)
42 } 41 }
43} 42}
44 43
45void 44void via_cleanup_futex(drm_via_private_t * dev_priv)
46via_cleanup_futex(drm_via_private_t *dev_priv)
47{ 45{
48} 46}
49 47
50void 48void via_release_futex(drm_via_private_t * dev_priv, int context)
51via_release_futex(drm_via_private_t *dev_priv, int context)
52{ 49{
53 unsigned int i; 50 unsigned int i;
54 volatile int *lock; 51 volatile int *lock;
55 52
56 for (i=0; i < VIA_NR_XVMC_LOCKS; ++i) { 53 for (i = 0; i < VIA_NR_XVMC_LOCKS; ++i) {
57 lock = (int *) XVMCLOCKPTR(dev_priv->sarea_priv, i); 54 lock = (int *)XVMCLOCKPTR(dev_priv->sarea_priv, i);
58 if ( (_DRM_LOCKING_CONTEXT( *lock ) == context)) { 55 if ((_DRM_LOCKING_CONTEXT(*lock) == context)) {
59 if (_DRM_LOCK_IS_HELD( *lock ) && (*lock & _DRM_LOCK_CONT)) { 56 if (_DRM_LOCK_IS_HELD(*lock)
60 DRM_WAKEUP( &(dev_priv->decoder_queue[i])); 57 && (*lock & _DRM_LOCK_CONT)) {
58 DRM_WAKEUP(&(dev_priv->decoder_queue[i]));
61 } 59 }
62 *lock = 0; 60 *lock = 0;
63 } 61 }
64 } 62 }
65} 63}
66 64
67int 65int via_decoder_futex(DRM_IOCTL_ARGS)
68via_decoder_futex(DRM_IOCTL_ARGS)
69{ 66{
70 DRM_DEVICE; 67 DRM_DEVICE;
71 drm_via_futex_t fx; 68 drm_via_futex_t fx;
@@ -95,4 +92,3 @@ via_decoder_futex(DRM_IOCTL_ARGS)
95 } 92 }
96 return 0; 93 return 0;
97} 94}
98