Commit c7fac7dc authored by Xiangliang Yu's avatar Xiangliang Yu Committed by Alex Deucher
Browse files

drm/amd/powerplay: Adjust the position of data size initial



Put the initial part close to memory allocate, it will make code
more clear.

Signed-off-by: default avatarXiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e224e4f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -549,7 +549,6 @@ int smu7_init(struct pp_smumgr *smumgr)
	smu_data = (struct smu7_smumgr *)(smumgr->backend);
	smu_data = (struct smu7_smumgr *)(smumgr->backend);
	smu_data->header_buffer.data_size =
	smu_data->header_buffer.data_size =
			((sizeof(struct SMU_DRAMData_TOC) / 4096) + 1) * 4096;
			((sizeof(struct SMU_DRAMData_TOC) / 4096) + 1) * 4096;
	smu_data->smu_buffer.data_size = 200*4096;


/* Allocate FW image data structure and header buffer and
/* Allocate FW image data structure and header buffer and
 * send the header buffer address to SMU */
 * send the header buffer address to SMU */
@@ -575,6 +574,7 @@ int smu7_init(struct pp_smumgr *smumgr)
	if (cgs_is_virtualization_enabled(smumgr->device))
	if (cgs_is_virtualization_enabled(smumgr->device))
		return 0;
		return 0;


	smu_data->smu_buffer.data_size = 200*4096;
	smu_allocate_memory(smumgr->device,
	smu_allocate_memory(smumgr->device,
		smu_data->smu_buffer.data_size,
		smu_data->smu_buffer.data_size,
		CGS_GPU_MEM_TYPE__VISIBLE_CONTIG_FB,
		CGS_GPU_MEM_TYPE__VISIBLE_CONTIG_FB,