[Public]

Series is:
Reviewed-by: Alex Deucher <[email protected]>
________________________________
From: Chen, Guchun <[email protected]>
Sent: Friday, February 18, 2022 9:51 AM
To: [email protected] <[email protected]>; Deucher, 
Alexander <[email protected]>; Zhang, Hawking <[email protected]>; 
Shi, Leslie <[email protected]>; Cui, Flora <[email protected]>; Koenig, 
Christian <[email protected]>; Pan, Xinhui <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: bypass tiling flag check in virtual display 
case (v2)

vkms leverages common amdgpu framebuffer creation, and
also as it does not support FB modifier, there is no need
to check tiling flags when initing framebuffer when virtual
display is enabled.

This can fix below calltrace:

amdgpu 0000:00:08.0: GFX9+ requires FB check based on format modifier
WARNING: CPU: 0 PID: 1023 at drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:1150 
amdgpu_display_framebuffer_init+0x8e7/0xb40 [amdgpu]

v2: check adev->enable_virtual_display instead as vkms can be
        enabled in bare metal as well.

Signed-off-by: Leslie Shi <[email protected]>
Signed-off-by: Guchun Chen <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 0d4ad1ee8348..1043e599b734 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -1150,7 +1150,7 @@ int amdgpu_display_framebuffer_init(struct drm_device 
*dev,
         if (ret)
                 return ret;

-       if (!dev->mode_config.allow_fb_modifiers) {
+       if (!dev->mode_config.allow_fb_modifiers && 
!adev->enable_virtual_display) {
                 drm_WARN_ONCE(dev, adev->family >= AMDGPU_FAMILY_AI,
                               "GFX9+ requires FB check based on format 
modifier\n");
                 ret = check_tiling_flags_gfx6(rfb);
--
2.17.1

Reply via email to