summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-08-09 16:20:44 -0700
committerIan Romanick <idr@us.ibm.com>2007-08-09 16:20:44 -0700
commit6dd97099ea5c6dc7931c6b482eb5935f7dd9ed2d (patch)
treea650b460f674e30b371453036fd07831393e8783 /linux-core
parentdbd4d0597ff32458bbe4347bdea0e4b9e55a14da (diff)
Minor clean up of IRQ code. Much, much more to come.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/xgi_drv.c27
-rw-r--r--linux-core/xgi_drv.h2
2 files changed, 9 insertions, 20 deletions
diff --git a/linux-core/xgi_drv.c b/linux-core/xgi_drv.c
index b0f84c81..d0878184 100644
--- a/linux-core/xgi_drv.c
+++ b/linux-core/xgi_drv.c
@@ -186,8 +186,6 @@ void xgi_engine_init(struct xgi_info * info)
}
-void xgi_kern_isr_bh(struct drm_device *dev);
-
int xgi_bootstrap(struct drm_device * dev, void * data,
struct drm_file * filp)
{
@@ -335,28 +333,19 @@ void xgi_reclaim_buffers_locked(struct drm_device * dev,
irqreturn_t xgi_kern_isr(DRM_IRQ_ARGS)
{
struct drm_device *dev = (struct drm_device *) arg;
-// struct xgi_info *info = dev->dev_private;
- u32 need_to_run_bottom_half = 0;
-
- //DRM_INFO("xgi_kern_isr \n");
+ struct xgi_info *info = dev->dev_private;
+ const u32 irq_bits = DRM_READ32(info->mmio_map, 0x2810);
- //xgi_dvi_irq_handler(info);
- if (need_to_run_bottom_half) {
- drm_locked_tasklet(dev, xgi_kern_isr_bh);
+ if ((irq_bits & 0x00000000) != 0) {
+ DRM_WRITE32(info->mmio_map, 0x2810,
+ 0x04000000 | irq_bits);
+ return IRQ_HANDLED;
+ } else {
+ return IRQ_NONE;
}
-
- return IRQ_HANDLED;
}
-void xgi_kern_isr_bh(struct drm_device *dev)
-{
- struct xgi_info *info = dev->dev_private;
-
- DRM_INFO("xgi_kern_isr_bh \n");
-
- //xgi_dvi_irq_handler(info);
-}
int xgi_driver_load(struct drm_device *dev, unsigned long flags)
{
diff --git a/linux-core/xgi_drv.h b/linux-core/xgi_drv.h
index 6b209aa4..6afc4c6c 100644
--- a/linux-core/xgi_drv.h
+++ b/linux-core/xgi_drv.h
@@ -39,7 +39,7 @@
#define DRIVER_MAJOR 0
#define DRIVER_MINOR 11
-#define DRIVER_PATCHLEVEL 1
+#define DRIVER_PATCHLEVEL 2
#include "xgi_cmdlist.h"
#include "xgi_drm.h"