]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pm: Fix sienna cichlid incorrect OD volage after resume
authorBłażej Szczygieł <mumei6102@gmail.com>
Sat, 4 Mar 2023 23:44:31 +0000 (00:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:34:01 +0000 (13:34 +0100)
commit1e2504b1dd8360f0f8b845abea79e8221af880b7
tree17ff397c0ec3439c06d6141445159fb744a571c3
parent68c808a3c5cf11cfb4bf49c2f947edabd3918881
drm/amd/pm: Fix sienna cichlid incorrect OD volage after resume

commit f3db8b91f7ced972a05008ceae23b5c21f14107c upstream.

Always setup overdrive tables after resume. Preserve only some
user-defined settings in user_overdrive_table if they're set.

Copy restored user_overdrive_table into od_table to get correct
values.

On cold boot, BTC was triggered and GfxVfCurve was calibrated. We
got VfCurve settings (a). On resuming back, BTC will be triggered
again and GfxVfCurve will be recalibrated. VfCurve settings (b)
got may be different from those of cold boot.  So if we reuse
those VfCurve settings (a) got on cold boot on suspend, we can
run into discrepencies.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1897
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2276
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Błażej Szczygieł <mumei6102@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c