dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Darren Stevens" <darren@stevens-zone.net>,
	"R.T.Dickinson" <rtd2@xtra.co.nz>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	"Michel Dänzer" <michel@daenzer.net>,
	virtualization@lists.linux.dev,
	"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
	"mad skateman" <madskateman@gmail.com>,
	"Christian Zigotzky" <chzigotzky@xenosoft.de>,
	deller@gmx.de, "Christian Zigotzky" <info@xenosoft.de>
Subject: Re: Fbdev issue after the drm updates 'drm-next-2023-10-31-1'
Date: Wed, 15 Nov 2023 10:22:04 +0100	[thread overview]
Message-ID: <uxr4sf6kirv32tfbd6qjzxqd53zpoknjfa4ucr4zs5ktkks2re@spgj4j64raaa> (raw)
In-Reply-To: <CAMuHMdWu6Q3ew0m4xugjF_hgSt0RFFr+ccoBrSzt0FGLgtxJtA@mail.gmail.com>

On Wed, Nov 15, 2023 at 09:33:28AM +0100, Geert Uytterhoeven wrote:
> Hi Christian,
> 
> CC virtgpu
> 
> On Tue, Nov 14, 2023 at 10:45 AM Christian Zigotzky
> <chzigotzky@xenosoft.de> wrote:
> > On 13 November 2023 at 01:48 pm, Geert Uytterhoeven wrote:
> > > I can confirm there is no graphics output with m68k/virt, and
> 
> Before the error message you reported:
> 
>     virtio-mmio virtio-mmio.125: [drm] *ERROR* fbdev: Failed to setup
> generic emulation (ret=-2)
> 
> it also prints:
> 
>     virtio-mmio virtio-mmio.125: [drm] bpp/depth value of 32/24 not supported
>     virtio-mmio virtio-mmio.125: [drm] No compatible format found
> 
> Upon closer look, it turns out virtgpu is special in that its main
> plane supports only a single format: DRM_FORMAT_HOST_XRGB8888, which
> is XR24 on little-endian, and BX24 on big-endian.  I.e. on big-endian,
> virtgpu does not support XR24.

Driver and device support both XR24 and BX24 on both little endian and
big endian just fine.

Problem is both fbdev interfaces and the ADDFB ioctl specify the format
using bpp instead of fourcc, and advertising only one framebuffer format
-- in native byte order -- used to worked best, especially on bigendian
machines.

That was years ago though, IIRC predating the generic fbdev emulation,
so maybe it's time to revisit that.  Changing it should be as simple as
updating the format arrays:

--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -30,11 +30,13 @@
 #include "virtgpu_drv.h"
 
 static const uint32_t virtio_gpu_formats[] = {
-       DRM_FORMAT_HOST_XRGB8888,
+       DRM_FORMAT_XRGB8888,
+       DRM_FORMAT_BGRX8888,
 };
 
 static const uint32_t virtio_gpu_cursor_formats[] = {
-       DRM_FORMAT_HOST_ARGB8888,
+       DRM_FORMAT_ARGB8888,
+       DRM_FORMAT_BGRA8888,
 };
 
 uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc)

HTH,
  Gerd


  reply	other threads:[~2023-11-15  9:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 11:59 Radeon NI: GIT kernel with the nislands_smc commit doesn't boot on a Freescale P5040 board and P.A.Semi Nemo board Christian Zigotzky
2021-04-30 15:26 ` Deucher, Alexander
2021-04-30 15:56   ` Gustavo A. R. Silva
2021-05-06 23:55 ` Gustavo A. R. Silva
2021-05-07  6:43   ` Christian Zigotzky
2021-05-08 11:33     ` Christian Zigotzky
2021-05-09 23:04       ` Gustavo A. R. Silva
2023-11-02 14:45       ` Fbdev issue after the drm updates 'drm-next-2023-10-31-1' Christian Zigotzky
2023-11-07  8:36         ` Christian Zigotzky
2023-11-12 14:23           ` Christian Zigotzky
2023-11-13 12:48             ` Geert Uytterhoeven
2023-11-13 13:12               ` Christian Zigotzky
2023-11-14  9:45               ` Christian Zigotzky
2023-11-15  8:33                 ` Geert Uytterhoeven
2023-11-15  9:22                   ` Gerd Hoffmann [this message]
2023-11-16 13:13                     ` Geert Uytterhoeven
2021-11-04 10:45 ` [VirtIO GPU] Xorg doesn't start with the DRM updates 'drm-next-2021-11-03' in a virtual e5500 QEMU KVM-HV machine on a Freescale P5040 board Christian Zigotzky
2021-11-04 21:42   ` [PATCH] drm/virtio: Fix NULL dereference error in virtio_gpu_poll Vivek Kasireddy
2021-11-05 18:05     ` Christian Zigotzky
2021-11-08 12:56     ` Gerd Hoffmann

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=uxr4sf6kirv32tfbd6qjzxqd53zpoknjfa4ucr4zs5ktkks2re@spgj4j64raaa \
    --to=kraxel@redhat.com \
    --cc=chzigotzky@xenosoft.de \
    --cc=darren@stevens-zone.net \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=info@xenosoft.de \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madskateman@gmail.com \
    --cc=michel@daenzer.net \
    --cc=rtd2@xtra.co.nz \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux.dev \
    /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).