Deleted Added
full compact
mga_irq.c (182080) mga_irq.c (189130)
1/* mga_irq.c -- IRQ handling for radeon -*- linux-c -*-
2 */
3/*-
4 * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
5 *
6 * The Weather Channel (TM) funded Tungsten Graphics to develop the
7 * initial release of the Radeon 8500 driver under the XFree86 license.
8 * This notice must be preserved.

--- 18 unchanged lines hidden (view full) ---

27 * DEALINGS IN THE SOFTWARE.
28 *
29 * Authors:
30 * Keith Whitwell <keith@tungstengraphics.com>
31 * Eric Anholt <anholt@FreeBSD.org>
32 */
33
34#include <sys/cdefs.h>
1/* mga_irq.c -- IRQ handling for radeon -*- linux-c -*-
2 */
3/*-
4 * Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
5 *
6 * The Weather Channel (TM) funded Tungsten Graphics to develop the
7 * initial release of the Radeon 8500 driver under the XFree86 license.
8 * This notice must be preserved.

--- 18 unchanged lines hidden (view full) ---

27 * DEALINGS IN THE SOFTWARE.
28 *
29 * Authors:
30 * Keith Whitwell <keith@tungstengraphics.com>
31 * Eric Anholt <anholt@FreeBSD.org>
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/dev/drm/mga_irq.c 182080 2008-08-23 20:59:12Z rnoland $");
35__FBSDID("$FreeBSD: head/sys/dev/drm/mga_irq.c 189130 2009-02-28 02:37:55Z rnoland $");
36
37#include "dev/drm/drmP.h"
38#include "dev/drm/drm.h"
39#include "dev/drm/mga_drm.h"
40#include "dev/drm/mga_drv.h"
41
42u32 mga_get_vblank_counter(struct drm_device *dev, int crtc)
43{

--- 108 unchanged lines hidden (view full) ---

152 MGA_WRITE(MGA_IEN, 0);
153 /* Clear bits if they're already high */
154 MGA_WRITE(MGA_ICLEAR, ~0);
155}
156
157int mga_driver_irq_postinstall(struct drm_device * dev)
158{
159 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
36
37#include "dev/drm/drmP.h"
38#include "dev/drm/drm.h"
39#include "dev/drm/mga_drm.h"
40#include "dev/drm/mga_drv.h"
41
42u32 mga_get_vblank_counter(struct drm_device *dev, int crtc)
43{

--- 108 unchanged lines hidden (view full) ---

152 MGA_WRITE(MGA_IEN, 0);
153 /* Clear bits if they're already high */
154 MGA_WRITE(MGA_ICLEAR, ~0);
155}
156
157int mga_driver_irq_postinstall(struct drm_device * dev)
158{
159 drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private;
160 int ret;
161
160
162 ret = drm_vblank_init(dev, 1);
163 if (ret)
164 return ret;
165
166 DRM_INIT_WAITQUEUE(&dev_priv->fence_queue);
167
168 /* Turn on soft trap interrupt. Vertical blank interrupts are enabled
169 * in mga_enable_vblank.
170 */
171 MGA_WRITE(MGA_IEN, MGA_SOFTRAPEN);
172 return 0;
173}

--- 12 unchanged lines hidden ---
161 DRM_INIT_WAITQUEUE(&dev_priv->fence_queue);
162
163 /* Turn on soft trap interrupt. Vertical blank interrupts are enabled
164 * in mga_enable_vblank.
165 */
166 MGA_WRITE(MGA_IEN, MGA_SOFTRAPEN);
167 return 0;
168}

--- 12 unchanged lines hidden ---