Commit 52d3d11
drm/amd/display: Initialise backlight level values from hw
Internal backlight levels are initialised from ACPI but the values
are sometimes out of sync with the levels in effect until there has
been a read from hardware (eg triggered by reading from sysfs).
This means that the first drm_commit can cause the levels to be set
to a different value than the actual starting one, which results in
a sudden change in brightness.
This path shows the problem (when the values are out of sync):
amdgpu_dm_atomic_commit_tail()
-> amdgpu_dm_commit_streams()
-> amdgpu_dm_backlight_set_level(..., dm->brightness[n])
This patch calls the backlight ops get_brightness explicitly
at the end of backlight registration to make sure dm->brightness[n]
is in sync with the actual hardware levels.
Fixes: 2fe87f5 ("drm/amd/display: Set default brightness according to ACPI")
Signed-off-by: Vivek Das Mohapatra <vivek@collabora.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 318b1c3)
Cc: stable@vger.kernel.org1 parent fee5007 commit 52d3d11
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5266 | 5266 | | |
5267 | 5267 | | |
5268 | 5268 | | |
| 5269 | + | |
| 5270 | + | |
5269 | 5271 | | |
5270 | 5272 | | |
5271 | 5273 | | |
| |||
5290 | 5292 | | |
5291 | 5293 | | |
5292 | 5294 | | |
| 5295 | + | |
| 5296 | + | |
5293 | 5297 | | |
5294 | 5298 | | |
5295 | 5299 | | |
| |||
5308 | 5312 | | |
5309 | 5313 | | |
5310 | 5314 | | |
5311 | | - | |
| 5315 | + | |
| 5316 | + | |
| 5317 | + | |
| 5318 | + | |
| 5319 | + | |
| 5320 | + | |
| 5321 | + | |
| 5322 | + | |
| 5323 | + | |
| 5324 | + | |
| 5325 | + | |
| 5326 | + | |
5312 | 5327 | | |
| 5328 | + | |
5313 | 5329 | | |
5314 | 5330 | | |
5315 | 5331 | | |
| |||
0 commit comments