From 3a4ec45eec71c85184f3f564d1c7fdacdde9c2b9 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Fri, 10 Apr 2020 18:21:14 +0200 Subject: [PATCH] Fixed EDID bug --- qloader2.bin | Bin 32768 -> 32768 bytes src/drivers/vbe.c | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qloader2.bin b/qloader2.bin index 7269a98d8426710bdca080a47eda5ff8dedcb42f..33d41e78892bcbdac063f697300e8ba5e9840fe6 100644 GIT binary patch delta 6324 zcmbVQ4OmoVzCUxAfdL0*lmSr&8T5##Xke&VsF(<-sDr?O;AdB7k7Q;B*)?sjamsOo z=Jr}^Wt+tAEpK@rUHm}Xo1+j&si5oiviU`9fqp?C*aDlzO`L+-{{ZqJpoe;CHLlY7P%ejfk~#5i0JPK8+lgK9Ruk8dA}NZ9 zVXC9i;JBkMuXo4TIiremp3`qU3psHDgi6h&u)pJ;EL)}Z0r%~^#w&KL(zIZXb2Y)b zm`T#j8P#wmo#Wmo5wEL^mpa>?C#GC7(&zU+^sS{Vti-kFI6 zEtb4OX&jYO8Aaz9(3&(P0h%%~yri1rSM`O1P4=QF&GCL>=e^uq@pXSpffUqYJ^Q@B z*?vXfxF39p>-AJxp9P8Z8lQPE?@AG*Q9=IU`K8errG)phqtg$p|7CRSwfMIi2@B*1Qc}`Q+*y(B-{?2)O%I zStekX1;lq(uza1XzD~xdJjxnI4$NN*e>G}U6YE9f3^emB(hVI=59pK0?iVHtCyymb ztMv8|GG=zQZD=5gl7-3;en=s`9*EUECUIKuH=(FoW3}4IDiVk4UIC^IAQAQ?{woWN zdo;Eg3Y&6-fK54x{q-MSQy=+OUHPQ!x)pq>{M_MlwQOGYNxe@64KJxso& zzDcu~T^?#vPsZ4@-1xofM^P#kJZunuwYGNnurn(DQZ17c#`#~7Y}WAX#1F7fyXrAX zECp666MI*qdJu=@n;{4mrIV_at=TGmUCWLPUttV~0*#0C%$rz`n1I09lo1aHE5p?k z25kL^(y^U1c=^B_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xKN18=M ztq3!DsnJBe95y(J{({Iyno{{5_PYN7ew82F?LQ*liiF)-Tmy7P(MwDTXO>^SL~-Mt zl@xpr+;aF3C8Sjj1{?d%*}1NT5ctla4PUtj-dEm&zw!F)fInh|I9qGA5v)R=WVil!OIgOBJoE4*Ls@-@K*<+@PLxjrHNF-CEW@ zIgTy;m7D3)KgauX!FsIb|InIzvJrhS=lhKRlkUIDo`T*+C&!KIX=ObFJh!2pL`&O% zMU2)90->^(g6``M@F z;qlylMfn&)E;A&YZwt|4*K&1eJHSsPK3kj-6P$vbNhVsr&1GNCd|Aj3Iqjbv(&f)* zg|z$g#q5u>Ugg`{*r?er@>vI2>+G>?(G0!Kd{9xwkrn*N@))#I@bD(1{)m@_wgSBA zUY3e0!gwoqBl_@`W4sr<6d&&Zp5qQ&w6 zIUj9l2YWhu6u+i}y_=mpU?Y$*gv8H;MnOH_!7gMc@LM}rNKOJ@*TKf(v7>`oa}olY zfX6GYx2&u?N6)|A!LH{N>!MC5$|tOLP89p?v{S4ag6GqK?=T~h?nH!Md6tNUg=5p*8S1^`jf2n{sdhE5ck1;6w_tK@Ow|Pgv=b> z*I;(B)Y(zYk@>35a9UAaq}r^S})~|WEpuAb<#OSNmfxW lg8jsAzh3nPAfeX8YX3aimX|1T!O$4meK diff --git a/src/drivers/vbe.c b/src/drivers/vbe.c index cd24ab9d..e9fb0e82 100644 --- a/src/drivers/vbe.c +++ b/src/drivers/vbe.c @@ -98,7 +98,7 @@ static int get_edid_info(struct edid_info_struct *buf) { r.edi = (uint32_t)buf; rm_int(0x10, &r, &r); - if ((r.eax & 0x00ff) == 0x4f) + if ((r.eax & 0x00ff) != 0x4f) return -1; if ((r.eax & 0xff00) != 0) return -1; @@ -126,11 +126,12 @@ int init_vbe(uint64_t *framebuffer, uint16_t *pitch, uint16_t *target_width, uin *target_width = 1024; *target_height = 768; } else { - print("vbe: EDID detected screen resolution of %ux%u\n"); *target_width = (int)edid_info.det_timing_desc1[2]; *target_width += ((int)edid_info.det_timing_desc1[4] & 0xf0) << 4; *target_height = (int)edid_info.det_timing_desc1[5]; *target_height += ((int)edid_info.det_timing_desc1[7] & 0xf0) << 4; + print("vbe: EDID detected screen resolution of %ux%u\n", + *target_width, *target_height); } } else { print("vbe: Requested resolution of %ux%ux%u\n",