drm/amdgpu: resize VRAM BAR for CPU access v6
authorChristian König <christian.koenig@amd.com>
Tue, 28 Feb 2017 09:36:43 +0000 (10:36 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:41:42 +0000 (16:41 -0500)
commitd6895ad39f3b396be199f5b6fdfb8cde4be7bbf7
tree1aca90d615917011d23ec0d8eeeb0980a30b1bc7
parent3c7388936a76affe656d7ba682a33740a99b4a19
drm/amdgpu: resize VRAM BAR for CPU access v6

Try to resize BAR0 to let CPU access all of VRAM.

v2: rebased, style cleanups, disable mem decode before resize,
    handle gmc_v9 as well, round size up to power of two.
v3: handle gmc_v6 as well, release and reassign all BARs in the driver.
v4: rename new function to amdgpu_device_resize_fb_bar,
    reenable mem decoding only if all resources are assigned.
v5: reorder resource release, return -ENODEV instead of BUG_ON().
v6: squash in rebase fix

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.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