RTEMS
5.1
|
FB driver for graphic hardware compatible with VESA Bios Extension Real mode interface utilized Tested on real HW. More...
#include <inttypes.h>
#include <bsp.h>
#include <bsp/fb_default_mode.h>
#include <bsp/fb_vesa.h>
#include <bsp/realmode_int.h>
#include <pthread.h>
#include <rtems/libio.h>
#include <rtems/fb.h>
#include <rtems/framebuffer.h>
#include <rtems/score/atomic.h>
#include <stdlib.h>
Data Structures | |
struct | Mode_params |
Basic graphic's mode parameters. More... | |
Macros | |
#define | FB_VESA_NAME "FB_VESA_RM" |
#define | MAX_NO_OF_SORTED_MODES 100 |
Functions | |
void | vesa_realmode_bootup_init (void) |
Initializes VBE framebuffer during bootup. More... | |
uint32_t | VBE_controller_information (VBE_vbe_info_block *info_block, uint16_t queried_VBE_Version) |
Returns information about graphic's controller in the info_block structure. More... | |
uint32_t | VBE_mode_information (VBE_mode_info_block *info_block, uint16_t mode_number) |
Fills structure info_block with informations about selected mode in mode_number variable. More... | |
uint32_t | VBE_set_mode (uint16_t mode_number, VBE_CRTC_info_block *info_block) |
Sets graphics mode selected. If mode has refreshRateCtrl bit set, than the info_block must be filled accordingly. More... | |
uint32_t | VBE_current_mode (uint16_t *mode_number) |
Get currently set mode number. More... | |
uint32_t | VBE_report_DDC_capabilities (uint16_t controller_unit_number, uint8_t *seconds_to_transfer_EDID_block, uint8_t *DDC_level_supported) |
Gets information about display data channel implemented in the graphic's controller. More... | |
uint32_t | VBE_read_EDID (uint16_t controller_unit_number, uint16_t EDID_block_number, EDID_edid1 *buffer) |
Reads selected EDID block from display attached to controller's interface. More... | |
rtems_device_driver | frame_buffer_initialize (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Frame Buffer Initialization Entry Point. More... | |
rtems_device_driver | frame_buffer_open (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Frame Buffer Open Entry Point. More... | |
rtems_device_driver | frame_buffer_close (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Frame Buffer Close Entry Point. More... | |
rtems_device_driver | frame_buffer_read (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Frame Buffer Read Entry Point. More... | |
rtems_device_driver | frame_buffer_write (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Frame Buffer Write Entry Point. More... | |
rtems_device_driver | frame_buffer_control (rtems_device_major_number major, rtems_device_minor_number minor, void *arg) |
Frame Buffer IO Control Entry Point. More... | |
Variables | |
const char *const | rtems_fb_default_mode |
Allows to enable initialization of VESA real mode driver from an application by setting the value of this variable to non null value in user's module. The value of this variable will be then updated when linked with application's object. More... | |
FB driver for graphic hardware compatible with VESA Bios Extension Real mode interface utilized Tested on real HW.
Public sources related:
Hardware is completely initialized upon boot of the system. Therefore there is no way to change graphics mode later.
Interrupt 0x10 is used for entering graphics BIOS.
Driver reads parameter from multiboot command line to setup video: "--video=<resX>x<resY>[-<bpp>]" "--video=auto" - try EDID to find mode that fits the display attached best "--video=none" / "--video=off" - do not initialize the driver If cmdline parameter is not specified the rtems_fb_default_mode variable content is tested (see doc below). Command line option has higher priority. rtems_fb_default_mode is probed only if cmdline "--video=" is not specified at all.
If neither of the above options is specified the driver is not initialized.
rtems_device_driver frame_buffer_close | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Frame Buffer Close Entry Point.
This method closes a specific device supported by the frame buffer device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
rtems_device_driver frame_buffer_control | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Frame Buffer IO Control Entry Point.
This method performs an IO Control operation on a specific device supported by the frame buffer device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
rtems_device_driver frame_buffer_initialize | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Frame Buffer Initialization Entry Point.
This method initializes the frame buffer device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
rtems_device_driver frame_buffer_open | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Frame Buffer Open Entry Point.
This method opens a specific device supported by the frame buffer device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
rtems_device_driver frame_buffer_read | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Frame Buffer Read Entry Point.
This method reads from a specific device supported by the frame buffer device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
rtems_device_driver frame_buffer_write | ( | rtems_device_major_number | major, |
rtems_device_minor_number | minor, | ||
void * | arg | ||
) |
Frame Buffer Write Entry Point.
This method writes to a specific device supported by the frame buffer device driver.
[in] | major | is the device driver major number |
[in] | minor | is the device driver minor number |
[in] | arg | is the parameters to this call |
uint32_t VBE_controller_information | ( | VBE_vbe_info_block * | info_block, |
uint16_t | queried_VBE_Version | ||
) |
Returns information about graphic's controller in the info_block
structure.
[out] | info_block | pointer to the struct to be filled with controller information |
[in] | queried_VBE_Version | if >0x200 then video bios is asked to fill in parameters which appeared with second version of VBE. |
ax | register content as defined in VBE RETURN STATUS paragraph |
-1 | error calling graphical bios |
uint32_t VBE_current_mode | ( | uint16_t * | mode_number | ) |
Get currently set mode number.
[out] | mode_number | variable to be filled with current mode number |
ax | register content as defined in VBE RETURN STATUS paragraph |
-1 | error calling graphical bios |
uint32_t VBE_mode_information | ( | VBE_mode_info_block * | info_block, |
uint16_t | mode_number | ||
) |
Fills structure info_block
with informations about selected mode in mode_number
variable.
[out] | info_block | pointer to the struct to be filled with mode information |
[in] | mode_number | detailes of this mode to be filled |
ax | register content as defined in VBE RETURN STATUS paragraph |
-1 | error calling graphical bios |
uint32_t VBE_read_EDID | ( | uint16_t | controller_unit_number, |
uint16_t | EDID_block_number, | ||
EDID_edid1 * | buffer | ||
) |
Reads selected EDID block from display attached to controller's interface.
[in] | controller_unit_number | |
[in] | EDID_block_number | block no. to be read from the display |
[out] | buffer | place to store block fetched from the display |
ax | register content as defined in VBE RETURN STATUS paragraph |
-1 | error calling graphical bios |
uint32_t VBE_report_DDC_capabilities | ( | uint16_t | controller_unit_number, |
uint8_t * | seconds_to_transfer_EDID_block, | ||
uint8_t * | DDC_level_supported | ||
) |
Gets information about display data channel implemented in the graphic's controller.
[in] | controller_unit_number | |
[out] | seconds_to_transfer_EDID_block | approximate time to transfer one EDID block rounded up to seconds |
[out] | DDC_level_supported | contains DDC version supported and screen blanking state during transfer |
ax | register content as defined in VBE RETURN STATUS paragraph |
-1 | error calling graphical bios |
uint32_t VBE_set_mode | ( | uint16_t | mode_number, |
VBE_CRTC_info_block * | info_block | ||
) |
Sets graphics mode selected. If mode has refreshRateCtrl bit set, than the info_block
must be filled accordingly.
[in] | mode_number | number of mode to be set |
[in] | info_block | pointer to struct containing refresh rate control info |
ax | register content as defined in VBE RETURN STATUS paragraph |
-1 | error calling graphical bios |
void vesa_realmode_bootup_init | ( | void | ) |
Initializes VBE framebuffer during bootup.
utilizes switches to real mode interrupts and therefore must be called during bootup before tick is set up and real-time interrupt vectors utilized
const char* const rtems_fb_default_mode |
Allows to enable initialization of VESA real mode driver from an application by setting the value of this variable to non null value in user's module. The value of this variable will be then updated when linked with application's object.
Further the value should point to string in the following format: "<resX>x<resY>[-<bpp>]" - e.g. "1024x768-32" "auto" - try EDID to find mode that fits the display attached best "none" / "off" - do not initialize the driver the given parameters are used if applicable.
Command line argument "--video=" has priority over this string.