On 09/11/12 01:35, Hiroshi Miura wrote:
Hi,
On 2012.09.10 15:57, Gerd Hoffmann wrote:
On 09/09/12 16:00, Hiroshi Miura wrote:
Generate EDID according to preferred resolution from VBE_DISPI interface. +void bochs_init_preferred_resolution(u16 max_xres, u16 max_yres) {
- if (max_xres >= 1920 && max_yres >= 1200){
max_xres = 1920; max_yres = 1200;
- } else if (max_xres >= 1600 && max_yres >= 1200){
max_xres = 1600; max_yres = 1200;
- } else if (max_xres >= 1280 && max_yres >= 1024){
max_xres = 1280; max_yres = 1024;
- } else {
max_xres = 1152; max_yres = 864;
- }
- SET_VGA(prefered_xres,max_xres);
- SET_VGA(prefered_yres,max_yres);
+} u16 max_xres = dispi_read(VBE_DISPI_INDEX_XRES);
- u16 max_yres = dispi_read(VBE_DISPI_INDEX_YRES);
- bochs_init_preferred_resolution(max_xres, max_yres);
So how this is supposed to work? qemu gives you fixed max_xres and max_yres values, you'll never see anything below 1600x1200 ...
After implementing this in Seabios/vgabios, qemu have a option to provide a preferred resolution (from several alternatives) thru API.
I'd like to propose qemu to implement max_xres/max_yres generating from user configuration and/or real-display resolutions.
It looks chicken-egg thing, which one should implement first? I think vgabios is good for implement first and qemu next.
Usual way is to implement both and send patches for both seabios & qemu to the seabios & qemu lists for review.
Once all issues are sorted the usual process is to merge the qemu patches first, then make seabios use it.
I know there was discussion adding API interface to provide edid data block from qemu. and qemu can handle such as /etc/qemu-fw/some-binary.bin for configuration.
This is alternative proposal for not-changing bochs API and help qemu to select resolution in easy way.
I don't think there is a way around changing the bochs api. Using the maximum resolution values instead of adding new preferred resolution values has bad side effects.
cheers, Gerd