summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/include/fb_vesa.h
diff options
context:
space:
mode:
authorJan Dolezal <dolezj21@fel.cvut.cz>2014-11-20 15:00:33 +0100
committerGedare Bloom <gedare@rtems.org>2014-11-20 09:52:40 -0500
commit067da5c45dcd6c45a44630795dc702e32112c53c (patch)
tree1f42f32b958a654e11101b38fbfbae428b373ea5 /c/src/lib/libbsp/i386/pc386/include/fb_vesa.h
parenti386/pc386/include: header files for VESA BIOS EXTENSIONS and VESA Extended D... (diff)
downloadrtems-067da5c45dcd6c45a44630795dc702e32112c53c.tar.bz2
i386/pc386: VESA based frame buffer utilizing real mode interrupt 10h
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/i386/pc386/include/fb_vesa.h131
1 files changed, 131 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/include/fb_vesa.h b/c/src/lib/libbsp/i386/pc386/include/fb_vesa.h
new file mode 100644
index 0000000000..5638b50ca2
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/include/fb_vesa.h
@@ -0,0 +1,131 @@
+/**
+ * @file fb_vesa.h
+ *
+ * @ingroup i386_pc386
+ *
+ * @brief Definitioins for vesa based framebuffer drivers.
+ */
+
+/*
+ * Headers specific for framebuffer drivers utilizing VESA VBE.
+ *
+ * Copyright (C) 2014 Jan Doležal (dolezj21@fel.cvut.cz)
+ * CTU in Prague.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <bsp/vbe3.h>
+#include <edid.h>
+
+#ifndef _FB_VESA_H
+#define _FB_VESA_H
+
+#ifndef ASM /* ASM */
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/* ----- Prototypes ----- */
+
+/**
+ * Returns information about graphic's controller in the infoBlock structure.
+ *
+ * @param infoBlock pointer to the struct to be filled with
+ controller information
+ * @param queriedVBEVersion if >0x200 then video bios is asked to fill in
+ * parameters which appeared with second version
+ * of VBE.
+ * @retval register ax content as defined in VBE RETURN STATUS paragraph
+ * -1 error calling graphical bios
+ */
+uint32_t VBEControllerInformation (
+ struct VBE_VbeInfoBlock *infoBlock,
+ uint16_t queriedVBEVersion
+);
+
+/**
+ * Fills structure infoBlock with informations about selected mode in
+ * modeNumber variable.
+ *
+ * @param infoBlock pointer to the struct to be filled with mode information
+ * @param modeNumber detailes of this mode to be filled
+ * @retval register ax content as defined in VBE RETURN STATUS paragraph
+ * -1 error calling graphical bios
+ */
+uint32_t VBEModeInformation (
+ struct VBE_ModeInfoBlock *infoBlock,
+ uint16_t modeNumber
+);
+
+/**
+ * Sets graphics mode selected. If mode has refreshRateCtrl bit set, than the
+ * infoBlock must be filled accordingly.
+ *
+ * @param modeNumber number of mode to be set
+ * @param infoBlock pointer to struct containing refresh rate control info
+ * @retval register ax content as defined in VBE RETURN STATUS paragraph
+ * -1 error calling graphical bios
+ */
+uint32_t VBESetMode (
+ uint16_t modeNumber,
+ struct VBE_CRTCInfoBlock *infoBlock
+);
+
+/**
+ * Get currently set mode number.
+ *
+ * @param modeNumber variable to be filled with current mode number
+ * @retval register ax content as defined in VBE RETURN STATUS paragraph
+ * -1 error calling graphical bios
+ */
+uint32_t VBECurrentMode (
+ uint16_t *modeNumber
+);
+
+/**
+ * Gets information about display data channel implemented in the
+ * graphic's controller.
+ *
+ * @param controllerUnitNumber
+ * @param secondsToTransferEDIDBlock approximate time to transfer one EDID block
+ * rounded up to seconds
+ * @param DDCLevelSupported after call contains DDC version supported and
+ * screen blanking state during transfer
+ * @retval register ax content as defined in VBE RETURN STATUS paragraph
+ * -1 error calling graphical bios
+ */
+uint32_t VBEReportDDCCapabilities (
+ uint16_t controllerUnitNumber,
+ uint8_t *secondsToTransferEDIDBlock,
+ uint8_t *DDCLevelSupported
+);
+
+/**
+ * Reads selected EDID block from display attached to controller's interface.
+ *
+ * @param controllerUnitNumber
+ * @param EDIDBlockNumber block no. to be read from the display
+ * @param buffer place to store block fetched from the display
+ * @retval register ax content as defined in VBE RETURN STATUS paragraph
+ * -1 error calling graphical bios
+ */
+uint32_t VBEReadEDID (
+ uint16_t controllerUnitNumber,
+ uint16_t EDIDBlockNumber,
+ struct edid1 *buffer
+);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* ASM */
+
+#endif /* _FB_VESA_H */