a3e1737ed6
drm/amd/display: Implement stats logging
...
Stats will be used for debug purposes
Signed-off-by: Anthony Koo <Anthony.Koo@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-14 15:08:47 -05:00
6b7dcb536e
BackMerge tag 'v4.15-rc4' into drm-next
...
Linux 4.15-rc4
Daniel requested it to fix some messy conflicts.
2017-12-19 21:37:24 +10:00
2a06e0a5a4
drm/amd/display: Remove unnecessary dc_stream vtable
...
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 <harry.wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:45 -05:00
e2874a3c8c
drm/amdgpu: add license to Makefiles
...
Was missing license text.
Acked-by: Harry Wentland <harry.wentland@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-04 11:47:55 -05:00
2004f45ef8
drm/amd/display: Use kernel alloc/free
...
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 <alexander.deucher@amd.com >
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-28 16:46:15 -04:00
1565904542
drm/amd/display: Clean up flattening core_dc to dc
...
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 <Bhawanpreet.Lakha@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:17:07 -04:00
fb3466a450
drm/amd/display: Flattening core_dc to dc
...
-Flattening core_dc to dc
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:40 -04:00
0971c40e18
drm/amd/display: Rename dc_stream to dc_stream_state
...
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 <harry.wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:04 -04:00
4fa086b9b6
drm/amd/display: Roll core_stream into dc_stream
...
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:15:46 -04:00
2233ec72b3
drm/amd/display: Add regkey for DRR control for internal panel
...
Also need to change default to off
Signed-off-by: Anthony Koo <anthony.koo@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:15:16 -04:00
1a87fbfee0
drm/amd/display: Re-enable Vsync Interrupts for Gradual Refresh Ramp
...
- 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 <Amy.Zhang@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:08:27 -04:00
d09fec0f94
drm/amd/display: add hyst frames for fixed refresh
...
Signed-off-by: Anthony Koo <anthony.koo@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:08:23 -04:00
fea0f581ab
drm/amd/display: Temporary disable BTR FreeSync support for now
...
Reduce timer tick interval for the static screen
Signed-off-by: Anthony Koo <anthony.koo@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:07:54 -04:00
fc82c5cb30
drm/amd/display: Fix DRR Enable on Desktop
...
- 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 <Amy.Zhang@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:07:51 -04:00
6838161c72
drm/amd/display: fix freesync not working on raven
...
Signed-off-by: Corbin McElhanney <corbin.mcelhanney@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:07:05 -04:00
ac5c294719
drm/amd/display: prevent assert on error of 1 in calc_freesync_range
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:07:01 -04:00
ba624cddbc
drm/amd/display: Assign stream to map before we need it
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:46 -04:00
9e594f4c3f
drm/amd/display: Add support for FreeSync on eDP to module
...
Signed-off-by: Eric <eric.cook@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:44 -04:00
7cc9e7a68a
drm/amd/display: Check for Zero Range in FreeSync Calc
...
-check for min/max range in freesync calculation and handle it accordingly
Signed-off-by: Eric <eric.cook@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:43 -04:00
1c29313b96
drm/amd/display: fix crash caused by incorrect index being used for array
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:42 -04:00
72ada5f769
drm/amd/display: FreeSync Auto Sweep Support
...
Implement core support to allow for FreeSync Auto Sweep to work
Signed-off-by: Eric Cook <Eric.Cook@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:40 -04:00
94267b3df7
drm/amd/display: PSR Refactor
...
- Refacotr PSR to follow correct module pattern
- fix eDP only working on sink index 0.
Signed-off-by: Sylvia Tsai <sylvia.tsai@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:36 -04:00
6c626ffb1b
drm/amd/display: Make sure v_total_min and max not less than v_total.
...
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:06:34 -04:00
09e2d07f9d
drm/amd/display: FreeSync LFC MIN/MAX update on current frame
...
- 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 <Eric.Cook@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:23:57 -04:00
3e337d15bf
drm/amd/display: sometime VtotalMin less than VTotal (rounding issue)
...
Signed-off-by: Charlene Liu <charlene.liu@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:18:01 -04:00
4a9054dda6
drm/amd/display: Fix 64-bit division, yet again
...
Also make the code somewhat more readable.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:15:02 -04:00
8f16f28936
drm/amd/display: Set ignore_msa_timing flag for freesync modes
...
- Set ignore_msa_timing_param to 1 only for modes that can support freesync
Signed-off-by: Sylvia Tsai <sylvia.tsai@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:14:23 -04:00
c7141c47d3
drm/amd/display: Fix compile warnings
...
1. Fix init of integer
2. Fix mixed declarations
Signed-off-by: Anthony Koo <anthony.koo@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:12:34 -04:00
7a1c37e00a
drm/amd/display: Disable Modules at Runtime
...
Add NULL check in modules
Signed-off-by: Anthony Koo <anthony.koo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:09:52 -04:00
4b5752c742
drm/amd/display: Retrieve windowed fullscreen state
...
- Retrieve windowed fullscreen state when getting freesync params.
Signed-off-by: Andrew Wong <andrew.wong1@amd.com >
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:04:55 -04:00
eaf9094475
drm/amd/display: Fix warning in freesync module
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:04:25 -04:00
4562236b3b
drm/amd/dc: Add dc display driver (v2)
...
Supported DCE versions: 8.0, 10.0, 11.0, 11.2
v2: rebase against 4.11
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 17:01:32 -04:00