Displaying 3 results from an estimated 3 matches for "videobuf_vmalloc_to_sg".
2019 Sep 02
1
[PATCH] drm/virtio: Use vmalloc for command buffer allocations.
...> > > > if (is_vmalloc_addr(vbuf->data_buf)) ...
> > > >
> > > > needed here I gues?
> > > >
> > >
> > > kvfree() handles vmalloc/kmalloc/kvmalloc internally by doing that check.
> >
> > Ok.
> >
> > > - videobuf_vmalloc_to_sg in drivers/media/v4l2-core/videobuf-dma-sg.c,
> > > assumes contiguous array of scatterlist and that the buffer being converted
> > > is page aligned
> >
> > Well, vmalloc memory _is_ page aligned.
>
> True, but this function gets called for all potential enqueu...
2009 Nov 05
0
[PATCH] Add VirtIO Frame Buffer Support
...e ram out, no junk to the user */
> + adr = (unsigned long) mem;
> + while (size > 0) {
> + SetPageReserved(vmalloc_to_page((void *)adr));
Where is the bit cleared?
> + adr += PAGE_SIZE;
> + size -= PAGE_SIZE;
> + }
> +
> + return mem;
> +}
> +
> +/* This is videobuf_vmalloc_to_sg() from videobuf-dma-sg.c
> + I modified it to take an extra sg entry for the cmd and work with non
> + page-aligned pointers though */
> +static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int length,
> + void *cmd, int cmd_len, int *sg_elem)
> +{
> + struct sc...
2009 Nov 05
0
[PATCH] Add VirtIO Frame Buffer Support
...e ram out, no junk to the user */
> + adr = (unsigned long) mem;
> + while (size > 0) {
> + SetPageReserved(vmalloc_to_page((void *)adr));
Where is the bit cleared?
> + adr += PAGE_SIZE;
> + size -= PAGE_SIZE;
> + }
> +
> + return mem;
> +}
> +
> +/* This is videobuf_vmalloc_to_sg() from videobuf-dma-sg.c
> + I modified it to take an extra sg entry for the cmd and work with non
> + page-aligned pointers though */
> +static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int length,
> + void *cmd, int cmd_len, int *sg_elem)
> +{
> + struct sc...