<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Chen, Guchun <Guchun.Chen@amd.com><br>
<b>Sent:</b> Friday, February 18, 2022 9:51 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; Shi, Leslie <Yuliang.Shi@amd.com>; Cui, Flora <Flora.Cui@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>;
Pan, Xinhui <Xinhui.Pan@amd.com><br>
<b>Cc:</b> Chen, Guchun <Guchun.Chen@amd.com><br>
<b>Subject:</b> [PATCH 2/2] drm/amdgpu: bypass tiling flag check in virtual display case (v2)</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">vkms leverages common amdgpu framebuffer creation, and<br>
also as it does not support FB modifier, there is no need<br>
to check tiling flags when initing framebuffer when virtual<br>
display is enabled.<br>
<br>
This can fix below calltrace:<br>
<br>
amdgpu 0000:00:08.0: GFX9+ requires FB check based on format modifier<br>
WARNING: CPU: 0 PID: 1023 at drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:1150 amdgpu_display_framebuffer_init+0x8e7/0xb40 [amdgpu]<br>
<br>
v2: check adev->enable_virtual_display instead as vkms can be<br>
enabled in bare metal as well.<br>
<br>
Signed-off-by: Leslie Shi <Yuliang.Shi@amd.com><br>
Signed-off-by: Guchun Chen <guchun.chen@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c<br>
index 0d4ad1ee8348..1043e599b734 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c<br>
@@ -1150,7 +1150,7 @@ int amdgpu_display_framebuffer_init(struct drm_device *dev,<br>
if (ret)<br>
return ret;<br>
<br>
- if (!dev->mode_config.allow_fb_modifiers) {<br>
+ if (!dev->mode_config.allow_fb_modifiers && !adev->enable_virtual_display) {<br>
drm_WARN_ONCE(dev, adev->family >= AMDGPU_FAMILY_AI,<br>
"GFX9+ requires FB check based on format modifier\n");<br>
ret = check_tiling_flags_gfx6(rfb);<br>
-- <br>
2.17.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>