diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-09-25 00:28:13 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-09-25 00:28:13 -0400 |
commit | b5e89ed53ed8d24f83ba1941c07382af00ed238e (patch) | |
tree | 747bae7a565f88a2e1d5974776eeb054a932c505 /drivers/char/drm/r128_irq.c | |
parent | 99a2657a29e2d623c3568cd86b27cac13fb63140 (diff) |
drm: lindent the drm directory.
I've been threatening this for a while, so no point hanging around.
This lindents the DRM code which was always really bad in tabbing department.
I've also fixed some misnamed files in comments and removed some trailing
whitespace.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/r128_irq.c')
-rw-r--r-- | drivers/char/drm/r128_irq.c | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/drivers/char/drm/r128_irq.c b/drivers/char/drm/r128_irq.c index 643a30785fe5..27eb0e31bd3b 100644 --- a/drivers/char/drm/r128_irq.c +++ b/drivers/char/drm/r128_irq.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* r128_irq.c -- IRQ handling for radeon -*- linux-c -*- | 1 | /* r128_irq.c -- IRQ handling for radeon -*- linux-c -*- |
2 | * | 2 | * |
3 | * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. | 3 | * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. |
4 | * | 4 | * |
5 | * The Weather Channel (TM) funded Tungsten Graphics to develop the | 5 | * The Weather Channel (TM) funded Tungsten Graphics to develop the |
6 | * initial release of the Radeon 8500 driver under the XFree86 license. | 6 | * initial release of the Radeon 8500 driver under the XFree86 license. |
7 | * This notice must be preserved. | 7 | * This notice must be preserved. |
@@ -35,68 +35,67 @@ | |||
35 | #include "r128_drm.h" | 35 | #include "r128_drm.h" |
36 | #include "r128_drv.h" | 36 | #include "r128_drv.h" |
37 | 37 | ||
38 | irqreturn_t r128_driver_irq_handler( DRM_IRQ_ARGS ) | 38 | irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS) |
39 | { | 39 | { |
40 | drm_device_t *dev = (drm_device_t *) arg; | 40 | drm_device_t *dev = (drm_device_t *) arg; |
41 | drm_r128_private_t *dev_priv = | 41 | drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; |
42 | (drm_r128_private_t *)dev->dev_private; | ||
43 | int status; | 42 | int status; |
44 | 43 | ||
45 | status = R128_READ( R128_GEN_INT_STATUS ); | 44 | status = R128_READ(R128_GEN_INT_STATUS); |
46 | 45 | ||
47 | /* VBLANK interrupt */ | 46 | /* VBLANK interrupt */ |
48 | if ( status & R128_CRTC_VBLANK_INT ) { | 47 | if (status & R128_CRTC_VBLANK_INT) { |
49 | R128_WRITE( R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK ); | 48 | R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK); |
50 | atomic_inc(&dev->vbl_received); | 49 | atomic_inc(&dev->vbl_received); |
51 | DRM_WAKEUP(&dev->vbl_queue); | 50 | DRM_WAKEUP(&dev->vbl_queue); |
52 | drm_vbl_send_signals( dev ); | 51 | drm_vbl_send_signals(dev); |
53 | return IRQ_HANDLED; | 52 | return IRQ_HANDLED; |
54 | } | 53 | } |
55 | return IRQ_NONE; | 54 | return IRQ_NONE; |
56 | } | 55 | } |
57 | 56 | ||
58 | int r128_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence) | 57 | int r128_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence) |
59 | { | 58 | { |
60 | unsigned int cur_vblank; | 59 | unsigned int cur_vblank; |
61 | int ret = 0; | 60 | int ret = 0; |
62 | 61 | ||
63 | /* Assume that the user has missed the current sequence number | 62 | /* Assume that the user has missed the current sequence number |
64 | * by about a day rather than she wants to wait for years | 63 | * by about a day rather than she wants to wait for years |
65 | * using vertical blanks... | 64 | * using vertical blanks... |
66 | */ | 65 | */ |
67 | DRM_WAIT_ON( ret, dev->vbl_queue, 3*DRM_HZ, | 66 | DRM_WAIT_ON(ret, dev->vbl_queue, 3 * DRM_HZ, |
68 | ( ( ( cur_vblank = atomic_read(&dev->vbl_received ) ) | 67 | (((cur_vblank = atomic_read(&dev->vbl_received)) |
69 | - *sequence ) <= (1<<23) ) ); | 68 | - *sequence) <= (1 << 23))); |
70 | 69 | ||
71 | *sequence = cur_vblank; | 70 | *sequence = cur_vblank; |
72 | 71 | ||
73 | return ret; | 72 | return ret; |
74 | } | 73 | } |
75 | 74 | ||
76 | void r128_driver_irq_preinstall( drm_device_t *dev ) { | 75 | void r128_driver_irq_preinstall(drm_device_t * dev) |
77 | drm_r128_private_t *dev_priv = | 76 | { |
78 | (drm_r128_private_t *)dev->dev_private; | 77 | drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; |
79 | 78 | ||
80 | /* Disable *all* interrupts */ | 79 | /* Disable *all* interrupts */ |
81 | R128_WRITE( R128_GEN_INT_CNTL, 0 ); | 80 | R128_WRITE(R128_GEN_INT_CNTL, 0); |
82 | /* Clear vblank bit if it's already high */ | 81 | /* Clear vblank bit if it's already high */ |
83 | R128_WRITE( R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK ); | 82 | R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK); |
84 | } | 83 | } |
85 | 84 | ||
86 | void r128_driver_irq_postinstall( drm_device_t *dev ) { | 85 | void r128_driver_irq_postinstall(drm_device_t * dev) |
87 | drm_r128_private_t *dev_priv = | 86 | { |
88 | (drm_r128_private_t *)dev->dev_private; | 87 | drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; |
89 | 88 | ||
90 | /* Turn on VBL interrupt */ | 89 | /* Turn on VBL interrupt */ |
91 | R128_WRITE( R128_GEN_INT_CNTL, R128_CRTC_VBLANK_INT_EN ); | 90 | R128_WRITE(R128_GEN_INT_CNTL, R128_CRTC_VBLANK_INT_EN); |
92 | } | 91 | } |
93 | 92 | ||
94 | void r128_driver_irq_uninstall( drm_device_t *dev ) { | 93 | void r128_driver_irq_uninstall(drm_device_t * dev) |
95 | drm_r128_private_t *dev_priv = | 94 | { |
96 | (drm_r128_private_t *)dev->dev_private; | 95 | drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; |
97 | if (!dev_priv) | 96 | if (!dev_priv) |
98 | return; | 97 | return; |
99 | 98 | ||
100 | /* Disable *all* interrupts */ | 99 | /* Disable *all* interrupts */ |
101 | R128_WRITE( R128_GEN_INT_CNTL, 0 ); | 100 | R128_WRITE(R128_GEN_INT_CNTL, 0); |
102 | } | 101 | } |