[PATCH] drm: Honour O_NONBLOCK on the device for reading events

2011-06-21 Thread Chris Wilson
Otherwise drmHandleEvent will block if accidentally read too often. In order to handle the case where the event is read off the queue by another thread before we dequeue the event, we delay the actual checking for EAGAIN to under the spinlock and so inline drm_dequeue_event(). Signed-off-by:

[PATCH] drm: Honour O_NONBLOCK on the device for reading events

2011-06-21 Thread Chris Wilson
Otherwise drmHandleEvent will block if accidentally read too often. In order to handle the case where the event is read off the queue by another thread before we dequeue the event, we delay the actual checking for EAGAIN to under the spinlock and so inline drm_dequeue_event(). Signed-off-by:

[PATCH] drm: Honour O_NONBLOCK on the device for reading events

2011-06-21 Thread Chris Wilson
Otherwise drmHandleEvent will block if accidentally read too often. In order to handle the case where the event is read off the queue by another thread before we dequeue the event, we delay the actual checking for EAGAIN to under the spinlock and so inline drm_dequeue_event(). Signed-off-by:

[PATCH] drm: Honour O_NONBLOCK on the device for reading events

2011-06-21 Thread Chris Wilson
Otherwise drmHandleEvent will block if accidentally read too often. In order to handle the case where the event is read off the queue by another thread before we dequeue the event, we delay the actual checking for EAGAIN to under the spinlock and so inline drm_dequeue_event(). Signed-off-by:

[PATCH] drm: Honour O_NONBLOCK on the device for reading events

2011-06-09 Thread Alan Cox
On Wed, 8 Jun 2011 20:14:01 +0100 Chris Wilson wrote: > Otherwise drmHandleEvent will block if accidentally read too often... > > Signed-off-by: Chris Wilson > Cc: Phillip Haddad > --- > drivers/gpu/drm/drm_fops.c |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff

[PATCH] drm: Honour O_NONBLOCK on the device for reading events

2011-06-08 Thread Chris Wilson
Otherwise drmHandleEvent will block if accidentally read too often... Signed-off-by: Chris Wilson Cc: Phillip Haddad --- drivers/gpu/drm/drm_fops.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index