2005-04-28 10:57:39

by Dave Airlie

[permalink] [raw]
Subject: patch: fix DRM on XFree86 4.3/Debian


Hi,
This patch fixes an issue with XFree86 4.3 not starting properly
on Debian sarge with a 2.6.11 kernel and I think it should be in stable,
it has been in DRM CVS and in 2.6.12-rc2 for a while now...

Signed-off-by: Dave Airlie <[email protected]>

diff -Naru a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c
--- a/drivers/char/drm/drm_drv.c 2005-04-28 03:56:32 -07:00
+++ b/drivers/char/drm/drm_drv.c 2005-04-28 03:56:32 -07:00
@@ -144,6 +144,12 @@
if (dev->driver->pretakedown)
dev->driver->pretakedown(dev);

+ if (dev->unique) {
+ drm_free(dev->unique, strlen(dev->unique) + 1, DRM_MEM_DRIVER);
+ dev->unique = NULL;
+ dev->unique_len = 0;
+ }
+
if ( dev->irq_enabled ) drm_irq_uninstall( dev );

down( &dev->struct_sem );