Roman Li
57d972d492
drm/amd/display: Fix FBC disable for stereo
...
Removed FBC disable from dc_enable_stereo().
It should be implemented in stereo_setup callback, which is not
implemented yet. Otherwise it always disable FBC regardless
if stereo supported or not.
Signed-off-by: Roman Li <Roman.Li@amd.com >
Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:51 -04:00
Corbin McElhanney
214435ff13
drm/amd/display: Log OTG registers with dcn10 hw state
...
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:16:50 -04:00
Charlene Liu
b05dee52ef
drm/amd/display: fix not enter/exit PSR with latest driver/SBIOS
...
Signed-off-by: Charlene Liu <charlene.liu@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:49 -04:00
Roman Li
1bd4653a29
drm/amd/display: increase polling interval for fbc status update
...
1.Fixing error message:
"wait counter exceeded, changes to HW not applied"
2. Added "FBC status changed to 0/1" logs
Signed-off-by: Roman Li <Roman.Li@amd.com >
Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:49 -04:00
Harry Wentland
42f8ffa108
drm/amd/display: Enable Vega by default.
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:48 -04:00
Leo (Sunpeng) Li
d4d4a64574
drm/amd/display: Move copy_construct from state_alloc to atomic_check.
...
Previously atomic_check assumed that dc_state is allocated and filled
in. This is not the case when we hit EDEADLK and have to backup and
retry.
We could change atomic_state_clear but that revealed some other
problems. For now let's create and construct dc_state in atomic_check.
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:16:48 -04:00
Leo (Sunpeng) Li
81c90ec034
drm/amd/display: Refactor dc_state creation into a function.
...
For less repetition and easy debugging.
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:47 -04:00
Andrey Grodzovsky
1dc904974e
drm/amd/display: Per stream validate_context build v2.
...
Until now new context would start as empty, then populated
with exsisting pipes + new. Now we start with duplication
of existing context and then add/delete from the context
pipes as needed.
This allows to do a per stream resource
population, start discarding dc_validation_set
and by this brings DC closer to to DRM.
v2: Add some fixes and rebase.
Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@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:46 -04:00
Tony Cheng
a185048ca8
drm/amd/display: refactor pplib/smu communication
...
new per SoC interface instead legacy interface with lots of un-used
field that only cause confusion
model pp_smu like one of our HW objects with func_ptr interface
to call into it. struct pp_smu as handle to call pp/smu
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Jun Lei <Jun.Lei@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:46 -04:00
Zeyu Fan
1e8635ea0e
drm/amd/display: Implement HDMI retimer settings for RV AM4 support.
...
Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com >
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:45 -04:00
Yue Hin Lau
0cb8a88122
drm/amd/display: move vm registers to hwsequencer
...
Signed-off-by: Yue Hin Lau <Yuehin.Lau@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:44 -04:00
Tony Cheng
992fe94c1b
drm/amd/display: remove fake address reporting when blank
...
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:44 -04:00
Roman Li
be7c97f6a7
drm/amd/display: Fix FBC compilation
...
- Fixing compilation with ENABLE_FBC flag
which was broken after flattening core_dc to dc
Signed-off-by: Roman Li <Roman.Li@amd.com >
Reviewed-by: Jerry Zuo <Jerry.Zuo@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:43 -04:00
Harry Wentland
b4c8e6da39
drm/amd/display: Leave DCN config guard around fpu header
...
See
https://lists.freedesktop.org/archives/dri-devel/2017-August/149938.html
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:43 -04:00
Charlene Liu
71afd9d14f
drm/amd/display: eDP power sequence T9 fail
...
Signed-off-by: Charlene Liu <charlene.liu@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:16:42 -04:00
Yongqiang Sun
4e772ae5f9
drm/amd/display: blank otg before power gate front end.
...
Signed-off-by: Yongqiang Sun <yongqiang.sun@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:41 -04:00
Dmytro Laktyushkin
641106d3fa
drm/amd/display: Use MAX_PIPES for DTO reg arrays
...
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:16:41 -04:00
Bhawanpreet Lakha
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
Dmytro Laktyushkin
503a7c6f25
drm/amd/display: Use function pointer for update_plane_addr
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:39 -04:00
Charlene Liu
b8e9eb7259
drm/amd/display: fix eDP bootup/S4 backlight on
...
also pass-in correct dispclk tor DMCU
Signed-off-by: Charlene Liu <charlene.liu@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:16:39 -04:00
Bhawanpreet Lakha
65111f25f1
drm/amd/display: change dcn_ip and dcn_soc into pointers
...
-Change dcn_ip into pointer
-Change dcn_soc into pointer
This is needed for flattening of core_dc into dc, as without
this the diags build fails
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:38 -04:00
Corbin McElhanney
e771aae02b
drm/amd/display: Add comment explaining context free
...
This comment explains a previous change that adds some complexity
to the context free in dc:
commit 9ad58779a895 ("drm/amd/display: Fix accessing freed memory")
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:16:38 -04:00
Bhawanpreet Lakha
77a4ea53fd
drm/amd/display: change bw_dceip and bw_vbios into pointers
...
-Change bw_calcs_dceip into pointer
-Change bw_calcs_vbios into pointer
This is needed for flattening of core_dc into dc, as without this the
diags build fails
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:37 -04:00
Duke Du
391e20d841
drm/amd/display: add display write back(DWB)
...
Signed-off-by: Duke Du <Duke.Du@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:36 -04:00
Jerry Zuo
e8cd26434d
drm/amd/display: Use atomic types for ref_count
...
Current ref_count inc/dec is not guarded by locks which leads to
a raced condition where two threads try to access the variable
at the same time. In this case, both might act on the same cached
value and inc/dec from the same value, rather than inc/dec by 2.
Signed-off-by: Jerry Zuo <Jerry.Zuo@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:36 -04:00
Roman Li
f81483c4cc
drm/amd/display: fix gamma distortion on Vega
...
Added missing reg shift/masks to soc base
Signed-off-by: Roman Li <Roman.Li@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:35 -04:00
Alex Deucher
17b7cf8c55
drm/amdgpu: disable DC on KB/ML for now
...
Until I've had time to test it better.
bug: https://bugs.freedesktop.org/show_bug.cgi?id=102372
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:35 -04:00
Harry Wentland
153ae53232
drm/amd/display: Add a TODO list
...
Signed-off-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 18:16:34 -04:00
Alex Deucher
9355c0e851
drm/amdgpu/cik: add IP modules for DC for APUs
...
Enable DC for DCE8 APUs.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:33 -04:00
Alex Deucher
7992a6290a
drm/amd/disply/dc: add resource support for DCE8 APUs (v2)
...
Add the appropriate resources for APUs:
KV: 4 pipes, 7 dig, 3 PPLLs
KB/ML: 2 pipes, 6 dig, 2 PPLLs
v2: rebase changes
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:33 -04:00
Alex Deucher
ebfdf0d077
drm/amd/display/dc: add DCE_VERSION for DCE8 APUs
...
DCE 8.1 = Kaveri
DCE 8.3 = Kabini/Mullins
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:32 -04:00
Alex Deucher
ea062558fd
drm/amd/display/dc: add DIGG for KV
...
KV has 7 possible DIG blocks.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:32 -04:00
Alex Deucher
0d6fbccb22
drm/amdgpu: add DCE8 APUs to dc_supported check
...
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:31 -04:00
Alex Deucher
cd4b356f3a
drm/amd/display/dm: add KV, KB, ML (v2)
...
Add DCE8 APUs to display manager.
v2: rebase changes
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:30 -04:00
Alex Deucher
2cf5a5e6ad
drm/amd/display/dc: make dce120_link_encoder_create static
...
Only used in dce120_resource.c.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:30 -04:00
Alex Deucher
5394eb8213
drm/amd/display/dc: Make dce110_validate_bandwidth static (v2)
...
Not used outside of the dce110_resource.c.
v2: make a bunch of other functions static as well.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:29 -04:00
Harry Wentland
533ed6c708
drm/amd/display: Fix warnings about uninitialized use
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:29 -04:00
Harry Wentland
7483bed45d
drm/amd/display: Pass correct number for gamma entries
...
This was broken by "implement DXGI Gamma Ramps"
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:28 -04:00
Harry Wentland
a2607aef3d
drm/amd/display: Fix regression in dce110_apply_ctx_for_surfaces
...
Caused by "add programming for 0 plane case" which was tested on DCN but
not on DCE.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:27 -04:00
Corbin McElhanney
f0c4d9977a
drm/amd/display: fix HDMI 12bits last two bits are zero issue
...
(FF-158) -[FF N-1] HDMI Deep Color Mode incorrect bit depth:
FMT_DYNAMIC_EXP_EN is being reset to 0
Signed-off-by: Charlene Liu <charlene.liu@amd.com >
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:27 -04:00
Tony Cheng
233dcd2092
drm/amd/display: log watermarks
...
Signed-off-by: Tony Cheng <tony.cheng@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:26 -04:00
Yongqiang Sun
9d6f264b56
drm/amd/display: Workaround for underflow.
...
Signed-off-by: Yongqiang Sun <yongqiang.sun@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:26 -04:00
Corbin McElhanney
08b8ccfbcb
drm/amd/display: Fix hw state logging regression
...
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:16:25 -04:00
Harry Wentland
e1403629d8
drm/amd/display: Couple newline fixes
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:24 -04:00
Harry Wentland
0627bbd30f
drm/amd/display: Use public plane destroy helper
...
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:24 -04:00
Tony Cheng
8a5d82451e
drm/amd/display: use some sensible time out
...
40s time out is not sensible.
also make all udelay poll happen more frequently since CPU is busy anyways
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:23 -04:00
Corbin McElhanney
5aa72db72c
drm/amd/display: Fix accessing freed memory
...
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:16:23 -04:00
Yongqiang Sun
cbb4d72e29
drm/amd/display: Clear water mark change request bit before programing.
...
Signed-off-by: Yongqiang Sun <yongqiang.sun@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:22 -04:00
Eric Yang
3e9ad6164b
drm/amd/display: add programming for 0 plane case
...
Signed-off-by: Eric Yang <Eric.Yang2@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:21 -04:00
Wenjing Liu
f334073ae3
drm/amd/display: Move verify link cap after read edid
...
DP link layer test 400.1.1 fails intermittently.
The test device will pull hpd low immediately
after verify link cap.
Driver reads edid when hpd low that causes the test to fail.
Move read edid before verify link cap, so driver will
read edid before starting link training
Signed-off-by: Wenjing Liu <Wenjing.Liu@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:21 -04:00