[Query][videobuf-dma-sg] Pages in Highmem handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I see that in current videobuf library, for DMA SG code, these functions fail when
Detecting a page in Highmem region:

- videobuf_pages_to_sg
- videobuf_vmalloc_to_sg

Now, what's the real reason to not allow handling of Highmem pages?
Is it an assumption that _always_ HighMem is not reachable by DMA?

I guess my point is, OMAP platform (and maybe other platforms) can handle
Highmem pages without any problem. I commented these validations:

65 static struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt,
66                                                   int nr_pages)
67 {

...

77         for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) {
78                 pg = vmalloc_to_page(virt);
79                 if (NULL == pg)
80                         goto err;
81                 /* BUG_ON(PageHighMem(pg)); */

...

96 static struct scatterlist *videobuf_pages_to_sg(struct page **pages,
97                                                 int nr_pages, int offset)
98 {

...

109         /* if (PageHighMem(pages[0])) */
110                 /* DMA to highmem pages might not work */
111                 /* goto highmem; */
112         sg_set_page(&sglist[0], pages[0], PAGE_SIZE - offset, offset);
113         for (i = 1; i < nr_pages; i++) {
114                 if (NULL == pages[i])
115                         goto nopage;
116                 /* if (PageHighMem(pages[i]))
117                         goto highmem; */
118                 sg_set_page(&sglist[i], pages[i], PAGE_SIZE, 0);
119         }

Can somebody shed any light on this?

Regards,
Sergio
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux