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
Anthony Koo
d66cf5f501
drm/amd/display: implement DXGI Gamma Ramps
...
Support for gamma correction ramp in Floating Point format
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:16:20 -04:00
Corbin McElhanney
665da60f23
drm/amd/display: Add more pstate sanity checks
...
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:19 -04:00
Tony Cheng
eb4e33b7c9
drm/amd/display: log underflow
...
as well as convert output in ref_cycle to nano sec
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Logatharshan Thothiralingam <Logatharshan.Thothiralingam@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:19 -04:00
Tony Cheng
713950115b
drm/amd/display: log HW state when we about to encounter DF DPM hang
...
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:18 -04:00
Charlene Liu
c10efbd371
drm/amd/display: fix eDP power down sequence
...
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:18 -04:00
Harry Wentland
2a8f6ccb66
drm/amd/display: Clean up cursor code
...
This will also fix disappearing cursor after resume.
With this change we'll set cursor attributes, as well as
cursor position on every update. The impact is minor.
These are sample logs that show timestamps at beginning
and end of atomic_check, commit_tail, handle_cursor_update,
and before and after cursor_attribute and cursor_position
calls:
[ 66.800353] hwhw: begin of check
[ 66.800377] hwhw: end of check
[ 66.800428] hwhw: begin of commit_tail
[ 66.800441] hwhw: begin of cursor
[ 66.800449] hwhw: begin of cursor_attr
[ 66.800468] hwhw: end of cursor_attr
[ 66.800484] hwhw: end of cursor_positionr
[ 66.800501] hwhw: end of commit_tail
[ 66.807139] hwhw: begin of check
[ 66.807160] hwhw: end of check
[ 66.807206] hwhw: begin of commit_tail
[ 66.807217] hwhw: begin of cursor
[ 66.807225] hwhw: begin of cursor_attr
[ 66.807357] hwhw: end of cursor_attr
[ 66.807374] hwhw: end of cursor_positionr
[ 66.807392] hwhw: end of commit_tail
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:17 -04:00
Yongqiang Sun
9ee20ee611
drm/amd/display: Implement tmz surface.
...
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:16 -04:00
Charlene Liu
0d18d7bb80
drm/amd/display: fix dlg ttu calculation input
...
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:16 -04:00
Charlene Liu
746e082fdd
drm/amd/display: update predefined latency for Rv1_F0
...
Signed-off-by: Charlene Liu <charlene.liu@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:15 -04:00
Bhawanpreet Lakha
a7b06724ee
drm/amd/display: Fix comment placement for when new_stream is null
...
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:15 -04:00
Dmytro Laktyushkin
497de04ffe
drm/amd/display: do not report min_memory_clock_khz to pplib for dce8 & 10
...
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-09-26 18:16:14 -04:00