Opened 11 years ago

Last modified 4 years ago

#520 new enhancement

Driver for VESA-compatible graphics adapter

Reported by: Vojtech Horky Owned by:
Priority: major Milestone:
Component: helenos/gui Version: mainline
Keywords: gsoc13, gsoc14, gsoc15, ui Cc:
Blocker for: Depends on:
See also:

Description (last modified by Martin Decky)

Implement a driver for a VESA-compatible graphics card pluggable into the HelenOS graphics stack.

HelenOS has its own compositing server but it currently depends on kernel to properly set the mode of the graphics card. Effectively this means that the configuration of the resolution is done at compile time (through a configuration menu option) and there is no way to e.g. change the resolution at run-time.

The goal of this ticket is to implement a driver for a graphics card that would be pluggable to the graphics stack and to the driver framework implemented in HelenOS and that would allow the most common operations with the graphics card. Because there is no graphics driver currently implemented in HelenOS, it is reasonable to create a rather simple variant of the driver that would not use any advanced vendor-dependent features but that would only use the VESA BIOS extensions to switch the resolution. The implemented driver shall support following features: Detect possible resolutions and inform the graphics stack about them. Provide an user interface to change the resolution, color depth and possibly refresh rate. Implement the graphics mode-setting. Detection of a second monitor would be a very nice feature.

Since the protected-mode interface of the VESA BIOS is rather complicated and generally unreliable. the preferred way is to run the real-mode VESA BIOS code in a sandbox environment (e.g. using an x86 emulator). This is a common approach in the majority of operating systems and provides the best degree of compatibility.
What Gains and Benefits will this bring?
The current VESA BIOS mode setting code in HelenOS is a very minimalistic and involves a boot-time jump to real mode and a kernel driver. Creating a full-fledged graphics driver in user space would allow to remove the kernel driver and reduce the number of relict drivers still present in kernel. It is expected that the user space driver would provide extra features (run-time detection of possible resolution, etc.) that are not available in the kernel driver and that would improve the experience when using HelenOS GUI.
Required skills
A successful applicant will have good skills of programming in the C language and the ability to survive in a non-standard non-POSIX environment. Previous experience with driver or graphics stack implementation would be beneficial.
Possible mentors
HelenOS Core Team, Martin Decky

Change History (8)

comment:1 by Martin Decky, 11 years ago

Component: helenos/unspecifiedhelenos/gui

comment:2 by Martin Decky, 11 years ago

Description: modified (diff)

comment:3 by Jiri Svoboda, 10 years ago

How do you propose to run the VBE code from HelenOS?

in reply to:  3 comment:4 by Martin Decky, 10 years ago

How do you propose to run the VBE code from HelenOS?

Using an ia32 emulator. Wolf Ramovsky has already done initial porting of libx86emu, including a working vbeinfo utility (see

Of course, you can also use V86 mode on ia32 and VT-d or AMD-V on amd64 (with recent enough hardware that actually supports real-mode virtualization) for that purpose. But this might be an overkill since the few VBE calls that are actually needed are not performance-critical.

comment:5 by Vojtech Horky, 10 years ago

Keywords: gsoc14 added

comment:6 by Martin Decky, 10 years ago

Description: modified (diff)

comment:7 by Jakub Jermář, 9 years ago

Keywords: gsoc15 added

comment:8 by Jiri Svoboda, 4 years ago

Keywords: ui added
Note: See TracTickets for help on using tickets.