[PATCH 2/2] drm/amdgpu: bypass tiling flag check in SRIOV

Chen, Guchun Guchun.Chen at amd.com
Fri Feb 18 14:44:23 UTC 2022


[Public]

Excellent point, exactly, we should check adev->enable_virtual_display. Let me send out a v2 soon.

Regards,
Guchun

From: Deucher, Alexander <Alexander.Deucher at amd.com>
Sent: Friday, February 18, 2022 10:39 PM
To: Chen, Guchun <Guchun.Chen at amd.com>; amd-gfx at lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang at amd.com>; Shi, Leslie <Yuliang.Shi at amd.com>; Cui, Flora <Flora.Cui at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>; Pan, Xinhui <Xinhui.Pan at amd.com>
Subject: Re: [PATCH 2/2] drm/amdgpu: bypass tiling flag check in SRIOV


[Public]

I think we should check adev->enable_virtual_display instead of sr-iov?  You can enable virtual display on bare metal as well.

Alex
________________________________
From: Chen, Guchun <Guchun.Chen at amd.com<mailto:Guchun.Chen at amd.com>>
Sent: Friday, February 18, 2022 12:11 AM
To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org> <amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>>; Deucher, Alexander <Alexander.Deucher at amd.com<mailto:Alexander.Deucher at amd.com>>; Zhang, Hawking <Hawking.Zhang at amd.com<mailto:Hawking.Zhang at amd.com>>; Shi, Leslie <Yuliang.Shi at amd.com<mailto:Yuliang.Shi at amd.com>>; Cui, Flora <Flora.Cui at amd.com<mailto:Flora.Cui at amd.com>>; Koenig, Christian <Christian.Koenig at amd.com<mailto:Christian.Koenig at amd.com>>; Pan, Xinhui <Xinhui.Pan at amd.com<mailto:Xinhui.Pan at amd.com>>
Cc: Chen, Guchun <Guchun.Chen at amd.com<mailto:Guchun.Chen at amd.com>>
Subject: [PATCH 2/2] drm/amdgpu: bypass tiling flag check in SRIOV

vkms leverages common amdgpu framebuffer creation, and
also it does not support pixel format modifier, so there
is no need to check tiling flags when initing framebuffer.
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]

Signed-off-by: Leslie Shi <Yuliang.Shi at amd.com<mailto:Yuliang.Shi at amd.com>>
Signed-off-by: Guchun Chen <guchun.chen at amd.com<mailto:guchun.chen at amd.com>>
---
 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..63cc210e4b6b 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 && !amdgpu_sriov_vf(adev)) {
                 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20220218/6d6d9017/attachment.htm>


More information about the amd-gfx mailing list