Commit Graph

708436 Commits

Author SHA1 Message Date
Yue Hin Lau 8feabd03d3 drm/amd/display: rename struct mem_input to hubp for dcn
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:48:26 -04:00
Eric Bernstein 0c63c115f2 drm/amd/display: group DCN watermark registers
Signed-off-by: Eric Bernstein <eric.bernstein@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-10-21 16:48:21 -04:00
Tony Cheng 4e9ba34f7b drm/amd/display: dal 3.1.04
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-10-21 16:48:16 -04:00
Harry Wentland 410d0b39e2 drm/amd/display: Ignore wrong tautological warning
Some of our HW calcs functions compares a var against
itself to check for NaN. Gcc isn't fond of it and wrongfully
warns about a tautological comparison. Disable this check
for dcn_calcs_math.c.

Signed-off-by: Harry Wentland <harry.wentland@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:48:10 -04:00
Eric Yang 8459f633b6 drm/amd/display: Handle case when stream not found in set_dpms
When validate with context fail to add stream to the context, we have
a case where set_dpms won't be able to find the stream that need to
be disabled.

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:48:05 -04:00
Hersen Wu c196cbe065 drm/amd/display: add dpms state to DC follow up
Signed-off-by: Hersen Wu <hersenxs.wu@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:47:59 -04:00
Yongqiang Sun 067c878a22 drm/amd/display: Fixed switching mode half screen gamma incorrect.
Half screen gamma setting and cursor are incorrect
	when switching mode through win+p due to wrong programming
	gamma sequence (In case of bottom pipe, gamma and cursor are
	programmed before front end programmed, pipe is power gated).

	change:
	1. Cache curor attributes to stream
	2. Move set gamma and cursor inside front end
	   programming.

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:47:52 -04:00
Hersen Wu d050f8ed14 drm/amd/display: add dpms state to DC
- avoid eDP screen flash 4 times when resume from s3
- improve s3 and boot time

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:47:47 -04:00
Dmytro Laktyushkin 8e7095b909 drm/amd/display: add max_video_width cap to dc
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-10-21 16:47:41 -04:00
Dmytro Laktyushkin bac4c55927 drm/amd/display: block video planes >4k on dcn10
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-10-21 16:47:37 -04:00
Bhawanpreet Lakha ff79cbdcce drm/amd/display: increase pstate wait timeout
For linux it takes longer than 40us so increasing it to
200us. Also added debug prints regarding the change

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@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:47:31 -04:00
Charlene Liu 73fb63e74f drm/amd/display: reject 3D mode based on static debug flag.
Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:47:27 -04:00
Bhawanpreet Lakha 458e9d0387 drm/amd/display: fix re-enabling stutter for raven
We were overwriting the whole register which was re-enabling
stutter for raven. Now we are reading the register then setting
the values only for pstate.

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@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:47:21 -04:00
Charlene Liu f6cb588a42 drm/amd/display: Add debug flag for VSR support
Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:47:16 -04:00
Yongqiang Sun 309c42efda drm/amd/display: wa to program split pipedegamma regs after mode set.
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:47:11 -04:00
Yongqiang Sun 13ab1b4415 drm/amd/display: Fixed extend to second screen mode hang
1. Fixed acquire free split pipe bug.
	2. Change return value for dc_add_stream_to_ctx
	   from bool to enum.
	4. Remove redundant apply_ctx_for_surface calling
	5. Unlock pipe after back end programming.

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:47:05 -04:00
Charlene Liu 3af89b96b2 drm/amd/display: Add stereo_support debug flag
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:47:01 -04:00
Eric Bernstein 734a092b1f drm/amd/display: clean up dcn10 dpp after HW review
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:46:55 -04:00
Jerry Zuo 365c7c975d drm/amd/display: Remove drm_modeset_lock in MST code
Locks are no longer needed since the drm framework takes care of
correct locking.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
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-10-21 16:46:50 -04:00
Jerry Zuo 4bd29c3498 drm/amd/display: Do not access fbdev helper members
Original code is no longer needed and tested without loop.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
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-10-21 16:46:45 -04:00
Roman Li c018b04b7c drm/amd/display: Fix irq enable/disable on resume.
Fixing loop boundaries in irq enable/disable on resume.

Signed-off-by: Roman Li <Roman.Li@amd.com>
Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:46:40 -04:00
Yue Hin Lau e4b3b5ccd9 drm/amd/display: Making hubp1_program_surface_config public
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:46:34 -04:00
Charlene Liu 66bfd4fd17 drm/amd/display: arbitration find the matching dig-az first.
[Description]
this change is in branch already.
without this change, after resume, az_inst might swapped.

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:46:27 -04:00
Yue Hin Lau b7901be0ed drm/amd/display: renaming mem input to hubp
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:46:22 -04:00
Charlene Liu 4176664b1f drm/amd/display: audio dynamic resource acquired related
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:46:16 -04:00
Yongqiang Sun 50d4cfdc11 drm/amd/display: Program front end first when set mode.
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:46:11 -04:00
Shirish S 3eab79163f drm/amd/display: make FBC configurable option
Currently FBC is guarded with ENABLE_FBC macro,
which needs to be manually enabled in Makefile.

