From: Helge Deller <deller@gmx.de>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 6/7] hw/display/artist: Fix artist screen resolution
Date: Thu, 3 Sep 2020 08:07:44 +0200 [thread overview]
Message-ID: <20200903060744.GA8548@ls3530.fritz.box> (raw)
In-Reply-To: <45bf91fd-4e7f-7379-18a2-cdada67a3f6d@linaro.org>
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");
next prev parent reply other threads:[~2020-09-03 6:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 18:34 [PATCH 0/7] hppa power button support, graphics updates and firmware fixes Helge Deller
2020-09-01 18:34 ` [PATCH 1/7] seabios-hppa: Update SeaBIOS to hppa-qemu-5.2-2 tag Helge Deller
2020-09-01 18:34 ` [PATCH 2/7] hw/hppa: Make number of TLB and BTLB entries configurable Helge Deller
2020-09-01 21:36 ` Richard Henderson
2020-09-02 11:16 ` Helge Deller
2020-09-02 16:52 ` Richard Henderson
2020-09-02 19:36 ` Helge Deller
2020-09-01 18:34 ` [PATCH 3/7] hw/hppa: Store boot device in fw_cfg section Helge Deller
2020-09-01 21:37 ` Richard Henderson
2020-09-01 18:34 ` [PATCH 4/7] hw/hppa: Inform SeaBIOS about fw_cfg port address Helge Deller
2020-09-01 21:39 ` Richard Henderson
2020-09-02 11:24 ` Helge Deller
2020-09-02 16:46 ` Richard Henderson
2020-09-02 19:37 ` Helge Deller
2020-09-01 18:34 ` [PATCH 5/7] hw/hppa: Add power button emulation Helge Deller
2020-09-01 21:42 ` Richard Henderson
2020-09-01 18:34 ` [PATCH 6/7] hw/display/artist: Fix artist screen resolution Helge Deller
2020-09-01 21:49 ` Richard Henderson
2020-09-02 21:48 ` Helge Deller
2020-09-02 22:09 ` Richard Henderson
2020-09-03 6:07 ` Helge Deller [this message]
2020-09-03 6:08 ` Helge Deller
2020-09-03 6:09 ` Helge Deller
2020-09-03 15:09 ` Richard Henderson
2020-09-01 18:34 ` [PATCH 7/7] target/hppa: Fix boot with old Linux installation CDs Helge Deller
2020-09-01 19:37 ` [PATCH 0/7] hppa power button support, graphics updates and firmware fixes Philippe Mathieu-Daudé
2020-09-01 19:49 ` Helge Deller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200903060744.GA8548@ls3530.fritz.box \
--to=deller@gmx.de \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).