[Mesa-dev] XA tracker pipe-loader woes.

Thomas Hellstrom thellstrom at vmware.com
Wed Jul 2 06:42:38 PDT 2014


On 07/02/2014 12:50 PM, Maarten Lankhorst wrote:
> op 02-07-14 12:34, Thomas Hellstrom schreef:
>> Hi, Rob
>>
>> It turns out that your patch  st/xa: use pipe-loader to get screen,
>> makes the xa tracker close the X server driver's drm file descriptor when
>> XA initialization fails or when XA is closed.
>>
>> This breaks X for example on Ubuntu 14.10 if 3D is disabled (typically
>> on ESX). Pretty nasty bug for us.
>>
>> I'm not sure about the correct fix. Personally I don't think the pipe
>> loader should close the file descriptor on cleanup.
>> If people insist on it doing so, we can either intentionally leak pipe
>> loader state or we can perhaps dup() the file descriptor before opening
>> the loader. I'm not completely sure how DRM responds to that, though.
>>
> duping fd's is fine, you get the same underlying file, but the kernel state doesn't change at all.
> Nouveau uses this solution too, and it works for us. :-)
>
> ~Maarten
Thanks. Good to know. Although I still think it's incorrect of the
pipe-loader to hijack the file descriptor in that way.

/Thomas


More information about the mesa-dev mailing list