Break poll() to make it match the Xserver's broken expectations.
parent
486a84d70c
commit
b974e2cd68
|
@ -472,14 +472,15 @@ EXPORT_SYMBOL(drm_release);
|
||||||
/** No-op. */
|
/** No-op. */
|
||||||
/* This is to deal with older X servers that believe 0 means data is
|
/* This is to deal with older X servers that believe 0 means data is
|
||||||
* available which is not the correct return for a poll function.
|
* available which is not the correct return for a poll function.
|
||||||
* By alternating returns both interfaces are happy. This is fixed
|
* This cannot be fixed until the Xserver is fixed. Xserver will need
|
||||||
* in newer X servers.
|
* to set a newer interface version to avoid breaking older Xservers.
|
||||||
|
* Without fixing the Xserver you get: "WaitForSomething(): select: errno=22"
|
||||||
|
* http://freedesktop.org/bugzilla/show_bug.cgi?id=1505 if you try
|
||||||
|
* to return the correct response.
|
||||||
*/
|
*/
|
||||||
unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait)
|
unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait)
|
||||||
{
|
{
|
||||||
static int flip;
|
/* return (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM); */
|
||||||
if ((flip = !flip))
|
|
||||||
return (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(drm_poll);
|
EXPORT_SYMBOL(drm_poll);
|
||||||
|
|
Loading…
Reference in New Issue