[PATCH] drm/amdgpu: set fb_modifiers_not_supported in vkms

Zhang, Yifan Yifan1.Zhang at amd.com
Mon Oct 24 04:52:12 UTC 2022


[AMD Official Use Only - General]

Agree. Will change it in V2.

Best Regards,
Yifan

-----Original Message-----
From: Chen, Guchun <Guchun.Chen at amd.com> 
Sent: Monday, October 24, 2022 12:38 PM
To: Zhang, Yifan <Yifan1.Zhang at amd.com>; amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Zhang, Yifan <Yifan1.Zhang at amd.com>; Wentland, Harry <Harry.Wentland at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>
Subject: RE: [PATCH] drm/amdgpu: set fb_modifiers_not_supported in vkms

Maybe it's suggested to add it in amdgpu_vkms_sw_init?

Regards,
Guchun

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Yifan Zhang
Sent: Sunday, October 23, 2022 12:03 PM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Zhang, Yifan <Yifan1.Zhang at amd.com>; Wentland, Harry <Harry.Wentland at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>
Subject: [PATCH] drm/amdgpu: set fb_modifiers_not_supported in vkms

This patch to fix the gdm3 start failure with virual display:

/usr/libexec/gdm-x-session[1711]: (II) AMDGPU(0): Setting screen physical size to 270 x 203
/usr/libexec/gdm-x-session[1711]: (EE) AMDGPU(0): Failed to make import prime FD as pixmap: 22
/usr/libexec/gdm-x-session[1711]: (EE) AMDGPU(0): failed to set mode: Invalid argument
/usr/libexec/gdm-x-session[1711]: (WW) AMDGPU(0): Failed to set mode on CRTC 0
/usr/libexec/gdm-x-session[1711]: (EE) AMDGPU(0): Failed to enable any CRTC
gnome-shell[1840]: Running GNOME Shell (using mutter 42.2) as a X11 window and compositing manager
/usr/libexec/gdm-x-session[1711]: (EE) AMDGPU(0): failed to set mode: Invalid argument

vkms doesn't have modifiers support, set fb_modifiers_not_supported to bring the gdm back.

Signed-off-by: Yifan Zhang <yifan1.zhang at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
index 576849e95296..2bb346bf0d3e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
@@ -399,6 +399,8 @@ static struct drm_plane *amdgpu_vkms_plane_init(struct drm_device *dev,
 	if (!plane)
 		return ERR_PTR(-ENOMEM);
 
+	dev->mode_config.fb_modifiers_not_supported = true;
+
 	ret = drm_universal_plane_init(dev, plane, 1 << index,
 				       &amdgpu_vkms_plane_funcs,
 				       amdgpu_vkms_formats,
--
2.37.3


More information about the amd-gfx mailing list