[PATCH 24/89] drm/amdgpu: reserved buffer is not needed with ip discovery enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Aaron Liu <aaron.liu@xxxxxxx>

When IP discovery enabled, the reserved buffer has been alloacted.

Signed-off-by: Aaron Liu <aaron.liu@xxxxxxx>
Reviewed-by: Huang Rui <ray.huang@xxxxxxx>
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index f1460acbab3d..3014985cbf47 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -782,14 +782,17 @@ void amdgpu_gmc_get_reserved_allocation(struct amdgpu_device *adev)
 {
 	/* Some ASICs need to reserve a region of video memory to avoid access
 	 * from driver */
+	adev->mman.stolen_reserved_offset = 0;
+	adev->mman.stolen_reserved_size = 0;
+
 	switch (adev->asic_type) {
 	case CHIP_YELLOW_CARP:
-		adev->mman.stolen_reserved_offset = 0x1ffb0000;
-		adev->mman.stolen_reserved_size = 64 * PAGE_SIZE;
+		if (amdgpu_discovery == 0) {
+			adev->mman.stolen_reserved_offset = 0x1ffb0000;
+			adev->mman.stolen_reserved_size = 64 * PAGE_SIZE;
+		}
 		break;
 	default:
-		adev->mman.stolen_reserved_offset = 0;
-		adev->mman.stolen_reserved_size = 0;
 		break;
 	}
 }
-- 
2.31.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux