mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
drm/amd/amdgpu: Only reserve vram for firmware with vega9 MS_HYPERV host.
driver loading failed on VEGA10 SRIOV VF with linux host due to a wide
range of stolen reserved vram.
Since VEGA10 SRIOV VF need to reserve vram for firmware with windows
Hyper_V host specifically, check hypervisor type to only reserve
memory for it, and the range of the reserved vram can be limited
to between 5M-7M area.
Fixes: faad5ccac1
("drm/amdgpu: Add stolen reserved memory for MI25 SRIOV.")
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
3cd3e731f3
commit
49aa98ca30
1 changed files with 5 additions and 4 deletions
|
@ -25,6 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/io-64-nonatomic-lo-hi.h>
|
#include <linux/io-64-nonatomic-lo-hi.h>
|
||||||
|
#include <asm/hypervisor.h>
|
||||||
|
|
||||||
#include "amdgpu.h"
|
#include "amdgpu.h"
|
||||||
#include "amdgpu_gmc.h"
|
#include "amdgpu_gmc.h"
|
||||||
|
@ -647,11 +648,11 @@ void amdgpu_gmc_get_vbios_allocations(struct amdgpu_device *adev)
|
||||||
case CHIP_VEGA10:
|
case CHIP_VEGA10:
|
||||||
adev->mman.keep_stolen_vga_memory = true;
|
adev->mman.keep_stolen_vga_memory = true;
|
||||||
/*
|
/*
|
||||||
* VEGA10 SRIOV VF needs some firmware reserved area.
|
* VEGA10 SRIOV VF with MS_HYPERV host needs some firmware reserved area.
|
||||||
*/
|
*/
|
||||||
if (amdgpu_sriov_vf(adev)) {
|
if (amdgpu_sriov_vf(adev) && hypervisor_is_type(X86_HYPER_MS_HYPERV)) {
|
||||||
adev->mman.stolen_reserved_offset = 0x100000;
|
adev->mman.stolen_reserved_offset = 0x500000;
|
||||||
adev->mman.stolen_reserved_size = 0x600000;
|
adev->mman.stolen_reserved_size = 0x200000;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CHIP_RAVEN:
|
case CHIP_RAVEN:
|
||||||
|
|
Loading…
Add table
Reference in a new issue