[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution
From: |
Helge Deller |
Subject: |
Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution |
Date: |
Thu, 3 Sep 2020 08:07:44 +0200 |
New patch #1:
From 80ad61c2ba25ca608b7c1c1cf701ae8164219cf6 Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@gmx.de>
Subject: [PATCH] hw/display/artist: Verify artist screen resolution
Artist hardware is limited to 2048 x 2048 pixels.
STI ROMs allow at minimum 640 x 480 pixels.
Qemu users can adjust the screen size on the command line with:
-global artist.width=800 -global artist.height=600
but we need to ensure that the screen size stays inside the given
boundaries, otherwise print an error message and adjust.
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/hw/display/artist.c b/hw/display/artist.c
index 71982559c6..ff1532fdc1 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -1374,6 +1374,18 @@ static void artist_realizefn(DeviceState *dev, Error
**errp)
struct vram_buffer *buf;
hwaddr offset = 0;
+ if (s->width > 2048 || s->height > 2048) {
+ error_report("artist: screen size can not exceed 2048 x 2048 pixel.");
+ s->width = MIN(s->width, 2048);
+ s->height = MIN(s->height, 2048);
+ }
+
+ if (s->width < 640 || s->height < 480) {
+ error_report("artist: minimum screen size is 640 x 480 pixel.");
+ s->width = MAX(s->width, 640);
+ s->height = MAX(s->height, 480);
+ }
+
memory_region_init(&s->mem_as_root, OBJECT(dev), "artist", ~0ull);
address_space_init(&s->as, &s->mem_as_root, "artist");
- Re: [PATCH 4/7] hw/hppa: Inform SeaBIOS about fw_cfg port address, (continued)
[PATCH 5/7] hw/hppa: Add power button emulation, Helge Deller, 2020/09/01
[PATCH 6/7] hw/display/artist: Fix artist screen resolution, Helge Deller, 2020/09/01
- Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution, Richard Henderson, 2020/09/01
- Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution, Helge Deller, 2020/09/02
- Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution, Richard Henderson, 2020/09/02
- Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution,
Helge Deller <=
- Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution, Helge Deller, 2020/09/03
- Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution, Helge Deller, 2020/09/03
- Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution, Richard Henderson, 2020/09/03
[PATCH 3/7] hw/hppa: Store boot device in fw_cfg section, Helge Deller, 2020/09/01
[PATCH 1/7] seabios-hppa: Update SeaBIOS to hppa-qemu-5.2-2 tag, Helge Deller, 2020/09/01
[PATCH 7/7] target/hppa: Fix boot with old Linux installation CDs, Helge Deller, 2020/09/01
[PATCH 2/7] hw/hppa: Make number of TLB and BTLB entries configurable, Helge Deller, 2020/09/01