Re: Sparc64 and ATI fb, cannot mmap() - why?

From: James Simmons (jsimmons@acsu.buffalo.edu)
Date: Tue Jun 20 2000 - 19:29:24 EST


> I think the problem is, at the core, that people wish to mmap and
> program hardware without having to have any knowledge about the
> hardware. I wonder how many people have ever considered it in
> this way :-)

With the way video hardware various. Never! The only thing the kernel
should do is manage access to the hardware.

> And these chips are going to get more complicated, have more varied
> ranges of different mmio/fb areas of the chip to get at. It's not
> going to get simpler, and just adding more specifiers won't make
> the core problem go away.
>
> So in my opinion, the solution is just to do away with the current
> fbcon mmap model completely, and go to one where you actually have to
> know what you are doing to mmap and play with a piece of hardware.

I agree with you on this. Not only will we have more varied ranges of
buffers and register regions. We also have to deal with caching and
non caching memory regions used by video hardware. I know SGI hardware for
example has some of it graphics register regions mapped to non caching
memory and some to caching memory regions. This is why /dev/graphics on
IRIX uses a ioctl instead of mmapp function. In fact their whole approach
to the problem was make a generic ioctl call that allows you to pass
driver specific data to itas well as where to map it to. As for use to
mmap say a stencil buffer we have to creat some driver specific packet.

struct xxx_gfx_board_info {
        ... what we want. In this case stencil buffer
        ... caching info
        ... address where we want it to map to.
}

ioctl(fd, GFX_ATTACH, (void *) xxx_gfx_board_info);

As you can see any type of data can be passed in.
 
Q: Why did they deprecate a.out support in linux?
A: Because a nasty coff is bad for your elf.

James Simmons [jsimmons@linux-fbdev.org] ____/|
fbdev/console/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U
http://linuxconsole.sourceforge.net

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:21 EST