mirror of
https://github.com/torvalds/linux.git
synced 2026-10-30 14:06:03 +01:00
drm/amdgpu: restrict BAR0 fallback read to SR-IOV VFs only
The BAR0 fallback read path was introduced as a workaround for SR-IOV VFs
where the VRAM aperture is not available during early init. Restrict this
workaround to only SR-IOV VFs where it's needed.
Reported-by: gloveless@jqluv.com
Fixes: cba4928cdf ("drm/amdgpu: reduce early full GPU access during SR-IOV init")
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patch.msgid.link/20260826185102.2269511-1-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
063422c226
commit
d8a0affd20
|
|
@ -776,6 +776,9 @@ static int amdgpu_device_read_fb_via_bar0(struct amdgpu_device *adev,
|
|||
if (!buf || !size)
|
||||
return -EINVAL;
|
||||
|
||||
if (!amdgpu_sriov_vf(adev))
|
||||
return -EINVAL;
|
||||
|
||||
flags = pci_resource_flags(adev->pdev, 0);
|
||||
if ((flags & IORESOURCE_UNSET) || !(flags & IORESOURCE_MEM))
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user