]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/powerplay: add check before i2c_add_adapter
authorWenhui Sheng <Wenhui.Sheng@amd.com>
Tue, 26 May 2020 05:27:11 +0000 (13:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 May 2020 18:00:50 +0000 (14:00 -0400)
commitb58f7ddad888d8738fce39d7ad436f0f3f68a89d
tree87eb3e07236c94edd0937a8c5245f3fd3f9b9ffe
parentefb93cd33d7d50b3a564a257d176a4c749064446
drm/amd/powerplay: add check before i2c_add_adapter

smu_i2c_eeprom_init may be invoked twice or more
under sroiv mode, while we don't want to add check
if (!amdgpu_sriov_vf) before we invoke smu_i2c_eeprom_init/fini
each time, so we check if i2c adapter is already added
before we invoke i2c_add_adapter

Signed-off-by: Wenhui Sheng <Wenhui.Sheng@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c