This patch moves it to Kconfig so that there
wont be any need to additional patch to be carried
for enabling or disabling on every SoC.

Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:46:05 -04:00
Roman Li 9668727555 drm/amd/display: Fix hotplug after s3 resume.
On S3 resume the HPD6 irq source was not reenabled
due to loop boundary bug.

Signed-off-by: Roman Li <Roman.Li@amd.com>
Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:45:59 -04:00
Tony Cheng 6a2b691f09 drm/amd/display: wrong VM setting cause invalid DF request from DCN
fix typo in register field.  we are lucky the shift/mask is the same, no behavior change

add globals to experiment with using different VM settings

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:45:53 -04:00
Yongqiang Sun 0fc899b0f1 drm/amd/display: Enable double buffer as per vertical interrupt enabled.
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:45:48 -04:00
Dmytro Laktyushkin 09f2317be4 drm/amd/display: change dml vba cursor count define to correct one
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-10-21 16:45:43 -04:00
Dmytro Laktyushkin c81a351ab9 drm/amd/display: extract global sync params from vba
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-10-21 16:45:37 -04:00
Dmytro Laktyushkin cb94f78e36 drm/amd/display: add mode support check to dml vba code
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-10-21 16:45:31 -04:00
Dmytro Laktyushkin 6d04ee9dc1 drm/amd/display: Restructuring and cleaning up DML
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-10-21 16:45:24 -04:00
Harry Wentland 19b7fe4a48 Revert "amdgpu/dc: inline a bunch of float operations."
This reverts commit d1209512e0.

Unfortunately these clash with our DML update from the HW guys.

Rerolling this after the fact won't save us anything anymore,
unfortunately so we're back to non-inline for this.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:45:17 -04:00
Harry Wentland 378c4a2d60 Revert "amdgpu/dc: drop display_pipe_clocks.c."
This reverts commit b3fbdcec5e.

Unfortunately these clash with our DML update from the HW guys
as it's starting to get used now.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:45:10 -04:00
Harry Wentland 711b55f3fc Revert "amdgpu/dc: inline a bunch of the dml wrappers."
This reverts commit 3e8c3108da.

Unfortunately these clash with our DML update from the HW guys.
Will attempt to reroll them after.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:45:03 -04:00
Harry Wentland e168df36a8 Revert "amdgpu/dc: drop dml_util_is_420"
This reverts commit e5bcf3d83e.

Unfortunately these clash with our DML update from the HW guys.
Will attempt to reroll them after.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:44:56 -04:00
Harry Wentland 78109d230b Revert "amdgpu/dc: drop dml display_mode_support.c (v2)"
This reverts commit 5e0adbff08.

Unfortunately these clash with our DML update from the HW guys.
Will attempt to reroll them after.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:44:50 -04:00
Harry Wentland 07e9266593 Revert "amdgpu/dc: inline dml_round_to_multiple"
This reverts commit d8c893b44b.

Unfortunately these clash with our DML update from the HW guys.
Will attempt to reroll them after.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:44:42 -04:00
Yue Hin Lau c73b046f86 drm/amd/display: Expose some mem_input functions for reuse
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:44:37 -04:00
Charlene Liu ed23cba20d drm/amd/display: soc_bound_box -update DML based on HW.
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:44:32 -04:00
Eric Yang 441ad74173 drm/amd/display: Add override for reporting wm ranges
For verification of watermark select with SMU team, proper
implementation will follow

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:44:26 -04:00
Wenjing Liu dcf298c313 drm/amd/display: disconnect on HPD low even if edid is the same
[Description]
There are many occasions we need to retrieve sink capability and
notify connectivity change to os even if edid is not changed
on a HPD toggle.
(HDMI2.0 display needs re-enable link on every hpd,
display changes other capability outside from edid
 need to be queried again and possibly reset the mode, etc.)

In these cases we cannot keep the same sink without letting DM know.

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:44:19 -04:00
Tony Cheng 6512387a54 drm/amd/display: align DCLK to voltage level
in past program SMU will use all voltage headroom.  RV does not

if DAL need higher voltage for DCFCLK or DISPCLK, also increase FCLK
to improve stutter as voltage is already

Signed-off-by: Tony Cheng <tony.cheng@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-10-21 16:44:13 -04:00
Andrew Jiang 8740196935 drm/amd/display: Move power control from link encoder to hwsequencer
A recent commit moved the backlight control code along with the register
defines, but did not move the power control code. This along with
remnant fields in the dce110_link_enc_registers struct made it so that
the code still compiled, but any attempts to access the
LVTMA_PWRSEQ_STATE register led to reading from an address of 0. This
patch corrects that.

Also, rename blacklight_control to edp_backlight_control (Typo fix).

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:44:08 -04:00
Yue Hin Lau b87d78d6aa drm/amd/display: moving cursor functions from ipp to mem_input
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:44:03 -04:00
Jerry Zuo 60d671db1c drm/amd/display: Fix ref_count messed up issue
In the full update type, need to add ref_count to the newly
created dc_state->stream. It made mistake to add ref_count to
dc->current_state->stream which keeps adding up without release.

Signed-off-by: Jerry Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-10-21 16:43:57 -04:00
Tony Cheng 2e1cc33463 drm/amd/display: dal 3.1.03
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-10-21 16:43:52 -04:00
Tony Cheng 9f945eab79 drm/amd/display: fix bug in force_single_disp_pipe_split
should only lower dpp clock.

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:47 -04:00