[PATCH] drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stop

Deucher, Alexander Alexander.Deucher at amd.com
Wed Sep 7 15:02:38 UTC 2016


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Tuesday, September 06, 2016 10:53 PM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH] drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size
> from si_dma_start/stop
> 
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> Without this, we were only ever using the first 256MB of VRAM.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97593
> Tested-by: Konstantin A. Lepikhov <lakostis at altlinux.org>
> Tested-by: Arek Ruśniak <arek.rusi at gmail.com>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/si_dma.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c
> b/drivers/gpu/drm/amd/amdgpu/si_dma.c
> index 377f4ae..b0f41cc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_dma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c
> @@ -137,6 +137,8 @@ static void si_dma_stop(struct amdgpu_device
> *adev)
>  		rb_cntl &= ~DMA_RB_ENABLE;
>  		WREG32(DMA_RB_CNTL + sdma_offsets[i], rb_cntl);
> 
> +		if (adev->mman.buffer_funcs_ring == ring)
> +			amdgpu_ttm_set_active_vram_size(adev, adev-
> >mc.visible_vram_size);
>  		ring->ready = false;
>  	}
>  }
> @@ -198,6 +200,9 @@ static int si_dma_start(struct amdgpu_device *adev)
>  			ring->ready = false;
>  			return r;
>  		}
> +
> +		if (adev->mman.buffer_funcs_ring == ring)
> +			amdgpu_ttm_set_active_vram_size(adev, adev-
> >mc.real_vram_size);
>  	}
> 
>  	return 0;
> --
> 2.9.3
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list