Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/pm/smu7: Remove unused smu7_copy_bytes_from_smc

smu7_copy_bytes_from_smc() was added in 2016 by
commit 1ff55f465103 ("drm/amd/powerplay: implement smu7_smumgr for asics
with smu ip version 7.")

but never used.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Dr. David Alan Gilbert and committed by
Alex Deucher
1d8d8b8d c2a3bac7

-38
-36
drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.c
··· 46 46 } 47 47 48 48 49 - int smu7_copy_bytes_from_smc(struct pp_hwmgr *hwmgr, uint32_t smc_start_address, uint32_t *dest, uint32_t byte_count, uint32_t limit) 50 - { 51 - uint32_t data; 52 - uint32_t addr; 53 - uint8_t *dest_byte; 54 - uint8_t i, data_byte[4] = {0}; 55 - uint32_t *pdata = (uint32_t *)&data_byte; 56 - 57 - PP_ASSERT_WITH_CODE((0 == (3 & smc_start_address)), "SMC address must be 4 byte aligned.", return -EINVAL); 58 - PP_ASSERT_WITH_CODE((limit > (smc_start_address + byte_count)), "SMC address is beyond the SMC RAM area.", return -EINVAL); 59 - 60 - addr = smc_start_address; 61 - 62 - while (byte_count >= 4) { 63 - smu7_read_smc_sram_dword(hwmgr, addr, &data, limit); 64 - 65 - *dest = PP_SMC_TO_HOST_UL(data); 66 - 67 - dest += 1; 68 - byte_count -= 4; 69 - addr += 4; 70 - } 71 - 72 - if (byte_count) { 73 - smu7_read_smc_sram_dword(hwmgr, addr, &data, limit); 74 - *pdata = PP_SMC_TO_HOST_UL(data); 75 - /* Cast dest into byte type in dest_byte. This way, we don't overflow if the allocated memory is not 4-byte aligned. */ 76 - dest_byte = (uint8_t *)dest; 77 - for (i = 0; i < byte_count; i++) 78 - dest_byte[i] = data_byte[i]; 79 - } 80 - 81 - return 0; 82 - } 83 - 84 - 85 49 int smu7_copy_bytes_to_smc(struct pp_hwmgr *hwmgr, uint32_t smc_start_address, 86 50 const uint8_t *src, uint32_t byte_count, uint32_t limit) 87 51 {
-2
drivers/gpu/drm/amd/pm/powerplay/smumgr/smu7_smumgr.h
··· 53 53 }; 54 54 55 55 56 - int smu7_copy_bytes_from_smc(struct pp_hwmgr *hwmgr, uint32_t smc_start_address, 57 - uint32_t *dest, uint32_t byte_count, uint32_t limit); 58 56 int smu7_copy_bytes_to_smc(struct pp_hwmgr *hwmgr, uint32_t smc_start_address, 59 57 const uint8_t *src, uint32_t byte_count, uint32_t limit); 60 58 int smu7_program_jump_on_start(struct pp_hwmgr *hwmgr);