drm/amdgpu/display - only update eDP's backlight level when necessary
authorZhan Liu <zhan.liu@amd.com>
Thu, 8 Jul 2021 04:51:52 +0000 (00:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Jul 2021 15:58:30 +0000 (11:58 -0400)
commitc010efb7f0bc0c3cb2cd26b000f71d4bd0c427cd
treec11d472786c9b7b5dda312b229dc0cf3737b4b57
parent5017bf8214d929f6ff45c46ec21cd3c1bfc03dad
drm/amdgpu/display - only update eDP's backlight level when necessary

[Why]
The original logic is to update eDP's backlight level
on every amdgpu dm atomic commit, which causes excessive
DMUB write. As a result, when playing game or moving window
around, DMUB timeout and system lagging are observed.

[How]
We only need to update eDP's backlight level when current level
doesn't match requested level.

Signed-off-by: Zhan Liu <zhan.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c