On Tue, Aug 18, 2009 at 9:54 AM, Kristian Høgsberg<k...@bitplanet.net> wrote:
> On Mon, Aug 17, 2009 at 7:14 PM, Dave Airlie<airl...@gmail.com> wrote:
>>>>
>>>> A couple of years ago, any attempt to return anything else than 0 from
>>>> drm poll resulted in an X server error.
>>>> http://freedesktop.org/bugzilla/show_bug.cgi?id=1505. The fix mentioned
>>>> in the bug was actually to return 0 from drm poll, and a comment about
>>>> this is still present in drm.git. The above breaks drm for old X servers
>>>> and all drivers, which I think is against drm policy?
>>>
>>> That can't be the real problem.  The X server polls on a ton of file
>>> descriptors already; sockets from clients, dbus, input devices.  They
>>> all have poll implementations that don't return 0... I mean, otherwise
>>> they wouldn't work.  Look at evdev_poll() in drivers/input/evdev.c for
>>> the evdev poll implementation, for example.
>>
>> Its a very real problem otherwise we wouldn't have a bug open and an
>> bodge around in the kernel to workaround the broken X servers.
>
> I didn't say that it wasn't a real problem.  I just very seriously
> doubt that it's because the drm fd now has a poll implementation.
> There is no difference between, say the evdev fops poll implementation
> and what I've done in the patch.  Also, note that the return value
> from the poll fops function is not what gets returned from the
> select(2) syscall.  There is no way the poll implementation above can
> make select(2) return EINVAL that wasn't already possible.
>
>> Since this stuff is reliant on kms perhaps just use an alternate poll
>> for kms drivers that does it right.
>
> I don't know what it is you feel that the implementation in the patch
> doesn't do right.

Yeah on review it seems like it should be fine, I think the issue
before was with something calling read after poll returned a non-zero
value.

if the default it still to return 0, then it shouldn't affect anyone using it,
and since old server can't load kms or dri2 driver it should be safe.

Dave.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to