New kernels

AmigaOne X5000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 9167
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

xeno74 wrote: Thu Nov 02, 2023 1:03 pm 6.7-alpha1:

Virtual ppce500 QEMU machine with the virtio-gpu-pci or virtio-vga:

There is a fbdev issue. (The penguins are not displayed at boot time).

Code: Select all

[    0.889302] virtio-pci 0000:00:02.0: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-2)
The kernel 6.6 final doesn't have this issue.

This is not a problem with the VirtIO GPU driver. The developers have changed the code for displaying the penguins for CPU cores at boot time.

Code: Select all

only allow logo use from fbcon
There is an issue in the DRM framebuffer driver changes.

Geert Uytterhoeven has created a patch.

virtio_gpu_fbdev.patch

Code: Select all

--- a/drivers/gpu/drm/drm_client.c	2023-11-13 01:19:07.000000000 +0100
+++ b/drivers/gpu/drm/drm_client.c	2023-11-14 09:45:44.964199272 +0100
@@ -400,6 +400,16 @@ static int drm_client_buffer_addfb(struc
 
 	fb_req.width = width;
 	fb_req.height = height;
+	       if (client->dev->mode_config.quirk_addfb_prefer_host_byte_order) {
+               if (format == DRM_FORMAT_XRGB8888)
+                       format = DRM_FORMAT_HOST_XRGB8888;
+               if (format == DRM_FORMAT_ARGB8888)
+                       format = DRM_FORMAT_HOST_ARGB8888;
+               if (format == DRM_FORMAT_RGB565)
+                       format = DRM_FORMAT_HOST_RGB565;
+               if (format == DRM_FORMAT_XRGB1555)
+                       format = DRM_FORMAT_HOST_XRGB1555;
+        }
 	fb_req.pixel_format = format;
 	fb_req.handles[0] = handle;
 	fb_req.pitches[0] = buffer->pitch;
His patch works! :-) Thanks a lot to Geert!

I tested it with the virtio-vga and with the virtio-gpu-pci device in a virtual ppce500 QEMU/KVM HV machine with an e5500 CPU today.

Link to the thread: Fbdev issue after the drm updates 'drm-next-2023-10-31-1'
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9167
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9167
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

FYI:
“Geert Uytterhoeven“ wrote: [PATCH] drm/virtio: Add suppport for non-native

When using virtgpu on a big-endian machine, e.g. powerpc QEMU:

virtio-pci 0000:00:02.0: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-2)

or m68k/virt:

virtio-mmio virtio-mmio.125: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-2)

and the graphical display fails to come up.

Before, the call to drm_mode_addfb() caused a translation from a fourcc format (XR24) to a bpp/depth pair (32/24) to a potentially different fourcc format (BX24 on big-endian), due to the quirk processing in drm_driver_legacy_fb_format(). After, the original fourcc format (XR24) is passed unmodified.

However, the virtgpu DRM driver supports only a single format for its main plane: 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, which is the default DRM format, and must be supported by all drivers. Before, this was reported, but didn't lead to a failure:

virtio-mmio virtio-mmio.125: [drm] bpp/depth value of 32/24 not supported
virtio-mmio virtio-mmio.125: [drm] No compatible format found

As the core virtgpu driver and device support both XR24 and BX24 on both little-endian and big-endian just fine, fix this extending the list of supported formats for main plane and cursor plane to XR24/BX24 resp. AR24/BA24.

Fixes: 6ae2ff23aa43a0c4 ("drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()")
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Closes: https://lore.kernel.org/r/c47fba21-3ae9 ... enosoft.de
Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Code: Select all

drivers/gpu/drm/virtio/virtgpu_display.c | 11 +++++++++--
drivers/gpu/drm/virtio/virtgpu_plane.c   |  6 ++++--
2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index ad924a8502e9025c..49c89000aec33f23 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -301,9 +301,16 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev,
   struct virtio_gpu_framebuffer *virtio_gpu_fb;
   int ret;

-    if (mode_cmd->pixel_format != DRM_FORMAT_HOST_XRGB8888 &&
-        mode_cmd->pixel_format != DRM_FORMAT_HOST_ARGB8888)
+    switch (mode_cmd->pixel_format) {
+    case DRM_FORMAT_XRGB8888:
+    case DRM_FORMAT_ARGB8888:
+    case DRM_FORMAT_BGRX8888:
+    case DRM_FORMAT_BGRA8888:
+        break;
+
+    default:
       return ERR_PTR(-ENOENT);
+    }

   /* lookup object associated with res handle */
   obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index a2e045f3a0004a1b..a547d76b8fb0a77d 100644
