Commit 9c28830
drm/amd/display: fix initial backlight brightness calculation
DIV_ROUND_CLOSEST(x, 100) returns either 0 or 1 if 0<x<=100, so the
division needs to be performed after the multiplication and not the
other way around, to properly scale the value.
Fixes: 8b5f3a2 ("drm/amd/display: Fix default DC and AC levels")
Signed-off-by: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Cc: stable@vger.kernel.org
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/aH2Q_HJvxKbW74vU@hacktheplanet.fi
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>1 parent 1f02f20 commit 9c28830
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4983 | 4983 | | |
4984 | 4984 | | |
4985 | 4985 | | |
4986 | | - | |
| 4986 | + | |
4987 | 4987 | | |
4988 | | - | |
| 4988 | + | |
4989 | 4989 | | |
4990 | 4990 | | |
4991 | 4991 | | |
| |||
0 commit comments