OSDN Git Service

drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over (v3)
authorAlex Deucher <alexdeucher@gmail.com>
Fri, 6 Apr 2018 19:54:09 +0000 (14:54 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 May 2018 18:43:16 +0000 (13:43 -0500)
commitebdef28ebbcf767d9fa687acb1d02d97d834c628
tree08dad09318f1921187c4329b910f3a8a3197b4cb
parentf8bc903707ae87342b97528037e27bf190051c11
drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over (v3)

Steal 9 MB for vga emulation and fb if vga is enabled, otherwise,
steal enough to cover the current display size as set by the vbios.

If no memory is used (e.g., secondary or headless card), skip
stolen memory reserve.

v2: skip reservation if vram is limited, address Christian's comments
v3: squash in fix from Harry

Reviewed-and-Tested-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> (v2)
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c