Page 2 of 2

Re: Graphic Subsystem

Posted: Mon Oct 27, 2008 3:00 pm
by Jeko
Owen wrote:
Jeko wrote: No, because there are yet drivers for video cards in X and DirectFB. For X, there are all the drivers for each video card, in DirectFB there are all the drivers, but they don't support every feature...

The only thing I must do for use X or DirectFB, is to integrate them in my kernel, I mustn't write any driver.
THE X11/DIRECTFB DRIVERS DEPEND UPON THE KERNEL DRIVERS!

The hardware accelerated graphics are about 10% X server, 70% userspace, 20% kernel. The X server is responsible for controlling windows, etc. The kernel is responsible for arbitrating between users. The userspace drivers are the big massive things like libGL which talk to the hardware.

You will find that the X11 drivers mostly just talk to the kernel driver. The userspace drivers will probably do something using ioctls or such over a device such as /dev/nvidia0, and mmapping regions of the graphic's card's memory with the kernel driver's permission.

You still need to write your kernel driver. When using an nVIDIA card, *nix all load nvidia.ko. When using an ATi card, they load fglrx.ko. When using an intel card, they probably load something else.

X11 talks to the kernel through it's drivers which talk to the drivers for your video card. You still need your kernel driver, and for acceleration, you need some form of libGL, libGLU and libGLX (if your using X11)

For ATi and Intel cards, you could port the Linux kernel drivers, but be aware that they are GPLed. If your OS is GPLed, then that will be OK with you.

The driver interface is the same, DRI/DRM...
Kernel drivers are written for this interface, so I must only port the interface, not all the drivers...

I must port X11, OpenGL, and DRI. With these ports I can use linux drivers.

Re: Graphic Subsystem

Posted: Mon Oct 27, 2008 3:44 pm
by Combuster
There are several driver parts which you need. One is the kernel part. It exposes a device file and needs the interface of the linux kernel to work.

So its not just X11+protocols

Re: Graphic Subsystem

Posted: Mon Oct 27, 2008 4:30 pm
by Jeko
Combuster wrote:There are several driver parts which you need. One is the kernel part. It exposes a device file and needs the interface of the linux kernel to work.

So its not just X11+protocols
No, not only X11. As I written, there is the DRI interface...

http://dri.freedesktop.org/wiki/DRM

However, I think I'll use Gallium3D for the graphic management. And maybe X11 as window manager (but a simpler implementation of X than X.Org... Something that is better for my kernel structure).