]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: Lock DC and exit IPS when changing backlight
authorLeo Li <sunpeng.li@amd.com>
Tue, 20 Aug 2024 18:34:15 +0000 (14:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Sep 2024 17:12:13 +0000 (13:12 -0400)
commit53c3685f5307967a62517ace10e69d66520d0fc5
tree4736d06003f8fc8f549d823f396934c5b39b72ee
parent4de34b04783628f14614badb0a1aa67ce3fcef5d
drm/amd/display: Lock DC and exit IPS when changing backlight

Backlight updates require aux and/or register access. Therefore, driver
needs to disallow IPS beforehand.

So, acquire the dc lock before calling into dc to update backlight - we
should be doing this regardless of IPS. Then, while the lock is held,
disallow IPS before calling into dc, then allow IPS afterwards (if it
was previously allowed).

Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Roman Li <roman.li@amd.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 988fe2862635c1b1b40e41c85c24db44ab337c13)
Cc: stable@vger.kernel.org # 6.10+
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c