From 7396369ef190a049b3a779a54edd76ff118f3c28 Mon Sep 17 00:00:00 2001 From: Mystery Man Date: Fri, 21 Nov 2003 12:53:39 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'MDK92-AMD64'. --- tools/ddcprobe/vbe.h | 76 +++++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 49 deletions(-) (limited to 'tools/ddcprobe/vbe.h') diff --git a/tools/ddcprobe/vbe.h b/tools/ddcprobe/vbe.h index 338d3bd88..32ccc7902 100644 --- a/tools/ddcprobe/vbe.h +++ b/tools/ddcprobe/vbe.h @@ -3,49 +3,41 @@ #ident "$Id$" #include +#if defined(__x86_64__) +#define KERNEL_BOOT_INFO 1 +#endif +#define BOOT_VBE_INFO "/proc/BOOT/vbe" +#define BOOT_EDID_INFO "/proc/BOOT/edid" +#define EDID_INVALID 0x13 +#define EDID_BLOCK_SIZE 128 +#define VBE_BLOCK_SIZE 512 + +union vbe_addr { + struct { + u_int16_t ofs; + u_int16_t seg; + } addr; + u_int32_t base; +#if defined(__i386__) + char *ptr; +#endif +}; + +typedef union vbe_addr vbe_addr_t; + /* Record returned by int 0x10, function 0x4f, subfunction 0x00. */ struct vbe_info { unsigned char signature[4]; unsigned char version[2]; - union { - struct { - u_int16_t ofs; - u_int16_t seg; - } addr; - const char *string; - } oem_name; + vbe_addr_t oem_name; u_int32_t capabilities; - union { - struct { - u_int16_t ofs; - u_int16_t seg; - } addr; - u_int16_t *list; - } mode_list; + vbe_addr_t mode_list; u_int16_t memory_size; /* VESA 3.0+ */ u_int16_t vbe_revision; - union { - struct { - u_int16_t ofs; - u_int16_t seg; - } addr; - const char *string; - } vendor_name; - union { - struct { - u_int16_t ofs; - u_int16_t seg; - } addr; - const char *string; - } product_name; - union { - struct { - u_int16_t ofs; - u_int16_t seg; - } addr; - const char *string; - } product_revision; + vbe_addr_t vendor_name; + vbe_addr_t product_name; + vbe_addr_t product_revision; char reserved1[222]; char reserved2[256]; } __attribute__ ((packed)); @@ -284,23 +276,9 @@ struct vbe_edid1_info { /* Get VESA information. */ struct vbe_info *vbe_get_vbe_info(); -/* Get information about a particular video mode, bitwise or with - VBE_LINEAR_FRAMEBUFFER to check if LFB version is supported. */ -struct vbe_mode_info *vbe_get_mode_info(u_int16_t mode); - /* Check if EDID reads are supported, and do them. */ -int vbe_get_edid_supported(); struct vbe_edid1_info *vbe_get_edid_info(); -/* Get the current video mode, -1 on error. */ -int32_t vbe_get_mode(); -/* Set a new video mode, bitwise or with VBE_LINEAR_FRAMEBUFFER. */ -void vbe_set_mode(u_int16_t mode); - -/* Save/restore the SVGA state. Call free() on the state record when done. */ -const void *vbe_save_svga_state(); -void vbe_restore_svga_state(const void *state); - /* Get the ranges of values suitable for the attached monitor. */ void vbe_get_edid_ranges(struct vbe_edid1_info *edid, unsigned char *hmin, unsigned char *hmax, -- cgit v1.2.1