Commit 318b1c3
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>1 parent fff90bb commit 318b1c3
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5279 | 5279 | | |
5280 | 5280 | | |
5281 | 5281 | | |
| 5282 | + | |
| 5283 | + | |
5282 | 5284 | | |
5283 | 5285 | | |
5284 | 5286 | | |
| |||
5303 | 5305 | | |
5304 | 5306 | | |
5305 | 5307 | | |
| 5308 | + | |
| 5309 | + | |
5306 | 5310 | | |
5307 | 5311 | | |
5308 | 5312 | | |
| |||
5321 | 5325 | | |
5322 | 5326 | | |
5323 | 5327 | | |
5324 | | - | |
| 5328 | + | |
| 5329 | + | |
| 5330 | + | |
| 5331 | + | |
| 5332 | + | |
| 5333 | + | |
| 5334 | + | |
| 5335 | + | |
| 5336 | + | |
| 5337 | + | |
| 5338 | + | |
| 5339 | + | |
5325 | 5340 | | |
| 5341 | + | |
5326 | 5342 | | |
5327 | 5343 | | |
5328 | 5344 | | |
| |||
0 commit comments