]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: Fix discovery offset check under VF
authorLijo Lazar <lijo.lazar@amd.com>
Tue, 12 May 2026 14:59:52 +0000 (20:29 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 May 2026 22:11:11 +0000 (18:11 -0400)
Discovery table may be kept at offset 0 by host driver. Remove the
validation check.

Fixes: 01bdc7e219c4 ("drm/amdgpu: New interface to get IP discovery binary v3")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Ellen Pan <yunru.pan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

index 623f7a399d652165c98800670d1c70070a914574..21f6761624c2c7182559b2d8f0b5120c68f7d228 100644 (file)
@@ -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;