drm/amdgpu: Reserve shared memory on VRAM for SR-IOV
authorHorace Chen <horace.chen@amd.com>
Fri, 29 Sep 2017 06:41:57 +0000 (14:41 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Oct 2017 20:30:16 +0000 (16:30 -0400)
commita05502e5cfa9abe17a16592be82c2f5692c91f35
tree4469aaafa3b34b2f81768ee775c08ee9e218ee45
parent6d16dac85c081825af58111023428c43d1da7e1a
drm/amdgpu: Reserve shared memory on VRAM for SR-IOV

SR-IOV need to reserve a piece of shared VRAM at the exact place
to exchange data betweem PF and VF. The start address and size of
the shared mem are passed to guest through VBIOS structure
VRAM_UsageByFirmware.

VRAM_UsageByFirmware is a general feature in VBIOS, it indicates
that VBIOS need to reserve a piece of memory on the VRAM.

Because the mem address is specified. Reserve it early in
amdgpu_ttm_init to make sure that it can monoplize the space.

Signed-off-by: Horace Chen <horace.chen@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c