Tony Cheng
a32a7708ae
drm/amd/display: add option to disable DCC for DCC 128b request
...
1. reverts commit e67f51012740 ("dc: temp disable DCC on high res.")
- default still DCC enabled
2. add debug options to decide how DCC is disabled
- disable DCC
- disable DCC if DCC requires 128b (aka. half) request
-- observed compressed data corruption result in screen corruption in
full (256b) request while half (128b) would cause DCN to hang, result in
DF hang
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-10-21 16:43:36 -04:00
Tony Cheng
db64fbe732
drm/amd/display: enable optional pipe split for single display
...
also refactor debug option. now pipe_split_policy are
dynamic = no hack around dcn_calcs. will split based on HW recommendation
avoid = avoid split if we can support the config with higher voltage
avoid_multi_display = allow split with single display output.
force_single_disp_pipe_split
force single display to pipe split to improve stutter efficiency
by using DET buffers using 2 HUBP.
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-10-21 16:43:30 -04:00
Charlene Liu
e778915c91
drm/amd/display: temp disable DCC on high res.
...
Signed-off-by: Charlene Liu <charlene.liu@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-10-21 16:43:24 -04:00
Yongqiang Sun
56e6ed4561
drm/amd/display: Only reset top pipe back 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-10-21 16:43:13 -04:00
Yongqiang Sun
671a6246e0
drm/amd/display: Early return when turn off a plane.
...
In case of two monitor connected and turn off one of the monitors,
OTG0 is locked after graphic plane off due to redundant programming
front end regs.
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-10-21 16:43:07 -04:00
SivapiriyanKumarasamy
69b516c91c
drm/amd/display: Program stream's csc matrix instead of using default
...
Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@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-10-21 16:43:02 -04:00
Wenjing Liu
e4ba6335cd
drm/amd/display: update link type to mst before topology discovery
...
[Description]
link type is not updated before mst topology discovery.
This causes issue when branch device response to link address after before
the start topology discovery event finishes.
[Solution]
update link type to mst before topology discovery
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-10-21 16:42:55 -04:00
Eric Yang
fcbbe3da0a
drm/amd/display: Use active + border for bw validation
...
When doing SLS, KMD gives us clipped v_addressable with
border. This results in bw validation failure.
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-10-21 16:42:48 -04:00
Yongqiang Sun
d596e5d08d
drm/amd/display: Fixed incorrect return value for validaton
...
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-10-21 16:42:43 -04:00
Hersen Wu
4f4ee68686
drm/amd/display: screen flickers when connected to ext monitor in clone
...
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com >
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com >
Acked-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-21 16:42:38 -04:00
Tony Cheng
4d1a562659
drm/amd/display: version 3.1.02
...
Signed-off-by: Tony Cheng <tony.cheng@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-21 16:42:33 -04:00
Yongqiang Sun
e750d56d2c
drm/amd/display: Fixed validation return wrong result.
...
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-10-21 16:42:28 -04:00
Charlene Liu
6d732e7917
drm/amd/display: add hubp/dpp pg debug key
...
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-10-21 16:42:23 -04:00
Charlene Liu
19af33aca4
drm/amd/display: make sure BL off to mainlink off has enough time
...
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-10-21 16:42:18 -04:00
Ken Chalmers
5df921d4c0
drm/amd/display: fix ASSERT() caused by missing registers.
...
Signed-off-by: Ken Chalmers <ken.chalmers@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-10-21 16:42:12 -04:00
Yue Hin Lau
dbaed8037c
drm/amd/display: edp backlight regression fix
...
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-10-21 16:42:07 -04:00
Yue Hin Lau
5eefbc4017
drm/amd/display: moving backlight registers to hwsequencer
...
Signed-off-by: Yue Hin Lau <Yuehin.Lau@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-10-21 16:42:02 -04:00
Eric Bernstein
62bf6e9b29
drm/amd/display: update blending mode and set output denorm
...
Signed-off-by: Eric Bernstein <eric.bernstein@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-10-21 16:41:56 -04:00
Eric Yang
904aa42e77
drm/amd/display: add back removed hack for mpcc add
...
A previous changed removed the hack to match mpcc_idd
with mi instance. This causes pstate hang on resume
from hibernate for yet unknown reason. Add the hack
back for now to work around the issue. More debugging
required in init_hw to root cause the hang.
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-10-21 16:41:50 -04:00
Wenjing Liu
25bab0da8f
drm/amd/display: set cp25201 to use TPS4
...
[Description]
hbr2 compliance eye output is unstable
(toggling on and off) with debugger break.
This caueses intermittent PHY automation failure.
Need to look into the root cause later
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-10-21 16:41:43 -04:00
Yue Hin Lau
d53d7866a7
drm/amd/display: removing remaining register definitions work around
...
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-10-21 16:41:38 -04:00
Andrew Jiang
68d77dd821
drm/amd/display: power_down_Hw need signal type to turnoff backlight
...
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-10-21 16:41:32 -04:00
ShihChen Chen
4b7e7e2b1b
drm/amd/display: make tile changing run at ISR
...
Signed-off-by: ShihChen Chen <ShihChen.Chen@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-10-21 16:41:27 -04:00
Bhawanpreet Lakha
bc6828e0e6
drm/amd/display: Refactor dc_update_planes_and_stream.
...
Split update_planes_and_stream_state (split Software and Hardware
programming) as the state is already build, so we only need to
program the hardware
Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com >
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-10-21 16:41:21 -04:00
Yue Hin Lau
eade83503a
drm/amd/display: fixing register includes
...
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-10-21 16:41:03 -04:00
Eric Bernstein
7f4a7253b1
drm/amd/display: update mpc add/remove functions
...
Signed-off-by: Eric Bernstein <eric.bernstein@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-10-21 16:40:45 -04:00
Roman Li
98b49c2f9c
drm/amd/display: fix multi-display on CZ
...
- fixed wrong index in dce110_validate_surface_sets()
- formatted for better readability
Signed-off-by: Roman Li <Roman.Li@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
igned-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-21 16:40:39 -04:00
Yue Hin Lau
024f0607cf
drm/amd/display: Refactor dcn10_dpp_cm_helper to dcn10_cm_common
...
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-10-21 16:40:33 -04:00
Martin Tsai
7d58e72149
drm/amd/display: To prevent detecting new sink from spurious HPD
...
Signed-off-by: Martin Tsai <martin.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-10-21 16:40:21 -04:00
Roman Li
e008b0bcc6
drm/amd/display: Add FBC on/off to front-end programming
...
- Fixing text mode for cases when VT-switch doesn't result
in timing change
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-10-21 16:40:13 -04:00
Eric Yang
1049e39fa6
drm/amd/display: fix usb-c dongle regression
...
A previous change moved link_disconnect_sink after dpcd read,
this causes the sink count to be overwritten which in turn causes
another detection to be triggered in the short pulse handler, which
brings down the display.
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-10-21 16:40:07 -04:00
Andrew Jiang
5088cc98f5
drm/amd/display: Force always scale chroma, set always_scaled to false
...
This allows us to not always have scaling on, which causes issues with
validation and causes the text to blur slightly.
Signed-off-by: Andrew Jiang <Andrew.Jiang@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-10-21 16:40:00 -04:00
Hersen Wu
6bf520280f
drm/amd/display: Driver message to SMU to indicate display off
...
Signed-off-by: Hersen Wu <hersenxs.wu@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-10-21 16:39:25 -04:00
Martin Tsai
2a0b4d858f
drm/amd/display: To prevent detecting new sink from spurious HPD
...
Signed-off-by: Martin Tsai <martin.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-10-16 21:47:06 -04:00
Alex Deucher
4770b18493
drm/amd/display/dc: drop dm_delay_in_microseconds
...
Use udelay directly.
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-17 10:43:05 +10:00
Dave Airlie
8ee5702afd
amdgpu/dc: use kref for dc_state.
...
I'm not a huge fan of those copying around refcounts bits, might
want to consider alternates, but this should work for now.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:10:25 -04:00
Dave Airlie
cb56aceabd
amdgpu/dc: convert dc_sink to kref.
...
Refcounts use krefs.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:10:08 -04:00
Dave Airlie
bfe0feb143
amdgpu/dc: convert dc_stream_state to kref.
...
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:09:50 -04:00
Dave Airlie
4d090f0fae
amdgpu/dc: use kref for dc_plane_state.
...
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:09:34 -04:00
Dave Airlie
5c58ab0bd6
amdgpu/dc: convert dc_gamma to kref reference counting.
...
Rolling your own reference counting is frowned upon.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:09:10 -04:00
Dave Airlie
9305213256
amdgpu/dc: convert dc_transfer to use a kref.
...
Rolling your own atomic ref counts is frowned upon.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:08:55 -04:00
Dave Airlie
5d15ae23f8
amdgpu/dc: kill a bunch of dead code.
...
None of this code is used currently.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:08:26 -04:00
Dave Airlie
44858055bb
amdgpu/dc: set a bunch of functions to static.
...
All of these are unused outside the file they are in.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:07:58 -04:00
Dave Airlie
c6fa531809
amdgpu/dc: kill some deadcode in dc core.
...
Moves one function to an inline, but kills a bunch of deadcode.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:07:39 -04:00
Dave Airlie
c1199962f5
amdgpu/dc: fix indentation on a couple of returns.
...
These were misaligned.
found by the cocci ifcol script.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:07:06 -04:00
Dave Airlie
d029810caa
amdgpu/dc: kfree already checks for NULL.
...
Don't bother checking for it.
Found with the cocci ifnullfree.cocci script.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:05:03 -04:00
Dave Airlie
5667ff5c11
amdgpu/dc: fix a bunch of misc whitespace.
...
This just aligns a few things with kernel style.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:04:42 -04:00
Dave Airlie
2016b641f4
amdgpu/dc: drop hw_sequencer_types.h
...
This isn't used or required.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:03:20 -04:00
Dave Airlie
bd42a6f451
amdgpu/dc: drop dce110_types.h
...
Doesn't appear to be used.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:02:57 -04:00
Dave Airlie
23d433fabe
amdgpu/dc: use kernel ilog2 for log_2.
...
This should produce the same result.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-10-06 13:00:27 -04:00