diff options
Diffstat (limited to 'drivers/char/drm/via_video.c')
-rw-r--r-- | drivers/char/drm/via_video.c | 30 |
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 | ||
32 | void | 32 | void via_init_futex(drm_via_private_t * dev_priv) |
33 | via_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 | ||
45 | void | 44 | void via_cleanup_futex(drm_via_private_t * dev_priv) |
46 | via_cleanup_futex(drm_via_private_t *dev_priv) | ||
47 | { | 45 | { |
48 | } | 46 | } |
49 | 47 | ||
50 | void | 48 | void via_release_futex(drm_via_private_t * dev_priv, int context) |
51 | via_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 | ||
67 | int | 65 | int via_decoder_futex(DRM_IOCTL_ARGS) |
68 | via_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 | |||