--- 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)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9167
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

FYI:
Geert Uytterhoeven wrote: [PATCH v2] drm/virtio: Add suppport for non-native buffer formats

When using virtgpu on a big-endian machine, e.g. powerpc QEMU:

virtio-pci 0000:00:02.0: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-2)

or m68k/virt:

virtio-mmio virtio-mmio.125: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-2)

and the graphical display fails to come up.

Before, the call to drm_mode_addfb() caused a translation from a fourcc
format (XR24) to a bpp/depth pair (32/24) to a potentially different fourcc
format (BX24 on big-endian), due to the quirk processing in
drm_driver_legacy_fb_format(). After, the original fourcc format (XR24)
is passed unmodified.

However, the virtgpu DRM driver supports only a single format for its
main plane: 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, which is the default DRM format, and must be supported by all
drivers. Before, this was reported, but didn't lead to a failure:

virtio-mmio virtio-mmio.125: [drm] bpp/depth value of 32/24 not supported
virtio-mmio virtio-mmio.125: [drm] No compatible format found

As the core virtgpu driver and device support both XR24 and BX24 on both
little-endian and big-endian just fine, fix this extending the list of
supported formats for main plane and cursor plane to XR24/BX24 resp.
AR24/BA24.

Fixes: 6ae2ff23aa43a0c4 ("drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()")
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Closes: https://lore.kernel.org/r/c47fba21-3ae9 ... enosoft.de
Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
v2:
- Fix truncated one-line summary.

Code: Select all

 drivers/gpu/drm/virtio/virtgpu_display.c | 11 +++++++++--
 drivers/gpu/drm/virtio/virtgpu_plane.c   |  6 ++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index ad924a8502e9025c..49c89000aec33f23 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -301,9 +301,16 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev,
 	struct virtio_gpu_framebuffer *virtio_gpu_fb;
 	int ret;
 
-	if (mode_cmd->pixel_format != DRM_FORMAT_HOST_XRGB8888 &&
-	    mode_cmd->pixel_format != DRM_FORMAT_HOST_ARGB8888)
+	switch (mode_cmd->pixel_format) {
+	case DRM_FORMAT_XRGB8888:
+	case DRM_FORMAT_ARGB8888:
+	case DRM_FORMAT_BGRX8888:
+	case DRM_FORMAT_BGRA8888:
+		break;
+
+	default:
 		return ERR_PTR(-ENOENT);
+	}
 
 	/* lookup object associated with res handle */
 	obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]);
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index a2e045f3a0004a1b..a547d76b8fb0a77d 100644
--- 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)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
kilaueabart
Posts: 1061
Joined: Mon Mar 05, 2012 2:36 am

Re: New kernels

Post by kilaueabart »

I started using rc1 this afternoon. Made a screen dump of the monitor to prove it and uploaded it to that site that I can download from when this site refuses to let me include them in my posts, but I don't remember how to select the picture from the batch I have there.

When I looked at the info on the kernal icon, it said it was made on November 19th, tomorrow where I live, and the New Kernals post telling us it is available was also dated Nov 19, but I can't find any post here newer that Nov 16. What is going on?
User avatar
kilaueabart
Posts: 1061
Joined: Mon Mar 05, 2012 2:36 am

Re: New kernels

Post by kilaueabart »

OK, here is what I was talking about

https://ibb.co/47tFcq7
User avatar
xeno74
Posts: 9167
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

kilaueabart wrote: Sun Nov 19, 2023 11:40 pm OK, here is what I was talking about

https://ibb.co/47tFcq7
You can include it in your posts with:

BBCode:

Code: Select all

[url=https://ibb.co/47tFcq7][img]https://i.ibb.co/47tFcq7/6-7-0-rc1.png[/img][/url]
Result:

Image

Thank you for testing the RC1. :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9167
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Hi All,

Here is the RC2 of kernel 6.7 for testing.

New:
Download: linux-image-6.7-rc2-X1000_X5000.tar.gz

Image

Please test the kernels.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9167
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

FYI because of the issue with the virtio-mouse-pci cursor (Originally the issue with the VirtIO GPU DRM driver):

[PATCH v2] drm/virtio: Add suppport for non-native buffer formats
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
kilaueabart
Posts: 1061
Joined: Mon Mar 05, 2012 2:36 am

Re: New kernels

Post by kilaueabart »

This is a hint that kernal 6.7.0 rc2 might work a little bit on my machine.

Image
Post Reply