drm/amd/pm: fix smu i2c data read risk
authorYang Wang <kevinyang.wang@amd.com>
Tue, 20 Jun 2023 09:05:25 +0000 (17:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Jul 2023 16:06:16 +0000 (12:06 -0400)
commitd934e537c14bfe1227ced6341472571f354383e8
treef3ffcecfe7ad542edb37c973d1b469c64805b2bb
parent6725f33228077902ddac2a05e0ab361dee36e4ba
drm/amd/pm: fix smu i2c data read risk

the smu driver_table is used for all types of smu
tables data transcation (e.g: PPtable, Metrics, i2c, Ecc..).

it is necessary to hold this lock to avoiding data tampering
during the i2c read operation.

Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c