drm/amdgpu: total vram size also reduces pin size
authorChunming Zhou <David1.Zhou@amd.com>
Fri, 1 Apr 2016 09:05:30 +0000 (17:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Apr 2016 19:23:31 +0000 (15:23 -0400)
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

index 7805a8706af7bfb9cde33e30a5761db9eab0abd4..598eb0cd5aab6a1b437ad04d0c58dce24adc8d9d 100644 (file)
@@ -382,6 +382,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
                struct drm_amdgpu_info_vram_gtt vram_gtt;
 
                vram_gtt.vram_size = adev->mc.real_vram_size;
+               vram_gtt.vram_size -= adev->vram_pin_size;
                vram_gtt.vram_cpu_accessible_size = adev->mc.visible_vram_size;
                vram_gtt.vram_cpu_accessible_size -= adev->vram_pin_size;
                vram_gtt.gtt_size  = adev->mc.gtt_size;