All of lore.kernel.org
 help / color / mirror / Atom feed
* [Query][videobuf-dma-sg] Pages in Highmem handling
@ 2010-08-27 14:57 Aguirre, Sergio
  2010-12-20 11:23 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: Aguirre, Sergio @ 2010-08-27 14:57 UTC (permalink / raw)
  To: linux-media@vger.kernel.org; +Cc: Warren, Christina, Boateng, Akwasi

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-07 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-27 14:57 [Query][videobuf-dma-sg] Pages in Highmem handling Aguirre, Sergio
2010-12-20 11:23 ` Mauro Carvalho Chehab
2011-01-07 14:21   ` Aguirre, Sergio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.