]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitff64c0a3c18d26e7d3c05ba7aa9da3e723244d6b
tree08dad09318f1921187c4329b910f3a8a3197b4cb
parentfd3eb5a3d63180d7ee2a583b7969214d73c75ebb
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