<div dir="ltr"><div>A little off topic thing: isn't the default resolution supposed to be 1024x768? This is the Microsoft regulation which all my physical devices seem to follow:<br></div><div><br></div><div><a href="https://docs.microsoft.com/en-us/windows-hardware/test/hlk/testref/6afc8979-df62-4d86-8f6a-99f05bbdc7f3">https://docs.microsoft.com/en-us/windows-hardware/test/hlk/testref/6afc8979-df62-4d86-8f6a-99f05bbdc7f3</a></div><div><br></div><div>And when the user provides an EDID one should parse it and set the default resolution to match it. But that's a less important feature.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 21, 2020 at 9:03 PM Laszlo Ersek <<a href="mailto:lersek@redhat.com">lersek@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 04/20/20 16:13, Gerd Hoffmann wrote:<br>
>   Hi,<br>
><br>
>> So I would say that the symptom you see is a QEMU v4.1.0 regression.<br>
>> The QemuRamfbGraphicsOutputSetMode() function in the OVMF ramfb<br>
>> driver certainly needs the QemuFwCfgWriteBytes() call to work, for<br>
>> changing the resolution.<br>
><br>
> Oh?  QemuRamfbGraphicsOutputSetMode() can be called multiple times?<br>
> How does that happen?<br>
<br>
QemuRamfbGraphicsOutputSetMode() is the "SetMode" member function of the<br>
EFI_GRAPHICS_OUTPUT_PROTOCOL instance that QemuRamfbDxe produces.<br>
<br>
This is a standard protocol; UEFI drivers and applications are free to<br>
locate it and to use it.<br>
<br>
(1) When you launch OVMF, you get the splash screen in a particular<br>
resolution. This resolution:<br>
- is configured by OvmfPkg/PlatformDxe,<br>
- is inherited by an OS boot loader,<br>
- is reconfigurable with OvmfPkg/PlatformDxe, for the next boot, via the<br>
  Setup TUI,<br>
- defaults to 800x600 (taking effect when no particular choice is<br>
  configured).<br>
<br>
(2) UiApp -- the Setup TUI itself -- uses its own resolution. Under<br>
OVMF, this resolution is fixed 640x480. When UiApp is entered,<br>
ultimately a call is made to QemuRamfbGraphicsOutputSetMode() -- i.e., a<br>
GOP.SetMode() member function -- for setting this 640x480 resolution.<br>
<br>
Using the following command:<br>
<br>
  qemu-system-x86_64 \<br>
    -nodefaults \<br>
    -boot menu=on,splash-time=5000 \<br>
    -enable-kvm \<br>
    -device ramfb \<br>
    -drive if=pflash,readonly,format=raw,file=$PREFIX/share/qemu/edk2-x86_64-code.fd \<br>
    -drive if=pflash,snapshot,format=raw,file=$PREFIX/share/qemu/edk2-i386-vars.fd \<br>
    -debugcon file:ovmf.log \<br>
    -global isa-debugcon.iobase=0x402<br>
<br>
when you first see the progress bar, the graphical resolution (1) is<br>
800x600. Accordingly, QEMU prints to stderr:<br>
<br>
> ramfb_fw_cfg_write: 800x600 @ 0x6702000<br>
<br>
Once you hit ESC to interrupt the progress bar and to enter the Setup<br>
TUI, UiApp switches to resolution (2), 640x480. QEMU prints:<br>
<br>
> ramfb_fw_cfg_write: 640x480 @ 0x6702000<br>
> ramfb_fw_cfg_write: resolution locked, change rejected<br>
<br>
And you get garbage in the Setup window.<br>
<br>
Thanks,<br>
Laszlo<br>
<br>
</blockquote></div>

<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>
Groups.io Links:<p>


You receive all messages sent to this group.



<p>

<a target="_blank" href="https://edk2.groups.io/g/devel/message/57801">View/Reply Online (#57801)</a> |


  


|


  
    <a target="_blank" href="https://groups.io/mt/73011122/1813853">Mute This Topic</a>
  

| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>



<br>

<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |

<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>

 [edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>