Graphic Subsystem

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Re: Graphic Subsystem

Post 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.
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Graphic Subsystem

Post 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
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Re: Graphic Subsystem

Post 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).
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System
Post Reply