mirror of https://github.com/xemu-project/xemu.git
hw/display/vga: Do not reset 'big_endian_fb' in vga_common_reset()
The 'pci-vga' device allow setting a 'big-endian-framebuffer' property since commit3c2784fc86
("vga: Expose framebuffer byteorder as a QOM property"). Similarly, the 'virtio-vga' device since commit8be61ce2ce
("virtio-vga: implement big-endian-framebuffer property"). Both call vga_common_reset() in their reset handler, respectively pci_secondary_vga_reset() and virtio_vga_base_reset_hold(), which reset 'big_endian_fb', overwritting the property. This is not correct: the hardware is expected to keep its configured endianness during resets. Move 'big_endian_fb' assignment from vga_common_reset() to vga_common_init() which is called once when the common VGA state is initialized. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Message-Id: <20241129101721.17836-2-philmd@linaro.org>
This commit is contained in:
parent
5311599cdc
commit
302075f85e
|
@ -1873,7 +1873,6 @@ void vga_common_reset(VGACommonState *s)
|
|||
s->cursor_start = 0;
|
||||
s->cursor_end = 0;
|
||||
s->cursor_offset = 0;
|
||||
s->big_endian_fb = s->default_endian_fb;
|
||||
memset(s->invalidated_y_table, '\0', sizeof(s->invalidated_y_table));
|
||||
memset(s->last_palette, '\0', sizeof(s->last_palette));
|
||||
memset(s->last_ch_attr, '\0', sizeof(s->last_ch_attr));
|
||||
|
@ -2266,6 +2265,7 @@ bool vga_common_init(VGACommonState *s, Object *obj, Error **errp)
|
|||
* all target endian dependencies from this file.
|
||||
*/
|
||||
s->default_endian_fb = target_words_bigendian();
|
||||
s->big_endian_fb = s->default_endian_fb;
|
||||
|
||||
vga_dirty_log_start(s);
|
||||
|
||||
|
|
Loading…
Reference in New Issue