[PATCH xserver] xfree86/modes: Use xf86ScrnToScreen in xf86RandR12LoadPalette

Michel Dänzer michel at daenzer.net
Mon Aug 1 07:41:38 UTC 2016


On 30.07.2016 09:54, Keith Packard wrote:
> Michel Dänzer <michel at daenzer.net> writes:
> 
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> Fixes crash in ScreenInit -> xf86HandleColormaps ->
>> xf86RandR12LoadPalette with drivers which don't assign pScrn->pScreen
>> in ScreenInit.
> 
> That's a terrible interface. This should be fixed by wrapping the driver
> ScreenInit and getting pScrn->pScreen set before the 'real' driver
> ScreenInit is called; that way pScrn->pScreen will *always* be valid.
> 
> We could then eliminate the xf86ScrnToScreen API entirely at some point.
> 
> Here's an untested patch which should fix this:

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160801/c8d2c13c/attachment.sig>


More information about the xorg-devel mailing list