]> git.baikalelectronics.ru Git - kernel.git/commit
amd/display: set backlight only if required
authorShirish S <shirish.s@amd.com>
Fri, 11 Mar 2022 15:00:17 +0000 (20:30 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Apr 2022 16:02:57 +0000 (12:02 -0400)
commit4052287a75eb3fc0f487fcc5f768a38bede455c8
tree85888078a278c3d049164da834d9089dad0cd73b
parentf4346fb3edf7720db3f7f5e1cab1f667cd024280
amd/display: set backlight only if required

[Why]
comparing pwm bl values (coverted) with user brightness(converted)
levels in commit_tail leads to continuous setting of backlight via dmub
as they don't to match.
This leads overdrive in queuing of commands to DMCU that sometimes lead
to depending on load on DMCU fw:

"[drm:dc_dmub_srv_wait_idle] *ERROR* Error waiting for DMUB idle: status=3"

[How]
Store last successfully set backlight value and compare with it instead
of pwm reads which is not what we should compare with.

Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h