]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/amd/display: Clip all remaining regamma points after first clipped point
authorSivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com>
Tue, 9 Oct 2018 16:59:46 +0000 (12:59 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Nov 2018 19:21:33 +0000 (14:21 -0500)
commitb76dfbef061acc29b74cc61e9fbbb60537edcc55
treea135426c48912317c194cd54765b86c30508f8b1
parent1fd8375236fc1d125c8c8bfb6462b3cfb139b6fe
drm/amd/display: Clip all remaining regamma points after first clipped point

[Why]
All values computed in the gamma curve after the first upperbound
clipped point will need to be clipped anyways. We can avoid
unnecessary computations and potential fixed point
overflow by instead clipping these values to 1 automatically.

[How]
Track if upper-bound clipping has been done, and clip all values after
this threshold is reached without computing the output gamma
point.

Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c