AMD General

Reviewed-by:  Ellen Pan <[email protected]>

-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Tuesday, May 12, 2026 11:09 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander 
<[email protected]>; Pan, Ellen <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix discovery offset check under VF

Discovery table may be kept at offset 0 by host driver. Remove the validation 
check.

Fixes: b69911681fd5 ("drm/amdgpu: fallback to default discovery offset/size in 
sriov guest")

Signed-off-by: Lijo Lazar <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index bbb807a16a50..8e3b6a4050e9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -305,7 +305,7 @@ static int amdgpu_discovery_get_tmr_info(struct 
amdgpu_device *adev,
                                
adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].offset;
                        adev->discovery.size =
                                
adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].size_kb << 10;
-                       if (!adev->discovery.offset || !adev->discovery.size)
+                       if (!adev->discovery.size)
                                return -EINVAL;
                } else {
                        goto out;
--
2.49.0

Reply via email to