linux_dsm_epyc7002/drivers/gpu/drm/amd/display
Krunoslav Kovac e752058b86 drm/amd/display: Optimize gamma calculations
[Why&How]

1. Stack usage is pretty high as fixed31_32 struct is 8 bytes and we
have functions with >30 vars on the stack.

2. Optimize gamma calculation by reducing number of calls to
dc_fixpt_pow Our X points are divided into 32 regions wth 16 pts each.
Each region is 2x the previous, meaning x[i] = 2*x[i-16] for i>=16.
Using (2x)^gamma = 2^gamma * x^gamma, we can recursively compute powers
of gamma, we just need first 16 pts to start it up. dc_fixpt_pow() is
expensive, it computes x^y by doing exp(y*logx) Exp is done by Taylor
series approximation, and log by Newton-like approximation that also
uses exp internally. In short, it's significantly heavier than
run-of-the-mill addition/subtraction/multiply.

Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2019-07-18 14:27:25 -05:00
..
amdgpu_dm drm/amd/display: add functionality to get pipe CRC source. 2019-07-18 14:18:09 -05:00
dc drm/amd/display: Optimize gamma calculations 2019-07-18 14:27:25 -05:00
include drm/amd/display:Use Pixel clock in 100Hz units for HDMI Audio wall clock DTO 2019-07-18 14:18:09 -05:00
modules drm/amd/display: Optimize gamma calculations 2019-07-18 14:27:25 -05:00
Kconfig drm/amd/display: Add drm_audio_component support to amdgpu_dm 2019-07-11 14:37:24 -05:00
Makefile drm/amd/display: move clk_mgr files to right place 2019-05-31 10:39:31 -05:00
TODO drm/amd/display: Convert remaining loggers off dc_logger 2018-07-13 14:48:42 -05:00