linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Problem with framebuffer mmap on platforms with large addressing
@ 2012-03-17 16:04 Dmitry Eremin-Solenikov
  2012-03-18  0:46 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Eremin-Solenikov @ 2012-03-17 16:04 UTC (permalink / raw)
  To: linux-fbdev-devel, linuxppc-dev, Florian Tobias Schandinat,
	Josh Boyer, Matt Porter

Hello,

I'm trying to make framebuffer to work on PPC460EX board (canyonlands).

The peculiarity of this platform is the fact that it has
sizeof(unsigned long) = 4,
but physical address on it is 36 bits width. It is a common to various pieces
of the code to expect that unsigned long variable is able to contain physical
address. Most of those places are easy to fix.

The problem I'm stuck with is a fb_mmap() code. To find a right memory to map
it uses information from struct fb_fix_screeninfo provided by the driver.
This structure uses two unsigned long fields to hold physical addresses
(smem_start and mmio_start). It would be easy to change that structure
to use phys_addr_t instead of unsigned long, but this structure is a part
of userspace ABI. It is returned to userspace on FBIOGET_FSCREENINFO ioctl.
And now I'm stuck with it.

In my driver code I have just overwritten the fb_mmap function with
driver-private
fb_mmap callback supporting 64-bit addressing, but this doesn't look like
a generic and correct solution.

What is the best way to fix this problem? Should we break ABI with the goal
of correctness? Should we add new FBIOGET_FSCREENINFO2, which will
return a correct structure with phys_addr_t (or simply u64) fields and make
FBIOGET_FSCREENINFO a wrapper returning partially bogus structure
(with smem_start and mmio_start fields being truncated to just unsigned long)?
What would developers recommend?


Thank you.


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2012-04-09 21:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-17 16:04 Problem with framebuffer mmap on platforms with large addressing Dmitry Eremin-Solenikov
2012-03-18  0:46 ` Benjamin Herrenschmidt
2012-03-18 14:04   ` Dmitry Eremin-Solenikov
2012-03-18 20:49     ` Benjamin Herrenschmidt
2012-03-19 14:42       ` Dmitry Eremin-Solenikov
2012-03-20  5:40         ` Benjamin Herrenschmidt
2012-04-09 16:18           ` Dmitry Eremin-Solenikov
2012-04-09 21:37             ` Benjamin Herrenschmidt
2012-03-21 19:45         ` Florian Tobias Schandinat
2012-03-21 20:49           ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).