[PATCH v2] drm/virtio: Add suppport for non-native buffer formats
Christian Zigotzky
chzigotzky at xenosoft.de
Sat Nov 25 12:22:13 UTC 2023
On 25 November 2023 at 12:09 pm, John Paul Adrian Glaubitz wrote:
> On Sat, 2023-11-25 at 11:06 +0100, Christian Zigotzky wrote:
>> Could you please revert the v2 patch because of the issue with the
>> virtio-mouse-pci cursor? I will try to use the v1 patch for the RC3 of
>> kernel 6.7.
> I don't understand why the v2 patch should yield any different results as
> the only change compared to v1 is the fixed patch subject. There are no
> functional differences, I just diffed the patches against each other:
>
> --- geert-patch-v1.patch 2023-11-25 12:09:19.122936658 +0100
> +++ geert-patch-v2.patch 2023-11-25 12:09:36.313039085 +0100
> @@ -34,6 +34,9 @@
> Suggested-by: Gerd Hoffmann <kraxel at redhat.com>
> Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
> ---
> +v2:
> + - Fix truncated one-line summary.
> +---
> drivers/gpu/drm/virtio/virtgpu_display.c | 11 +++++++++--
> drivers/gpu/drm/virtio/virtgpu_plane.c | 6 ++++--
> 2 files changed, 13 insertions(+), 4 deletions(-)
>
> Adrian
>
Hi Adrian,
Thank you for the hint. I think you are right. I use the the following
patch.
--- 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;
This patch solved the issue.
Christian
More information about the dri-devel
mailing list