From 4de7665d2fbf3e2f7d51f1d0c5642c27ac583e1d Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 11 Jul 2018 13:24:53 -0500 Subject: [PATCH 1/4] drm/amdgpu/pp/smu7: drop unused values in smu data structure use kaddr directly rather than secondary variable. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 3 +-- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c index d644a9bb9078..2527bfd640f2 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c @@ -421,7 +421,7 @@ int smu7_request_smu_load_fw(struct pp_hwmgr *hwmgr) + UCODE_ID_CP_MEC_JT2_MASK; } - toc = (struct SMU_DRAMData_TOC *)smu_data->header; + toc = (struct SMU_DRAMData_TOC *)smu_data->header_buffer.kaddr; toc->num_entries = 0; toc->structure_version = 1; @@ -590,7 +590,6 @@ int smu7_init(struct pp_hwmgr *hwmgr) if (r) return -EINVAL; - smu_data->header = smu_data->header_buffer.kaddr; smu_data->header_buffer.mc_addr = mc_addr; if (!hwmgr->not_vf) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h index 39c9bfda0ab4..e6def283b731 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h @@ -37,8 +37,6 @@ struct smu7_buffer_entry { }; struct smu7_smumgr { - uint8_t *header; - uint8_t *mec_image; struct smu7_buffer_entry smu_buffer; struct smu7_buffer_entry header_buffer; -- 2.13.6