aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/modules
AgeCommit message (Collapse)AuthorFilesLines
2018-05-15drm/amd/display: Add user_regamma to color moduleKrunoslav Kovac2-14/+348
Signed-off-by: Krunoslav Kovac <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-05-15drm/amd/display: Do not create memory allocation if stats not enabledAnthony Koo1-11/+15
Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-05-09drm/amd/display: Use kvzalloc for potentially large allocationsMichel Dänzer1-34/+38
Allocating up to 32 physically contiguous pages can easily fail (and has failed for me), and isn't necessary anyway. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-04-11drm/amd/display: Couple bug fixes in stats moduleAnthony Koo1-11/+28
Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-03-14drm/amd/display: add support for regkey "LCDFreeSyncDefault"Samson Tam1-0/+26
Signed-off-by: Samson Tam <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-03-14drm/amd/display: Fix handling of linear transfer functionVitaly Prosyak1-2/+4
Signed-off-by: Vitaly Prosyak <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-03-14drm/amd/display: Implement stats loggingAnthony Koo4-30/+507
Stats will be used for debug purposes Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-03-05drm/amd/display: Handle HDR use cases.Vitaly Prosyak1-76/+67
Implementation of de-gamma, blnd-gamma, shaper and 3d lut's. Removed memory allocations in transfer functions. Refactor color module. Signed-off-by: Vitaly Prosyak <[email protected]> Reviewed-by: Krunoslav Kovac <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-02-19drm/amd/display: De PQ implementationVitaly Prosyak2-73/+414
Some refactoring and optimizations in color module. Added de gamma 2.2 & 2.4, also re gamma 2.2. Added interface for diagnostic for de gamma & de pq. Signed-off-by: Vitaly Prosyak <[email protected]> Reviewed-by: Krunoslav Kovac <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-02-19drm/amd/display: Add color module's gamma helpers to Linux buildLeo (Sunpeng) Li3-0/+1146
Also guard includes that we don't need. Signed-off-by: Leo (Sunpeng) Li <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-12-19BackMerge tag 'v4.15-rc4' into drm-nextDave Airlie1-0/+21
Linux 4.15-rc4 Daniel requested it to fix some messy conflicts.
2017-12-06drm/amd/display: Remove unnecessary dc_stream vtableHarry Wentland1-54/+30
There's no need to have this as a vtable. The vtable was initially used for stream_adjust_vmin_vmax but the condition checked here (set_drr) is always true, hence we don't need to assign this dynamically anymore. Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-12-04drm/amdgpu: add license to MakefilesAlex Deucher1-0/+21
Was missing license text. Acked-by: Harry Wentland <[email protected]> Acked-by: Felix Kuehling <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-28drm/amd/display: Use kernel alloc/freeHarry Wentland1-7/+7
Abstractions are frowned upon. cocci script: virtual context virtual patch virtual org virtual report @@ expression ptr; @@ - dm_alloc(ptr) + kzalloc(ptr, GFP_KERNEL) @@ expression ptr, size; @@ - dm_realloc(ptr, size) + krealloc(ptr, size, GFP_KERNEL) @@ expression ptr; @@ - dm_free(ptr) + kfree(ptr) v2: use GFP_KERNEL, not GFP_ATOMIC. add cocci script Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Clean up flattening core_dc to dcBhawanpreet Lakha1-10/+9
Clean up some code related to flattening core_dc commit (Remove redundent dc = dc, which was the result of removing DC_TO_CORE() macro) Signed-off-by: Bhawanpreet Lakha <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Flattening core_dc to dcBhawanpreet Lakha1-6/+5
-Flattening core_dc to dc Signed-off-by: Bhawanpreet Lakha <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Rename dc_stream to dc_stream_stateHarry Wentland2-39/+39
find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_stream/struct dc_stream_state/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_stream_state_update/struct dc_stream_update/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_stream_state_status/struct dc_stream_status/g' Plus some manual changes Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Roll core_stream into dc_streamLeo (Sunpeng) Li2-47/+41
Signed-off-by: Leo (Sunpeng) Li <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Add regkey for DRR control for internal panelAnthony Koo2-35/+40
Also need to change default to off Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Re-enable Vsync Interrupts for Gradual Refresh RampAmy Zhang2-10/+33
- Make sure Vsync interrupts are disabled in static screen case and enabled when not to save power - Create no_static_for_external_dp debug option Signed-off-by: Amy Zhang <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: add hyst frames for fixed refreshAnthony Koo1-20/+36
Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Temporary disable BTR FreeSync support for nowAnthony Koo1-5/+8
Reduce timer tick interval for the static screen Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Fix DRR Enable on DesktopAmy Zhang2-31/+61
- Block PSR in Full screen apps to prevent incorrect static screen curser events - Reprogram static screen events when update freesync state - Program static ramp variable active after other values are programmed - Correct wrong assigning of the nominal and current vcount Signed-off-by: Amy Zhang <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: fix freesync not working on ravenCorbin McElhanney1-0/+10
Signed-off-by: Corbin McElhanney <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: prevent assert on error of 1 in calc_freesync_rangeDmytro Laktyushkin1-2/+4
Signed-off-by: Dmytro Laktyushkin <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Assign stream to map before we need itHarry Wentland1-4/+2
Signed-off-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Add support for FreeSync on eDP to moduleEric Cook1-9/+33
Signed-off-by: Eric <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Check for Zero Range in FreeSync CalcEric Cook1-0/+15
-check for min/max range in freesync calculation and handle it accordingly Signed-off-by: Eric <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: fix crash caused by incorrect index being used for arrayDmytro Laktyushkin1-1/+1
Signed-off-by: Dmytro Laktyushkin <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: FreeSync Auto Sweep SupportEric Cook2-49/+198
Implement core support to allow for FreeSync Auto Sweep to work Signed-off-by: Eric Cook <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: PSR RefactorSylvia Tsai1-3/+11
- Refacotr PSR to follow correct module pattern - fix eDP only working on sink index 0. Signed-off-by: Sylvia Tsai <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Make sure v_total_min and max not less than v_total.Yongqiang Sun1-0/+12
Signed-off-by: Yongqiang Sun <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: FreeSync LFC MIN/MAX update on current frameEric Cook1-28/+39
- Update BTR/LFC logic so that V_TOTAL_MIN/MAX will take affect on current frame - Add in FreeSync update to MPO code path Signed-off-by: Eric Cook <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: sometime VtotalMin less than VTotal (rounding issue)Charlene Liu1-6/+6
Signed-off-by: Charlene Liu <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Jordan Lazare <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Fix 64-bit division, yet againHarry Wentland1-4/+11
Also make the code somewhat more readable. Signed-off-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Set ignore_msa_timing flag for freesync modesSylvia Tsai1-1/+5
- Set ignore_msa_timing_param to 1 only for modes that can support freesync Signed-off-by: Sylvia Tsai <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Fix compile warningsAnthony Koo1-4/+3
1. Fix init of integer 2. Fix mixed declarations Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Disable Modules at RuntimeAnthony Koo2-36/+65
Add NULL check in modules Signed-off-by: Anthony Koo <[email protected]> Acked-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Remove unused color and power modulesHarry Wentland6-4275/+0
Signed-off-by: Harry Wentland <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Fix color module crash when hotplug monitors.Anthony Koo1-134/+175
Assume we have two monitors, and monitor 0 is unplugged. This shifts the internal state of index 1 to index 0 by memcpy. This means there are two copies of the gamma pointer previously owned by state[1]. When hotplug occurs, this re-assigns the new display with state[1], which has some garbage left over from before, including the gamma pointer. We should correctly clear unused states and re-initialize correctly. Also, due to async nature of the hotplug and other events like commit, we also need to safe guard against sink that has been removed. Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Set gamma to NULL at releaseYongqiang Sun1-5/+3
Signed-off-by: Yongqiang Sun <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: DAL3: HDR10 Infoframe encodingAndrew Wong2-24/+12
- Add HDR metadata struct - Add register programming calculations - Added HDR metadata to surface and update_surface - Add HDR info packet programming for DP port Signed-off-by: Andrew Wong <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Fix licensing headerHarry Wentland2-19/+42
Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Implement gamma correction using input LUTAric Cyr1-3/+3
The dc_gamma in dc_surface will be programmed to the input LUT if provided. If dc_gamma is not provided in dc_surface regamma may be used to emulate gamma. Some refactor and cleanup included as well. Signed-off-by: Aric Cyr <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Reset gamma to NULL after releaseAnthony Koo1-1/+3
Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Framework for degamma and regramma through color moduleAmy Zhang3-94/+598
Signed-off-by: Amy Zhang <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Refactor to move gamma correction to moduleAnthony Koo2-0/+81
Refactor part 4 - Moving input gamma correction programming into color module DM will translate to dc_gamma structure, but programming will be moved into the color module. Later, this will allow gamma correction to be added on top of in/out transfer function curves. Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Refactor to move color helper into moduleAnthony Koo3-2/+251
Refactor part 2 - Moving color helper into color module The color module will need table defined in the helper in order to calculate the logical regamma curve, and also to fully handle gamut remapping. Signed-off-by: Anthony Koo <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Retrieve windowed fullscreen stateAndrew Wong1-0/+3
- Retrieve windowed fullscreen state when getting freesync params. Signed-off-by: Andrew Wong <[email protected]> Reviewed-by: Anthony Koo <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-09-26drm/amd/display: Fix warning in freesync moduleHarry Wentland1-0/+3
Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Tony Cheng <[email protected]> Acked-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>