Commit d5df87e
drm/amd/display: Optimize custom brightness curve
commit 03b979e upstream.
[Why]
When BIOS includes a lot of custom brightness data points, walking
the entire list can be time consuming. This is most noticed when
dragging a power slider. The "higher" values are "slower" to drag
around.
[How]
Move custom brightness calculation loop into a static function. Before
starting the loop check the "half way" data point to see how it compares
to the input. If greater than the half way data point use that as the
starting point instead.
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent cd711c8 commit d5df87e
1 file changed
Lines changed: 33 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4655 | 4655 | | |
4656 | 4656 | | |
4657 | 4657 | | |
4658 | | - | |
4659 | | - | |
| 4658 | + | |
| 4659 | + | |
4660 | 4660 | | |
4661 | | - | |
4662 | 4661 | | |
| 4662 | + | |
4663 | 4663 | | |
4664 | | - | |
4665 | | - | |
4666 | | - | |
4667 | | - | |
4668 | | - | |
| 4664 | + | |
| 4665 | + | |
4669 | 4666 | | |
4670 | | - | |
4671 | | - | |
| 4667 | + | |
| 4668 | + | |
4672 | 4669 | | |
4673 | | - | |
4674 | | - | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
| 4673 | + | |
| 4674 | + | |
| 4675 | + | |
4675 | 4676 | | |
4676 | 4677 | | |
4677 | 4678 | | |
4678 | 4679 | | |
4679 | 4680 | | |
4680 | 4681 | | |
4681 | | - | |
4682 | | - | |
4683 | | - | |
4684 | | - | |
4685 | | - | |
| 4682 | + | |
4686 | 4683 | | |
4687 | 4684 | | |
| 4685 | + | |
4688 | 4686 | | |
4689 | 4687 | | |
4690 | | - | |
4691 | | - | |
4692 | | - | |
| 4688 | + | |
| 4689 | + | |
| 4690 | + | |
| 4691 | + | |
| 4692 | + | |
| 4693 | + | |
| 4694 | + | |
| 4695 | + | |
| 4696 | + | |
| 4697 | + | |
| 4698 | + | |
| 4699 | + | |
| 4700 | + | |
| 4701 | + | |
| 4702 | + | |
| 4703 | + | |
| 4704 | + | |
| 4705 | + | |
4693 | 4706 | | |
4694 | 4707 | | |
4695 | 4708 | | |
| |||
0 commit comments