public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Problems with dma_mmap_writecombine on mach-pxa
@ 2005-02-17 17:51 Frank Buss
  2005-02-17 18:12 ` Russell King
  0 siblings, 1 reply; 17+ messages in thread
From: Frank Buss @ 2005-02-17 17:51 UTC (permalink / raw)
  To: linux-kernel

I'm trying to use the pxafb driver on mach-pxa, but I can't mmap the
framebuffer memory. I can access it from the driver, filling the entire
screen, but when I access the pointer returned from mmap from a user space
program, the following two things happens:

- the vm_pgoff is ignored and I get the start of the internal buffer, which
caused writing to the palette and DMA descriptors

- when I change the location of the framebuffer to the start of the internal
buffer, I can write to the screen, but only to the first 4 k; any write
after this address is ignored, but no segfault is generated.

Any ideas what I can do to find the reason? I don't think that it is a
kernel bug, but perhaps a wrong configuration for my platform.

-- 
Frank Buß, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de


^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: Problems with dma_mmap_writecombine on mach-pxa
@ 2005-02-23  1:36 Frank Buss
  0 siblings, 0 replies; 17+ messages in thread
From: Frank Buss @ 2005-02-23  1:36 UTC (permalink / raw)
  To: 'Linux Kernel Mailing List'; +Cc: rmk+lkml

Russell King <rmk+lkml@arm.linux.org.uk> wrote:

> Since we map the whole lot in one go, if you get one page, there's no
> reason why you shouldn't get the lot.  This is why I'm wondering if
> it has something to do with your other modifications.

my colleage has found the bug: in the function dma_mmap in 
arch/arm/mm/consistent.c the call to remap_pfn_range uses 
user_size in PAGE_SIZE units, but looks like it is expected 
in bytes. When using (user_size << PAGE_SHIFT), it works.

I don't know, where to fix it: Should the lower level calls 
get the size in bytes (most function arguments in Linux 
kernel sources are not commented), this means fixing the 
dma_mmap, or should PAGE_SIZE be used, then the lower level 
functions needs to be fixed.

-- 
Frank Buß, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de


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

end of thread, other threads:[~2005-02-23  1:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-17 17:51 Problems with dma_mmap_writecombine on mach-pxa Frank Buss
2005-02-17 18:12 ` Russell King
2005-02-17 19:14   ` Frank Buss
2005-02-17 19:58     ` Russell King
2005-02-18  9:30   ` [TTY] 2 points seems strange to me Franck Bui-Huu
2005-02-18 14:58     ` Paul Fulghum
2005-02-18 15:08       ` Paulo Marques
2005-02-18 15:15         ` Paul Fulghum
2005-02-18 15:24           ` Paulo Marques
2005-02-18 15:24           ` linux-os
2005-02-18 15:27             ` Paulo Marques
2005-02-18 16:14               ` Franck Bui-Huu
2005-02-18 15:19         ` linux-os
2005-02-18 16:29       ` Franck Bui-Huu
2005-02-18 16:41         ` Paul Fulghum
2005-02-18 18:07   ` Problems with dma_mmap_writecombine on mach-pxa Frank Buss
  -- strict thread matches above, loose matches on Subject: below --
2005-02-23  1:36 Frank Buss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox