From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Sven Schnelle <svens@stackframe.org>,
Richard Henderson <rth@twiddle.net>
Cc: Helge Deller <deller@gmx.de>, qemu-devel@nongnu.org
Subject: Re: [PATCH v5 5/6] hppa: Add emulation of Artist graphics
Date: Thu, 13 Feb 2020 00:55:08 +0100 [thread overview]
Message-ID: <896a8b05-b3a4-846d-f129-73207282edd5@redhat.com> (raw)
In-Reply-To: <20191220211512.3289-6-svens@stackframe.org>
Hi Sven,
On 12/20/19 10:15 PM, Sven Schnelle wrote:
> This adds emulation of Artist graphics good enough
> to get a Text console on both Linux and HP-UX. The
> X11 server from HP-UX also works.
>
> Signed-off-by: Sven Schnelle <svens@stackframe.org>
> ---
> hw/display/Kconfig | 4 +
> hw/display/Makefile.objs | 1 +
> hw/display/artist.c | 1450 ++++++++++++++++++++++++++++++++++++++
> hw/display/trace-events | 9 +
> hw/hppa/Kconfig | 1 +
> hw/hppa/hppa_hardware.h | 1 +
> hw/hppa/machine.c | 9 +
> 7 files changed, 1475 insertions(+)
> create mode 100644 hw/display/artist.c
>
> diff --git a/hw/display/Kconfig b/hw/display/Kconfig
> index c500d1fc6d..15d59e10dc 100644
> --- a/hw/display/Kconfig
> +++ b/hw/display/Kconfig
> @@ -91,6 +91,10 @@ config TCX
> config CG3
> bool
>
> +config ARTIST
> + bool
> + select FRAMEBUFFER
> +
> config VGA
> bool
>
> diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
> index f2182e3bef..5f03dfdcc4 100644
> --- a/hw/display/Makefile.objs
> +++ b/hw/display/Makefile.objs
> @@ -40,6 +40,7 @@ common-obj-$(CONFIG_SM501) += sm501.o
> common-obj-$(CONFIG_TCX) += tcx.o
> common-obj-$(CONFIG_CG3) += cg3.o
> common-obj-$(CONFIG_NEXTCUBE) += next-fb.o
> +common-obj-$(CONFIG_ARTIST) += artist.o
>
> obj-$(CONFIG_VGA) += vga.o
>
> diff --git a/hw/display/artist.c b/hw/display/artist.c
[...]
> +static void draw_line_size(ARTISTState *s, bool update_start)
> +{
> +
> + int startx = artist_get_x(s->vram_start);
> + int starty = artist_get_y(s->vram_start);
> + int endx = artist_get_x(s->line_size);
> + int endy = artist_get_y(s->line_size);
> +
> + trace_artist_draw_line(startx, starty, endx, endy);
> + draw_line(s, startx, starty, endx, endy, update_start, -1, -1);
> +}
> +
> +static void draw_line_xy(ARTISTState *s, bool update_start)
> +{
> +
> + int startx = artist_get_x(s->vram_start);
> + int starty = artist_get_y(s->vram_start);
> + int sizex = artist_get_x(s->blockmove_size);
> + int sizey = artist_get_y(s->blockmove_size);
> + int linexy = s->line_xy >> 16;
> + int endx, endy;
> +
> + endx = startx;
> + endy = starty;
> +
> + if (sizex > 0) {
> + endx = startx + linexy;
> + }
> +
> + if (sizex < 0) {
> + endx = startx;
> + startx -= linexy;
> + }
> +
> + if (sizey > 0) {
> + endy = starty + linexy;
> + }
> +
> + if (sizey < 0) {
> + endy = starty;
> + starty -= linexy;
> + }
> +
> + if (startx < 0) {
> + startx = 0;
> + }
> +
> + if (endx < 0) {
> + endx = 0;
If negative, set to zero.
> + }
> +
> + if (starty < 0) {
> + starty = 0;
> + }
> +
> + if (endy < 0) {
> + endy = 0;
Ditto.
> + }
> +
> +
> + if (endx < 0) {
> + return;
Here Coverity points:
>>> CID 1419388: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "return;".
> + }
> +
> + if (endy < 0) {
> + return;
Here again.
> + }
> +
> + trace_artist_draw_line(startx, starty, endx, endy);
> + draw_line(s, startx, starty, endx, endy, false, -1, -1);
> +}
> +
> +static void draw_line_end(ARTISTState *s, bool update_start)
> +{
> +
> + int startx = artist_get_x(s->vram_start);
> + int starty = artist_get_y(s->vram_start);
> + int endx = artist_get_x(s->line_end);
> + int endy = artist_get_y(s->line_end);
> +
> + trace_artist_draw_line(startx, starty, endx, endy);
> + draw_line(s, startx, starty, endx, endy, update_start, -1, -1);
> +}
next prev parent reply other threads:[~2020-02-12 23:55 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 21:15 [PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation Sven Schnelle
2019-12-20 21:15 ` [PATCH v5 1/6] hw/hppa/dino.c: Improve emulation of Dino PCI chip Sven Schnelle
2020-02-12 23:37 ` Philippe Mathieu-Daudé
2020-02-13 22:59 ` Philippe Mathieu-Daudé
2019-12-20 21:15 ` [PATCH v5 2/6] hppa: Add support for LASI chip with i82596 NIC Sven Schnelle
2019-12-20 21:15 ` [PATCH v5 3/6] ps2: accept 'Set Key Make and Break' commands Sven Schnelle
2019-12-20 21:15 ` [PATCH v5 4/6] hppa: add emulation of LASI PS2 controllers Sven Schnelle
2020-01-03 6:15 ` Philippe Mathieu-Daudé
2020-01-19 17:22 ` Sven Schnelle
2019-12-20 21:15 ` [PATCH v5 5/6] hppa: Add emulation of Artist graphics Sven Schnelle
2019-12-22 12:37 ` Philippe Mathieu-Daudé
2019-12-23 17:50 ` Sven Schnelle
2019-12-24 0:18 ` Philippe Mathieu-Daudé
2019-12-27 20:57 ` Helge Deller
2019-12-29 23:15 ` Philippe Mathieu-Daudé
2020-02-12 23:55 ` Philippe Mathieu-Daudé [this message]
2019-12-20 21:15 ` [PATCH v5 6/6] seabios-hppa: update to latest version Sven Schnelle
2019-12-22 12:33 ` Philippe Mathieu-Daudé
2019-12-21 22:22 ` [PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation Helge Deller
2019-12-21 22:24 ` [PATCH 1/2] hppa: Do not enable artist graphics with -nographic option Helge Deller
2019-12-22 8:39 ` Sven Schnelle
2019-12-22 10:22 ` Helge Deller
2019-12-29 1:25 ` Richard Henderson
2019-12-21 22:25 ` [PATCH 2/2] hppa: Switch to tulip NIC by default Helge Deller
2019-12-29 1:25 ` Richard Henderson
2019-12-29 1:25 ` [PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation Richard Henderson
2019-12-29 13:08 ` 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=896a8b05-b3a4-846d-f129-73207282edd5@redhat.com \
--to=philmd@redhat.com \
--cc=deller@gmx.de \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=svens@stackframe.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).