History log of /haiku/headers/private/graphics/vesa/vesa_info.h
Revision Date Author Comments
# 6a175a5d 29-Oct-2021 Adrien Destugues <pulkomandy@pulkomandy.tk>

vesa: report BIOS manufacturer (visible in screen preferences)

Get the OEM string from the VESA info block (and also get the memory
size from there while we are at it). If the string is empty, use the
BIOS type (identified in other ways) to still report something.

Change-Id: I8cbd75d19f624a43db05e82d1e1b2a536cc418b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4625
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 1005a276 19-Oct-2021 Adrien Destugues <pulkomandy@pulkomandy.tk>

vesa: live BIOS patching for Intel video devices

The VESA standard does not define any way for software to set a custom
video mode, which means normally we would be constrained to whichever
modes the video card manufacturer decided to provide. However, since we
run the BIOS in an emulated environment, it is possible (and even quite
easy) to patch it and inject any video mode we want, provided we know
the format to use and where to put the info in.

This approach was used in the NewOS VESA driver, as well as in
915resolution (a tool that predates the availability of native drivers
for Linux for Intel videocards). Later on it was also used in Chameleon
and Clover, bootloaders that are used for hackintoshes (running MacOS on
unsupported hardware).

This commit implements full support for Intel cards only, AMD and NVidia
will be added later (but there is preliminary code to detect them)

