qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/display/artist: Fix bug in coordinate extraction in artis


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] hw/display/artist: Fix bug in coordinate extraction in artist_vram_read()
Date: Tue, 25 May 2021 05:53:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

Hi Helge,

On 5/24/21 10:23 PM, Helge Deller wrote:
> The CDE desktop on HP-UX 10 shows wrongly rendered pixels when the local 
> screen
> menu is closed. This bug was introduced by commit c7050f3f167b
> ("hw/display/artist: Refactor x/y coordination extraction") which converted 
> the
> coordinate extraction in artist_vram_read() to use the ADDR_TO_X and ADDR_TO_Y
> macros, but forgot to right-shift the address by 2 as it was done before.

OK, but there is a similar issue in artist_vram_write(), right?

> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> Fixes: c7050f3f167b ("hw/display/artist: Refactor x/y coordination 
> extraction")
> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Sven Schnelle <svens@stackframe.org>
> Cc: qemu-stable@nongnu.org
> 
> diff --git a/hw/display/artist.c b/hw/display/artist.c
> index ed0e637f25..34efd3a565 100644
> --- a/hw/display/artist.c
> +++ b/hw/display/artist.c
> @@ -1233,8 +1233,8 @@ static uint64_t artist_vram_read(void *opaque, hwaddr 
> addr, unsigned size)
>          return 0;
>      }
> 
> -    posy = ADDR_TO_Y(addr);
> -    posx = ADDR_TO_X(addr);
> +    posy = ADDR_TO_Y(addr >> 2);
> +    posx = ADDR_TO_X(addr >> 2);
> 
>      if (posy > buf->height || posx > buf->width) {
>          return 0;
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]