summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorldelgass <ldelgass>2003-03-24 18:42:03 +0000
committerldelgass <ldelgass>2003-03-24 18:42:03 +0000
commit33ee43af7229caa62c105ad38034714a3952fac3 (patch)
treebe049062274ae019762ab1d6a89d7089e0814aa7
parentfbcdec54e3e14e3cfea89896a67f3fa62838eab7 (diff)
Uninstall irq handler for i810/i830 on DRICloseScreen (before DMA cleanup).
Fixes problem when interrupts arrive after DMA cleanup with older drm modules that use interrupts for DMA. (Dave Airlie)
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c1
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c6
3 files changed, 13 insertions, 0 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
index c4fdfcfbf..eac75c03b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
@@ -931,6 +931,12 @@ I810DRICloseScreen(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
I810Ptr pI810 = I810PTR(pScrn);
+ I810DRIPtr pI810DRI = pI810->pDRIInfo->devPrivate;
+
+ if (pI810DRI->irq) {
+ drmCtlUninstHandler(pI810->drmSubFD);
+ pI810DRI->irq = 0;
+ }
I810CleanupDma(pScrn);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
index 3e84979ac..b8e203897 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
@@ -262,6 +262,7 @@ static const char *drmSymbols[] = {
"drmCommandWriteRead",
"drmCreateContext",
"drmCtlInstHandler",
+ "drmCtlUninstHandler",
"drmDestroyContext",
"drmFreeVersion",
"drmGetInterruptFromBusID",
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c
index bdfb9169e..b7a752695 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i830_dri.c
@@ -713,9 +713,15 @@ I830DRICloseScreen(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
I830Ptr pI830 = I830PTR(pScrn);
+ I830DRIPtr pI830DRI = pI830->pDRIInfo->devPrivate;
DPRINTF(PFX, "I830DRICloseScreen\n");
+ if (pI830DRI->irq) {
+ drmCtlUninstHandler(pI830->drmSubFD);
+ pI830DRI->irq = 0;
+ }
+
I830CleanupDma(pScrn);
DRICloseScreen(pScreen);