Change-Id: I2c528ba18b3863f486da694860a10761efcbfb3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4624
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# bb693d77 14-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added VESA capabilities field to the kernel args.
* The vesa driver no longer uses VGA programming if the chip does not support
VGA compatibility.
* The VESA driver now tries to set the DAC to 8 bits per color gun.
* In VESA modes, the driver no longer tries to use VGA programming; introduced
the new vesa_set_indexed_colors() that is now used for palette programming.
This should fix wrong colors of 8 bit BWindowScreen users with VESA on real
hardware (emulators usually didn't mind either way).
* Note that the app_server needs to maintain a palette per 8 bit screen, as
right now, the colors are garbled after a workspace switch. Stefano, are you
looking into that already?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32347 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bfd4c59b 05-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Added DPMS support to the VESA driver, in case the hardware/BIOS supports it.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30974 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d16ddc57 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* The boot loader now passes on its EDID info to the kernel, and that will
be put into a boot_item in frame_buffer_console_init().
* The VESA driver now supports gettings the EDID information as well; this
is necessary now, since the app_server no longer takes over the mode the
boot loader had chosen.
* Note, we might want to do this via vm86 instead in the future, and remove
the kernel part again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25786 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9f161845 28-May-2008 Axel Dörfler <axeld@pinc-software.de>

Patch by Jan Klötzke with minor changes by myself:
* Use vm86 mode to call the VESA BIOS to do the actual mode switching by
providing an ioctl in the vesa driver.
* Fix vm86.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25680 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e549b218 30-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

This should have been part of r24675. Not sure what happened as I specified
the path on the commit line.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24676 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0c6f7795 19-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

* Moved VGA planar mode blitting into the VESA kernel driver.
* In grayscale mode, the AccelerantHWInterface now sets the palette correctly.
* HWInterface now has a fVGADevice set by AccelerantHWInterface which will be used
to talk to the VESA driver.
* Completed planar blitting for all 4 planes; we now have a perfect 16 color
grayscale mode when you choose "Standard VGA mode" in the boot loader with
an unsupported graphics card (such as in Qemu).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19567 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e5b4782b 26-May-2005 Axel Dörfler <axeld@pinc-software.de>

Made some necessary enhancements to class Screen; the app_server also
has to care about refresh rates. Also changed Screen::GetMode() (formerly
Resolution()) to return all interesting values, so that hopefully no one
will call it anymore like RootLayer::SetScreens() did.
Greatly improved the horrible RootLayer::SetScreens().
The app_server is now able to deal with failing HWInterface::SetMode() calls;
in this case, it will fall back to the hardware's current mode. This now
also works correctly in combination with the vesa driver, so that you don't
have to compile the app_server with the same resolution you boot in anymore.
SetMode() now always returns if it succeeded or not.
Renamed RootLayer::fScreenXYResolution to fScreenWidth/Height respectively.
Removed the useless DisplayDriver::DisplayMode() method.
Added B_GET_DISPLAY_MODE to the required accelerant hooks.
Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 93ee2104 08-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Added very basic VESA driver. Will be improved in the future (right now
it doesn't really do anything, it just passes the initial frame buffer
on to the app_server).
While it seems to work on real hardware (if you set the video mode to
640x480x32, app_server restriction), under Bochs, the app_server crashes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12273 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bb693d77643c7bc4b2b10847007a94af5e84b953 14-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Added VESA capabilities field to the kernel args.
* The vesa driver no longer uses VGA programming if the chip does not support
VGA compatibility.
* The VESA driver now tries to set the DAC to 8 bits per color gun.
* In VESA modes, the driver no longer tries to use VGA programming; introduced
the new vesa_set_indexed_colors() that is now used for palette programming.
This should fix wrong colors of 8 bit BWindowScreen users with VESA on real
hardware (emulators usually didn't mind either way).
* Note that the app_server needs to maintain a palette per 8 bit screen, as
right now, the colors are garbled after a workspace switch. Stefano, are you
looking into that already?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32347 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bfd4c59b639308dc5bc06f8273c4bb0c5e4e4598 05-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Added DPMS support to the VESA driver, in case the hardware/BIOS supports it.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30974 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d16ddc579cc378b230e7782b82e6007063d1442d 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* The boot loader now passes on its EDID info to the kernel, and that will
be put into a boot_item in frame_buffer_console_init().
* The VESA driver now supports gettings the EDID information as well; this
is necessary now, since the app_server no longer takes over the mode the
boot loader had chosen.
* Note, we might want to do this via vm86 instead in the future, and remove
the kernel part again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25786 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9f16184577a3506b927dbc5cfff47ab03500deda 28-May-2008 Axel Dörfler <axeld@pinc-software.de>

Patch by Jan Klötzke with minor changes by myself:
* Use vm86 mode to call the VESA BIOS to do the actual mode switching by
providing an ioctl in the vesa driver.
* Fix vm86.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25680 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e549b218afc69f390966743f635650f023b3965b 30-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

This should have been part of r24675. Not sure what happened as I specified
the path on the commit line.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24676 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0c6f77951ed2366737266cae1bf0c2f98842e6f5 19-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

* Moved VGA planar mode blitting into the VESA kernel driver.
* In grayscale mode, the AccelerantHWInterface now sets the palette correctly.
* HWInterface now has a fVGADevice set by AccelerantHWInterface which will be used
to talk to the VESA driver.
* Completed planar blitting for all 4 planes; we now have a perfect 16 color
grayscale mode when you choose "Standard VGA mode" in the boot loader with
an unsupported graphics card (such as in Qemu).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19567 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e5b4782b4ee7663decea60a4385fce3122c2b16d 26-May-2005 Axel Dörfler <axeld@pinc-software.de>

Made some necessary enhancements to class Screen; the app_server also
has to care about refresh rates. Also changed Screen::GetMode() (formerly
Resolution()) to return all interesting values, so that hopefully no one
will call it anymore like RootLayer::SetScreens() did.
Greatly improved the horrible RootLayer::SetScreens().
The app_server is now able to deal with failing HWInterface::SetMode() calls;
in this case, it will fall back to the hardware's current mode. This now
also works correctly in combination with the vesa driver, so that you don't
have to compile the app_server with the same resolution you boot in anymore.
SetMode() now always returns if it succeeded or not.
Renamed RootLayer::fScreenXYResolution to fScreenWidth/Height respectively.
Removed the useless DisplayDriver::DisplayMode() method.
Added B_GET_DISPLAY_MODE to the required accelerant hooks.
Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 93ee21046d225f4f58eeeade87a937b8c10da6f1 08-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Added very basic VESA driver. Will be improved in the future (right now
it doesn't really do anything, it just passes the initial frame buffer
on to the app_server).
While it seems to work on real hardware (if you set the video mode to
640x480x32, app_server restriction), under Bochs, the app_server crashes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12273 a95241bf-73f2-0310-859d-f6bbb57e9c96