Lines Matching full:edid
8 * The EDID Parser is a conglomeration from the following sources:
33 #include <video/edid.h>
36 #include "../edid.h"
39 * EDID parser
42 #undef DEBUG /* define this for verbose EDID parsing output */
145 static int check_edid(unsigned char *edid) in check_edid() argument
147 unsigned char *block = edid + ID_MANUFACTURER_NAME, manufacturer[4]; in check_edid()
170 if (edid[i] != edid_v1_header[i]) { in check_edid()
177 b = edid + EDID_STRUCT_DISPLAY; in check_edid()
184 b = edid + DETAILED_TIMING_DESCRIPTIONS_START; in check_edid()
200 printk("fbmon: The EDID Block of " in check_edid()
207 static void fix_edid(unsigned char *edid, int fix) in fix_edid() argument
215 memcpy(edid, edid_v1_header, 8); in fix_edid()
219 b = edid + EDID_STRUCT_DISPLAY; in fix_edid()
221 edid[127] += 0x80; in fix_edid()
225 b = edid + DETAILED_TIMING_DESCRIPTIONS_START; in fix_edid()
249 csum += edid[i]; in fix_edid()
251 edid[127] = 256 - csum; in fix_edid()
256 static int edid_checksum(unsigned char *edid) in edid_checksum() argument
259 int i, err = 0, fix = check_edid(edid); in edid_checksum()
262 fix_edid(edid, fix); in edid_checksum()
265 csum += edid[i]; in edid_checksum()
266 all_null |= edid[i]; in edid_checksum()
277 static int edid_check_header(unsigned char *edid) in edid_check_header() argument
279 int i, err = 1, fix = check_edid(edid); in edid_check_header()
282 fix_edid(edid, fix); in edid_check_header()
285 if (edid[i] != edid_v1_header[i]) in edid_check_header()
521 /* in EDID 1.3 the meaning of 0 changed to 16:10 (prior 1:1) */ in get_std_timing()
606 * @edid: EDID data
613 * This function builds a mode database using the contents of the EDID
616 static struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize, in fb_create_modedb() argument
628 if (edid == NULL || !edid_checksum(edid) || in fb_create_modedb()
629 !edid_check_header(edid)) { in fb_create_modedb()
634 ver = edid[EDID_STRUCT_VERSION]; in fb_create_modedb()
635 rev = edid[EDID_STRUCT_REVISION]; in fb_create_modedb()
640 block = edid + DETAILED_TIMING_DESCRIPTIONS_START; in fb_create_modedb()
653 block = edid + ESTABLISHED_TIMING_1; in fb_create_modedb()
657 block = edid + STD_TIMING_DESCRIPTIONS_START; in fb_create_modedb()
661 block = edid + DETAILED_TIMING_DESCRIPTIONS_START; in fb_create_modedb()
668 /* Yikes, EDID data is totally useless */ in fb_create_modedb()
695 static int fb_get_monitor_limits(unsigned char *edid, struct fb_monspecs *specs) in fb_get_monitor_limits() argument
700 block = edid + DETAILED_TIMING_DESCRIPTIONS_START; in fb_get_monitor_limits()
713 DPRINTK("From EDID\n"); in fb_get_monitor_limits()
724 modes = fb_create_modedb(edid, &num_modes, specs); in fb_get_monitor_limits()
776 static void get_monspecs(unsigned char *edid, struct fb_monspecs *specs) in get_monspecs() argument
780 block = edid + EDID_STRUCT_DISPLAY; in get_monspecs()
782 fb_get_monitor_limits(edid, specs); in get_monspecs()
894 int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var) in fb_parse_edid() argument
899 if (edid == NULL || var == NULL) in fb_parse_edid()
902 if (!(edid_checksum(edid))) in fb_parse_edid()
905 if (!(edid_check_header(edid))) in fb_parse_edid()
908 block = edid + DETAILED_TIMING_DESCRIPTIONS_START; in fb_parse_edid()
937 void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs) in fb_edid_to_monspecs() argument
942 if (edid == NULL) in fb_edid_to_monspecs()
945 if (!(edid_checksum(edid))) in fb_edid_to_monspecs()
948 if (!(edid_check_header(edid))) in fb_edid_to_monspecs()
953 specs->version = edid[EDID_STRUCT_VERSION]; in fb_edid_to_monspecs()
954 specs->revision = edid[EDID_STRUCT_REVISION]; in fb_edid_to_monspecs()
957 DPRINTK("Display Information (EDID)\n"); in fb_edid_to_monspecs()
959 DPRINTK(" EDID Version %d.%d\n", (int) specs->version, in fb_edid_to_monspecs()
962 parse_vendor_block(edid + ID_MANUFACTURER_NAME, specs); in fb_edid_to_monspecs()
964 block = edid + DETAILED_TIMING_DESCRIPTIONS_START; in fb_edid_to_monspecs()
979 get_monspecs(edid, specs); in fb_edid_to_monspecs()
981 specs->modedb = fb_create_modedb(edid, &specs->modedb_len, specs); in fb_edid_to_monspecs()
1404 int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var) in fb_parse_edid() argument
1408 void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs) in fb_edid_to_monspecs() argument
1487 * We need to ensure that the EDID block is only returned for
1495 unsigned char *edid = NULL; in fb_firmware_edid() local
1504 edid = edid_info.dummy; in fb_firmware_edid()
1506 return edid; in fb_firmware_edid()