Commit de63b05
drm/amd/display: Optimize custom brightness curve interpolation
[Why]
Custom brightness curve works by walking through all data points one
by one. When the brightness value is at either extreme this is a lot
of data points to walk. This is especially noticeable when moving a
brightness slider around how it can lag.
[How]
Bisect the data points to find the closest for interpolation.
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>1 parent 002a612 commit de63b05
1 file changed
Lines changed: 38 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4817 | 4817 | | |
4818 | 4818 | | |
4819 | 4819 | | |
4820 | | - | |
4821 | | - | |
| 4820 | + | |
| 4821 | + | |
4822 | 4822 | | |
4823 | 4823 | | |
4824 | 4824 | | |
4825 | 4825 | | |
4826 | 4826 | | |
4827 | 4827 | | |
4828 | 4828 | | |
4829 | | - | |
4830 | | - | |
4831 | | - | |
4832 | | - | |
4833 | | - | |
4834 | | - | |
| 4829 | + | |
| 4830 | + | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
4835 | 4834 | | |
4836 | | - | |
4837 | | - | |
4838 | | - | |
4839 | | - | |
4840 | | - | |
4841 | | - | |
4842 | | - | |
4843 | | - | |
4844 | | - | |
4845 | | - | |
| 4835 | + | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
4846 | 4839 | | |
4847 | | - | |
4848 | | - | |
4849 | | - | |
4850 | | - | |
4851 | | - | |
4852 | | - | |
4853 | | - | |
4854 | | - | |
| 4840 | + | |
| 4841 | + | |
| 4842 | + | |
| 4843 | + | |
| 4844 | + | |
| 4845 | + | |
| 4846 | + | |
| 4847 | + | |
| 4848 | + | |
| 4849 | + | |
| 4850 | + | |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
| 4856 | + | |
| 4857 | + | |
| 4858 | + | |
| 4859 | + | |
| 4860 | + | |
| 4861 | + | |
| 4862 | + | |
| 4863 | + | |
| 4864 | + | |
| 4865 | + | |
| 4866 | + | |
4855 | 4867 | | |
4856 | 4868 | | |
4857 | 4869 | | |
| |||
0 commit comments