28 Sep, 2011

1 commit

  • There are numerous broken references to Documentation files (in other
    Documentation files, in comments, etc.). These broken references are
    caused by typo's in the references, and by renames or removals of the
    Documentation files. Some broken references are simply odd.

    Fix these broken references, sometimes by dropping the irrelevant text
    they were part of.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

21 Oct, 2010

1 commit


28 Sep, 2010

1 commit

  • This fixes a nasty memory corruption bug when using userptr I/O.
    The function videobuf_pages_to_sg() sets up the scatter-gather list for the
    DMA transfer to the userspace pages. The first transfer is setup correctly
    (the size is set to PAGE_SIZE - offset), but all other transfers have size
    PAGE_SIZE. This is wrong for the last transfer which may be less than PAGE_SIZE.

    Most, if not all, drivers will program the boards DMA engine correctly, i.e.
    even though the size in the last sg element is wrong, they will do their
    own size calculations and make sure the right amount is DMA-ed, and so seemingly
    prevent memory corruption.

    However, behind the scenes the dynamic DMA mapping support (in lib/swiotlb.c)
    may create bounce buffers if the memory pages are not in DMA-able memory.
    This happens for example on a 64-bit linux with a board that only supports
    32-bit DMA.

    These bounce buffers DO use the information in the sg list to determine the
    size. So while the DMA engine transfers the correct amount of data, when the
    data is 'bounced' back too much is copied, causing buffer overwrites.

    The fix is simple: calculate and set the correct size for the last sg list
    element.

    Signed-off-by: Hans Verkuil
    Cc: stable@kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

03 Aug, 2010

3 commits


19 May, 2010

1 commit


18 May, 2010

1 commit


06 Dec, 2009

1 commit


30 Jan, 2009

1 commit

  • Move DMA-mapping.txt to Documentation/PCI/.

    DMA-mapping.txt was supposed to be moved from Documentation/ to
    Documentation/PCI/. The 00-INDEX files in those two directories
    were updated, along with a few other text files, but the file
    itself somehow escaped being moved, so move it and update more
    text files and source files with its new location.

    Signed-off-by: Randy Dunlap
    Acked-by: Greg Kroah-Hartman
    cc: Jesse Barnes
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

20 Jul, 2008

1 commit


25 Apr, 2008

2 commits


10 Oct, 2007

3 commits

  • Before the videobuf redesign, a procedure for re-using videobuf without PCI
    scatter/gather where provided by changing the pci-dependent operations by
    other operations.

    With the newer approach, those methods are obsolete and can safelly be removed.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Signed-off-by: Mauro Carvalho Chehab
    http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
    Reviewed-by: Ricardo Cerqueira

    Mauro Carvalho Chehab
     
  • video-buf currently does two different tasks:

    - Manages video buffers with a common code that allows
    implementing all the V4L2 different modes of buffering;

    - Controls memory allocations

    While the first task is generic, the second were written to support PCI DMA
    Scatter/Gather needs. The original approach can't even work for those
    video capture hardware that don't support scatter/gather.

    I did one approach to make it more generic. While the approach worked
    fine for vivi driver, it were not generic enough to handle USB needs.

    This patch creates two different modules, one containing the generic
    video buffer handling (videobuf-core) and another with PCI DMA S/G.
    After this patch, it would be simpler to write an USB video-buf and a
    non-SG DMA module.

    Signed-off-by: Mauro Carvalho Chehab
    http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
    Reviewed-by: Ricardo Cerqueira

    Mauro Carvalho Chehab