From d81bca762e9c9a3f0838e2883c8bb23834863522 Mon Sep 17 00:00:00 2001 From: bjs Date: Thu, 1 Nov 2007 13:20:04 +0000 Subject: [PATCH] Until I have a chance to further evaluate and re-work the locking here, change from an adaptive to spin mutex @ IPL_TTY. This seems to mitigate or eliminate a lot of locking-related issues (such as a hang when running glxgears under AIGLX). Tested by me and Vincent <10.50@free.fr>. In this code, we have three locks: irq, dma, and device. If anyone has any thoughts on how to improve this situation, e.g. by using different lock types/priorities/soft interrupts/etc. for different locks, please share them with me. NOTE: I've had the best results thusfar using Mesa 7.0.2-rc1 (r300 users could even try the r300 driver code from the master branch) and xorg-server 1.4+patches from GIT. --- sys/dev/drm/drmP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index d8053d06ec50..f5cc42623398 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -227,7 +227,7 @@ MALLOC_DECLARE(M_DRM); #define DRM_STRUCTPROC struct proc #define DRM_STRUCTCDEVPROC struct lwp #define DRM_SPINTYPE kmutex_t -#define DRM_SPININIT(l,name) mutex_init(l, MUTEX_DRIVER, IPL_NONE) +#define DRM_SPININIT(l,name) mutex_init(l, MUTEX_DRIVER, IPL_TTY) #define DRM_SPINUNINIT(l) mutex_destroy(l) #define DRM_SPINLOCK(l) mutex_enter(l) #define DRM_SPINUNLOCK(u) mutex_exit(u)