summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/drm_linux.h5
-rw-r--r--sys/dev/pci/drm/i915/i915_irq.c5
-rw-r--r--sys/dev/pci/drm/radeon/evergreen.c10
-rw-r--r--sys/dev/pci/drm/radeon/r100.c8
-rw-r--r--sys/dev/pci/drm/radeon/r600.c10
-rw-r--r--sys/dev/pci/drm/radeon/rs600.c6
-rw-r--r--sys/dev/pci/drm/radeon/si.c10
7 files changed, 27 insertions, 27 deletions
diff --git a/sys/dev/pci/drm/drm_linux.h b/sys/dev/pci/drm/drm_linux.h
index 8d31bd2f287..f41ab4dfb4c 100644
--- a/sys/dev/pci/drm/drm_linux.h
+++ b/sys/dev/pci/drm/drm_linux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_linux.h,v 1.6 2015/02/12 06:30:56 jsg Exp $ */
+/* $OpenBSD: drm_linux.h,v 1.7 2015/02/12 11:11:45 jsg Exp $ */
/*
* Copyright (c) 2013, 2014 Mark Kettenis
*
@@ -15,6 +15,9 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#define IRQ_NONE 0
+#define IRQ_HANDLED 1
+
#define __force
#define KERN_INFO
#define KERN_WARNING
diff --git a/sys/dev/pci/drm/i915/i915_irq.c b/sys/dev/pci/drm/i915/i915_irq.c
index 2467f753ad5..db99a1fca1a 100644
--- a/sys/dev/pci/drm/i915/i915_irq.c
+++ b/sys/dev/pci/drm/i915/i915_irq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_irq.c,v 1.20 2015/02/12 04:56:03 kettenis Exp $ */
+/* $OpenBSD: i915_irq.c,v 1.21 2015/02/12 11:11:45 jsg Exp $ */
/* i915_irq.c -- IRQ support for the I915 -*- linux-c -*-
*/
/*
@@ -34,9 +34,6 @@
#include "i915_drv.h"
#include "intel_drv.h"
-#define IRQ_NONE 0
-#define IRQ_HANDLED 1
-
/* For display hotplug interrupt */
static void
ironlake_enable_display_irq(drm_i915_private_t *dev_priv, u32 mask)
diff --git a/sys/dev/pci/drm/radeon/evergreen.c b/sys/dev/pci/drm/radeon/evergreen.c
index d6416d642ee..d56e89168d5 100644
--- a/sys/dev/pci/drm/radeon/evergreen.c
+++ b/sys/dev/pci/drm/radeon/evergreen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: evergreen.c,v 1.14 2015/02/12 08:48:32 jsg Exp $ */
+/* $OpenBSD: evergreen.c,v 1.15 2015/02/12 11:11:45 jsg Exp $ */
/*
* Copyright 2010 Advanced Micro Devices, Inc.
*
@@ -3041,16 +3041,16 @@ int evergreen_irq_process(struct radeon_device *rdev)
bool queue_hdmi = false;
if (!rdev->ih.enabled || rdev->shutdown)
- return (0);
+ return IRQ_NONE;
wptr = evergreen_get_ih_wptr(rdev);
if (wptr == rdev->ih.rptr)
- return (0);
+ return IRQ_NONE;
restart_ih:
/* is somebody else already processing irqs? */
if (atomic_xchg(&rdev->ih.lock, 1))
- return (0);
+ return IRQ_NONE;
rptr = rdev->ih.rptr;
DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
@@ -3390,7 +3390,7 @@ restart_ih:
if (wptr != rptr)
goto restart_ih;
- return (1);
+ return IRQ_HANDLED;
}
/**
diff --git a/sys/dev/pci/drm/radeon/r100.c b/sys/dev/pci/drm/radeon/r100.c
index 9fe8a393967..7b04ee20778 100644
--- a/sys/dev/pci/drm/radeon/r100.c
+++ b/sys/dev/pci/drm/radeon/r100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: r100.c,v 1.10 2015/02/11 07:01:37 jsg Exp $ */
+/* $OpenBSD: r100.c,v 1.11 2015/02/12 11:11:45 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -774,10 +774,10 @@ int r100_irq_process(struct radeon_device *rdev)
status = r100_irq_ack(rdev);
if (!status) {
- return (0);
+ return IRQ_NONE;
}
if (rdev->shutdown) {
- return (0);
+ return IRQ_NONE;
}
while (status) {
/* SW interrupt */
@@ -828,7 +828,7 @@ int r100_irq_process(struct radeon_device *rdev)
break;
}
}
- return (1);
+ return IRQ_HANDLED;
}
u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc)
diff --git a/sys/dev/pci/drm/radeon/r600.c b/sys/dev/pci/drm/radeon/r600.c
index b7411fde2a6..b649aea77ec 100644
--- a/sys/dev/pci/drm/radeon/r600.c
+++ b/sys/dev/pci/drm/radeon/r600.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: r600.c,v 1.13 2015/02/12 08:48:32 jsg Exp $ */
+/* $OpenBSD: r600.c,v 1.14 2015/02/12 11:11:45 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -3853,7 +3853,7 @@ int r600_irq_process(struct radeon_device *rdev)
bool queue_hdmi = false;
if (!rdev->ih.enabled || rdev->shutdown)
- return (0);
+ return IRQ_NONE;
/* No MSIs, need a dummy read to flush PCI DMAs */
if (!rdev->msi_enabled)
@@ -3862,11 +3862,11 @@ int r600_irq_process(struct radeon_device *rdev)
wptr = r600_get_ih_wptr(rdev);
if (wptr == rdev->ih.rptr)
- return (0);
+ return IRQ_NONE;
restart_ih:
/* is somebody else already processing irqs? */
if (atomic_xchg(&rdev->ih.lock, 1))
- return (0);
+ return IRQ_NONE;
rptr = rdev->ih.rptr;
DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
@@ -4045,7 +4045,7 @@ restart_ih:
if (wptr != rptr)
goto restart_ih;
- return (1);
+ return IRQ_HANDLED;
}
/*
diff --git a/sys/dev/pci/drm/radeon/rs600.c b/sys/dev/pci/drm/radeon/rs600.c
index de23e52be2f..1ab0ba26d01 100644
--- a/sys/dev/pci/drm/radeon/rs600.c
+++ b/sys/dev/pci/drm/radeon/rs600.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rs600.c,v 1.6 2014/02/09 12:33:44 jsg Exp $ */
+/* $OpenBSD: rs600.c,v 1.7 2015/02/12 11:11:45 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -712,7 +712,7 @@ int rs600_irq_process(struct radeon_device *rdev)
if (!status &&
!rdev->irq.stat_regs.r500.disp_int &&
!rdev->irq.stat_regs.r500.hdmi0_status) {
- return (0);
+ return IRQ_NONE;
}
while (status ||
rdev->irq.stat_regs.r500.disp_int ||
@@ -772,7 +772,7 @@ int rs600_irq_process(struct radeon_device *rdev)
break;
}
}
- return (1);
+ return IRQ_HANDLED;
}
u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc)
diff --git a/sys/dev/pci/drm/radeon/si.c b/sys/dev/pci/drm/radeon/si.c
index 8b042782f02..8d7344b3ddb 100644
--- a/sys/dev/pci/drm/radeon/si.c
+++ b/sys/dev/pci/drm/radeon/si.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: si.c,v 1.18 2015/02/12 08:48:32 jsg Exp $ */
+/* $OpenBSD: si.c,v 1.19 2015/02/12 11:11:45 jsg Exp $ */
/*
* Copyright 2011 Advanced Micro Devices, Inc.
*
@@ -3729,16 +3729,16 @@ int si_irq_process(struct radeon_device *rdev)
bool queue_hotplug = false;
if (!rdev->ih.enabled || rdev->shutdown)
- return (0);
+ return IRQ_NONE;
wptr = si_get_ih_wptr(rdev);
if (wptr == rdev->ih.rptr)
- return (0);
+ return IRQ_NONE;
restart_ih:
/* is somebody else already processing irqs? */
if (atomic_xchg(&rdev->ih.lock, 1))
- return (0);
+ return IRQ_NONE;
rptr = rdev->ih.rptr;
DRM_DEBUG("si_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
@@ -4026,7 +4026,7 @@ restart_ih:
if (wptr != rptr)
goto restart_ih;
- return (1);
+ return IRQ_HANDLED;
}
/**