Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1f8d30083abc17897b897787c39d446eb9d99fe0
Commit:     1f8d30083abc17897b897787c39d446eb9d99fe0
Parent:     dfd8c04ec14b88bc2849e62d6ff9e36f31352b60
Author:     Mauro Carvalho Chehab <[EMAIL PROTECTED]>
AuthorDate: Sun Jan 13 19:40:30 2008 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:04:57 2008 -0200

    V4L/DVB (7023): Fix a regresion left by changeset 7e65d6e8f6df
    
    Changeset 7e65d6e8f6df removed a very bad hack on mmap(). However, the fixes
    weren't considering usermap and overlay memory models. This were breaking
    direct reading from /dev/video?, used mostly by mpeg aware drivers.
    
    Thanks to Steven Toth <[EMAIL PROTECTED]> for reporting the issue and
    bissecting it.
    
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/videobuf-core.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/videobuf-core.c 
b/drivers/media/video/videobuf-core.c
index c3adbd6..80a14da 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -102,10 +102,14 @@ int videobuf_iolock(struct videobuf_queue *q, struct 
videobuf_buffer *vb,
           since mmap_mapper() method should be called before _iolock.
           On some cases, the mmap_mapper() is called only after scheduling.
         */
-       wait_event_timeout(vb->done, q->is_mmapped, msecs_to_jiffies(100));
-       if (!q->is_mmapped) {
-               printk(KERN_ERR "Error: mmap_mapper() never called!\n");
-               return -EINVAL;
+       if (vb->memory == V4L2_MEMORY_MMAP) {
+               wait_event_timeout(vb->done, q->is_mmapped,
+                                  msecs_to_jiffies(100));
+               if (!q->is_mmapped) {
+                       printk(KERN_ERR
+                              "Error: mmap_mapper() never called!\n");
+                       return -EINVAL;
+               }
        }
 
        return CALL(q, iolock, q, vb, fbuf);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to