Skip to contentSkip to conversation

drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stop

PATCH In review Michel Dänzer 2 participants 2 messages Sep 7, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stop

From: Michel Dänzer <[email protected]>

Without this, we were only ever using the first 256MB of VRAM.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97593

---
 drivers/gpu/drm/amd/amdgpu/si_dma.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/si_dma.c +5 -0
index 377f4ae..b0f41cc 100644
@@ -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;
Signature · 6 lines
2.9.3

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20160907025232.5963-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Tuesday, September 06, 2016 10:53 PM
To: [email protected]
Subject: [PATCH] drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stop

Quoted 8 lines

From: Michel Dänzer <[email protected]>

Without this, we were only ever using the first 256MB of VRAM.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97593

Quoted 34 lines
---
 drivers/gpu/drm/amd/amdgpu/si_dma.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/si_dma.c +2 -0
index 377f4ae..b0f41cc 100644
@@ -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;
drivers/gpu/drm/amd/amdgpu/si_dma.c +3 -0
 	}
 }
@@ -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

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx