Skip to content

Commit 1d4c9c2

Browse files
committed
VBE_RM: EDID: added and tested Established Timings I,II; tested Standard Timings
1 parent bf34233 commit 1d4c9c2

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

c/src/lib/libbsp/i386/pc386/console/fb_vesa_rm.c

+49-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,55 @@ static uint16_t findModeUsingEDID(struct modeParams *modeList, uint8_t listLengt
342342
in controller mode list */
343343
/* not implemented */
344344
/* use Established Timings */
345-
/* not implemented */
345+
if(edid.edid1.EST_1280x1024_75Hz) {
346+
EDIDmode.resX = 1280;
347+
EDIDmode.resY = 1024;
348+
EDIDmode.bpp = 0;
349+
if(findModeByResolution(modeList, listLength, &EDIDmode) != (uint16_t)-1)
350+
return EDIDmode.modeNumber;
351+
}
352+
if(edid.edid1.EST_1152x870_75Hz) {
353+
EDIDmode.resX = 1152;
354+
EDIDmode.resY = 870;
355+
EDIDmode.bpp = 0;
356+
if(findModeByResolution(modeList, listLength, &EDIDmode) != (uint16_t)-1)
357+
return EDIDmode.modeNumber;
358+
}
359+
if(edid.edid1.EST_1024x768_75Hz || edid.edid1.EST_1024x768_70Hz || edid.edid1.EST_1024x768_60Hz || edid.edid1.EST_1024x768_87Hz) {
360+
EDIDmode.resX = 1024;
361+
EDIDmode.resY = 768;
362+
EDIDmode.bpp = 0;
363+
if(findModeByResolution(modeList, listLength, &EDIDmode) != (uint16_t)-1)
364+
return EDIDmode.modeNumber;
365+
}
366+
if(edid.edid1.EST_832x624_75Hz) {
367+
EDIDmode.resX = 832;
368+
EDIDmode.resY = 624;
369+
EDIDmode.bpp = 0;
370+
if(findModeByResolution(modeList, listLength, &EDIDmode) != (uint16_t)-1)
371+
return EDIDmode.modeNumber;
372+
}
373+
if(edid.edid1.EST_800x600_60Hz || edid.edid1.EST_800x600_56Hz || edid.edid1.EST_800x600_75Hz || edid.edid1.EST_800x600_72Hz) {
374+
EDIDmode.resX = 800;
375+
EDIDmode.resY = 600;
376+
EDIDmode.bpp = 0;
377+
if(findModeByResolution(modeList, listLength, &EDIDmode) != (uint16_t)-1)
378+
return EDIDmode.modeNumber;
379+
}
380+
if(edid.edid1.EST_720x400_88Hz || edid.edid1.EST_720x400_70Hz) {
381+
EDIDmode.resX = 720;
382+
EDIDmode.resY = 400;
383+
EDIDmode.bpp = 0;
384+
if(findModeByResolution(modeList, listLength, &EDIDmode) != (uint16_t)-1)
385+
return EDIDmode.modeNumber;
386+
}
387+
if(edid.edid1.EST_640x480_75Hz || edid.edid1.EST_640x480_72Hz || edid.edid1.EST_640x480_67Hz || edid.edid1.EST_640x480_60Hz) {
388+
EDIDmode.resX = 640;
389+
EDIDmode.resY = 480;
390+
EDIDmode.bpp = 0;
391+
if(findModeByResolution(modeList, listLength, &EDIDmode) != (uint16_t)-1)
392+
return EDIDmode.modeNumber;
393+
}
346394
}
347395
else if(edid.edid2.Version == 2) { /* EDID version 2 */
348396
while(iterator<sizeof(struct edid2))

0 commit comments

Comments
 (0)