Messages in this thread Patch in this message | | | Date | Mon, 10 Jan 2005 11:14:55 +0100 | From | Brice Goglin <> | Subject | Re: 2.6.10-mm2 solved |
| |
Dave Airlie a écrit : >>I still only see "agp_backend_acquire failed on atomic read". > > do you see how many atomic inc and atomic decs there is? > > send me the full dmesg... > thanks, > Dave.
The agp_in_use field of the bridge structure is never initialized. That's the reason why atomic_read fails to read 0.
In vanilla, the bridge is allocated as a static global variable, and thus initialized to 0 at init. In -mm, the bridge is kmalloc'ed, and thus not initialized.
The attached patch fixes it and solves my problem (when combined with http://lkml.org/lkml/2005/1/7/377). DRM is back with good performance.
Regards Brice --- linux-mm/drivers/char/agp/backend.c.orig 2005-01-10 10:36:13.000000000 +0100 +++ linux-mm/drivers/char/agp/backend.c 2005-01-10 10:34:35.000000000 +0100 @@ -235,6 +235,8 @@ if (!bridge) return NULL; + atomic_set(&bridge->agp_in_use, 0); + if (list_empty(&agp_bridges)) agp_bridge = bridge; | |