Fix DRIExtensionInit() to not register callbacks when it hasn't been
initialized for the current server generation. Fixes a problem where it
    would use stale private index and blow up in colorful ways if no driver
    called DRIScreenInit() on the second generation (which happens due to a
    bug in radeon that i'll fix separately). Note: clearing the index in
    DRIReset() wouldn't work as DRIReset() is called before the
    CloseScreen() chain
			
			
This commit is contained in:
		
							parent
							
								
									02d80a0de9
								
							
						
					
					
						commit
						7314d16cde
					
				
							
								
								
									
										11
									
								
								ChangeLog
								
								
								
								
							
							
						
						
									
										11
									
								
								ChangeLog
								
								
								
								
							|  | @ -1,3 +1,14 @@ | ||||||
|  | 2006-03-15  Benjamin Herrenschmidt  <benh@kernel.crashing.org> | ||||||
|  | 
 | ||||||
|  | 	* hw/xfree86/dri/dri.c: (DRIExtensionInit): | ||||||
|  | 	Fix DRIExtensionInit() to not register callbacks when it hasn't been | ||||||
|  | 	initialized for the current server generation. Fixes a problem where | ||||||
|  | 	it would use stale private index and blow up in colorful ways if no | ||||||
|  | 	driver called DRIScreenInit() on the second generation (which happens | ||||||
|  | 	due to a bug in radeon that i'll fix separately). Note: clearing the | ||||||
|  | 	index in DRIReset() wouldn't work as DRIReset() is called before the | ||||||
|  | 	CloseScreen() chain | ||||||
|  | 
 | ||||||
| 2006-03-15  Benjamin Herrenschmidt  <benh@kernel.crashing.org> | 2006-03-15  Benjamin Herrenschmidt  <benh@kernel.crashing.org> | ||||||
| 
 | 
 | ||||||
| 	* hw/xfree86/common/xf86fbman.c: (localAllocateOffscreenLinear): | 	* hw/xfree86/common/xf86fbman.c: (localAllocateOffscreenLinear): | ||||||
|  |  | ||||||
|  | @ -582,7 +582,7 @@ DRIExtensionInit(void) | ||||||
|     int		    	i; |     int		    	i; | ||||||
|     ScreenPtr		pScreen; |     ScreenPtr		pScreen; | ||||||
| 
 | 
 | ||||||
|     if (DRIScreenPrivIndex < 0) { |     if (DRIScreenPrivIndex < 0 || DRIGeneration != serverGeneration) { | ||||||
| 	return FALSE; | 	return FALSE; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue