qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly
@ 2021-02-04  5:18 Vadim Averin
  2021-02-15 10:58 ` [Bug 1914535] " Peter Maydell
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Vadim Averin @ 2021-02-04  5:18 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

When the emulated pl110/pl111 is switched programmatically to 8-bit
color depth mode, the display is drawn green and blue, but the real
PL110 displays grayscale in 8-bit mode.

The bug appears in qemu-system-arm version 3.1.0 (Debian
1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
(v5.2.0-1579-g99ae0cd90d).

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
@ 2021-02-15 10:58 ` Peter Maydell
  2021-02-15 17:55 ` Vadim Averin
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2021-02-15 10:58 UTC (permalink / raw)
  To: qemu-devel

Do you have a test case (QEMU command line and all necessary image
files) that demonstrates this, please ?


** Tags added: arm

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
  2021-02-15 10:58 ` [Bug 1914535] " Peter Maydell
@ 2021-02-15 17:55 ` Vadim Averin
  2021-02-19 16:56 ` Peter Maydell
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Vadim Averin @ 2021-02-15 17:55 UTC (permalink / raw)
  To: qemu-devel

Archive with all the demo files (kernel, disk image, dtb file, screenshot of the bug):
https://avevad.ddns.net/storage/qbug.tar
QEMU commandline:
qemu-system-arm -serial stdio -M vexpress-a15 -dtb vexpress-v2p-ca15_a7.dtb -smp 4  -m 256M -kernel zImage_new  -append "console=ttyAMA0 root=/dev/mmcblk0p1 loglevel=9 vt.global_cursor_default=0 video=vfb:" -drive if=sd,format=raw,file=disk

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
  2021-02-15 10:58 ` [Bug 1914535] " Peter Maydell
  2021-02-15 17:55 ` Vadim Averin
@ 2021-02-19 16:56 ` Peter Maydell
  2021-02-19 17:16 ` Vadim Averin
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2021-02-19 16:56 UTC (permalink / raw)
  To: qemu-devel

Lucky I looked at your screenshot, as half the repro instructions are only given in that!
When the guest gets to a shell prompt, one needs to type:

# fbset -depth 8
# fbset
# dd if=/dev/urandom of=/dev/fb0

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
                   ` (2 preceding siblings ...)
  2021-02-19 16:56 ` Peter Maydell
@ 2021-02-19 17:16 ` Vadim Averin
  2021-02-19 17:18 ` Peter Maydell
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Vadim Averin @ 2021-02-19 17:16 UTC (permalink / raw)
  To: qemu-devel

So, were you able to reproduce it?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
                   ` (3 preceding siblings ...)
  2021-02-19 17:16 ` Vadim Averin
@ 2021-02-19 17:18 ` Peter Maydell
  2021-02-22 12:08 ` Vadim Averin
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2021-02-19 17:18 UTC (permalink / raw)
  To: qemu-devel

Anyway, on first investigation I'm not sure what QEMU's pl11x model is doing wrong. The 8-bit mode is a palette-based setup, where the guest must program in the RGB values it wants to use into the palatte registers as RGB555 data:
 https://developer.arm.com/documentation/ddi0293/c/programmer-s-model/register-descriptions/256x16-bit-color-palette-registers?lang=en
and if you add some debug printing to QEMU you can see the guest writing in 
a variety of definitely-not-shades-of-grey values to the palette, so it's not surprising that it comes back as not-grey.

I think
https://elixir.bootlin.com/linux/latest/source/drivers/video/fbdev/amba-clcd.c#L343
is where the driver is writing to the palette and it definitely thinks the display is pseudocolor, not greyscale.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
                   ` (4 preceding siblings ...)
  2021-02-19 17:18 ` Peter Maydell
@ 2021-02-22 12:08 ` Vadim Averin
  2021-02-22 14:04   ` Peter Maydell
  2021-02-24  5:45 ` Vadim Averin
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 12+ messages in thread
From: Vadim Averin @ 2021-02-22 12:08 UTC (permalink / raw)
  To: qemu-devel

So how can I manage it to display grayscale?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-22 12:08 ` Vadim Averin
@ 2021-02-22 14:04   ` Peter Maydell
  2021-02-22 14:04     ` Peter Maydell
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Maydell @ 2021-02-22 14:04 UTC (permalink / raw)
  To: Bug 1914535; +Cc: QEMU Developers

On Mon, 22 Feb 2021 at 12:18, Vadim Averin <1914535@bugs.launchpad.net> wrote:
>
> So how can I manage it to display grayscale?

Programme the palette with exclusively shades of grey ?

The question here really is: is QEMU behaving differently
from the real vexpress-a15 hardware here? If it is, then where
is the behaviour divergence coming from, given that it looks
from the docs at least as if the QEMU implementation is doing
what the docs say it should do. If QEMU isn't behaving
differently from real hardware, then that's just a guest
software problem.

-- PMM


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-22 14:04   ` Peter Maydell
@ 2021-02-22 14:04     ` Peter Maydell
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2021-02-22 14:04 UTC (permalink / raw)
  To: qemu-devel

On Mon, 22 Feb 2021 at 12:18, Vadim Averin <1914535@bugs.launchpad.net> wrote:
>
> So how can I manage it to display grayscale?

Programme the palette with exclusively shades of grey ?

The question here really is: is QEMU behaving differently
from the real vexpress-a15 hardware here? If it is, then where
is the behaviour divergence coming from, given that it looks
from the docs at least as if the QEMU implementation is doing
what the docs say it should do. If QEMU isn't behaving
differently from real hardware, then that's just a guest
software problem.

-- PMM

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
                   ` (5 preceding siblings ...)
  2021-02-22 12:08 ` Vadim Averin
@ 2021-02-24  5:45 ` Vadim Averin
  2021-02-24 10:53 ` Peter Maydell
  2021-03-22 13:43 ` Peter Maydell
  8 siblings, 0 replies; 12+ messages in thread
From: Vadim Averin @ 2021-02-24  5:45 UTC (permalink / raw)
  To: qemu-devel

Well... I don't have any ARM Versatile Express board. Also,
documentation and manuals are not saying much about it

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
                   ` (6 preceding siblings ...)
  2021-02-24  5:45 ` Vadim Averin
@ 2021-02-24 10:53 ` Peter Maydell
  2021-03-22 13:43 ` Peter Maydell
  8 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2021-02-24 10:53 UTC (permalink / raw)
  To: qemu-devel

I think unless you can either (a) show that QEMU is behaving differently
from the real hardware or (b) point at what bit of the hardware
documentation QEMU's implementation is not following, then this doesn't
really sound like it's a bug in QEMU.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  New

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1914535] Re: PL110 8-bit mode is not emulated correctly
  2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
                   ` (7 preceding siblings ...)
  2021-02-24 10:53 ` Peter Maydell
@ 2021-03-22 13:43 ` Peter Maydell
  8 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2021-03-22 13:43 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: New => Invalid

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1914535

Title:
  PL110 8-bit mode is not emulated correctly

Status in QEMU:
  Invalid

Bug description:
  When the emulated pl110/pl111 is switched programmatically to 8-bit
  color depth mode, the display is drawn green and blue, but the real
  PL110 displays grayscale in 8-bit mode.

  The bug appears in qemu-system-arm version 3.1.0 (Debian
  1:3.1+dfsg-8+deb10u8) and qemu-system-arm version 5.2.50
  (v5.2.0-1579-g99ae0cd90d).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1914535/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-03-22 13:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04  5:18 [Bug 1914535] [NEW] PL110 8-bit mode is not emulated correctly Vadim Averin
2021-02-15 10:58 ` [Bug 1914535] " Peter Maydell
2021-02-15 17:55 ` Vadim Averin
2021-02-19 16:56 ` Peter Maydell
2021-02-19 17:16 ` Vadim Averin
2021-02-19 17:18 ` Peter Maydell
2021-02-22 12:08 ` Vadim Averin
2021-02-22 14:04   ` Peter Maydell
2021-02-22 14:04     ` Peter Maydell
2021-02-24  5:45 ` Vadim Averin
2021-02-24 10:53 ` Peter Maydell
2021-03-22 13:43 ` Peter Maydell

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).