platform/kernel/linux-rpi.git
7 years agodrm/amd/display: Fix context copy memory leak
Corbin McElhanney [Mon, 10 Jul 2017 19:52:10 +0000 (15:52 -0400)]
drm/amd/display: Fix context copy memory leak

This change corrects an error introduced in 355f123f. Instead of
using the copy constructor to assign the new context, we swap the
pointer.

Signed-off-by: Corbin McElhanney <corbin.mcelhanney@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>
7 years agodrm/amd/display: dal1.1 hwseq prog update
Dmytro Laktyushkin [Fri, 7 Jul 2017 15:24:13 +0000 (11:24 -0400)]
drm/amd/display: dal1.1 hwseq prog update

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>
7 years agodrm/amd/display: dal1.1 xfm prog update
Dmytro Laktyushkin [Fri, 7 Jul 2017 14:37:46 +0000 (10:37 -0400)]
drm/amd/display: dal1.1 xfm prog update

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>
7 years agodrm/amd/display: dal1.1 ipp prog update
Dmytro Laktyushkin [Thu, 6 Jul 2017 21:35:17 +0000 (17:35 -0400)]
drm/amd/display: dal1.1 ipp prog update

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>
7 years agodrm/amd/display: dal1.1 opp prog update
Dmytro Laktyushkin [Thu, 6 Jul 2017 19:58:25 +0000 (15:58 -0400)]
drm/amd/display: dal1.1 opp prog update

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>
7 years agodrm/amd/display: minor dcn10_hwseq clean up/refactor
Dmytro Laktyushkin [Thu, 6 Jul 2017 19:42:04 +0000 (15:42 -0400)]
drm/amd/display: minor dcn10_hwseq clean up/refactor

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>
7 years agodrm/amd/display: get dal1.1 to run
Dmytro Laktyushkin [Wed, 5 Jul 2017 16:00:28 +0000 (12:00 -0400)]
drm/amd/display: get dal1.1 to run

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>
7 years agodrm/amd/display: Fix MPO visual confirm
Anthony Koo [Thu, 6 Jul 2017 18:27:49 +0000 (14:27 -0400)]
drm/amd/display: Fix MPO visual confirm

1. Need to blend non-active area to show visual confirm borders
2. Set number of Visual Confirm lines based on pipe instance
3. Set Different colors representing surface format of bottom most plan

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>
7 years agodrm/amd/display: refactor dcn10 hw_sequencer to new reg access style
Dmytro Laktyushkin [Wed, 5 Jul 2017 10:57:49 +0000 (06:57 -0400)]
drm/amd/display: refactor dcn10 hw_sequencer to new reg access style

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>
7 years agodrm/amd/display: Refactor dc_commit_streams
Andrey Grodzovsky [Thu, 6 Jul 2017 17:53:15 +0000 (13:53 -0400)]
drm/amd/display: Refactor dc_commit_streams

Change it to sue dc_commit_context. dc_commit_context
is used directly from Linux DM.

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>
7 years agodrm/amd/display: call pplib to update clocks
Eric Yang [Thu, 6 Jul 2017 18:20:25 +0000 (14:20 -0400)]
drm/amd/display: call pplib to update clocks

Allow pplib to update fclk and dcfclk for different voltage levels.
PPlib's values for dispclk and phyclk is not correct, so we are not
getting it from them. fclk is currently not used correctly, although
does not effect the actual fclk we request.

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>
7 years agodrm/amd/display: Change how we disable pipe split
Eric Yang [Wed, 5 Jul 2017 19:30:18 +0000 (15:30 -0400)]
drm/amd/display: Change how we disable pipe split

Before this change, pipe split was disabled by bumping up dpp clock
bounding box for DPM level 0 and 1, this allows validation to pass
without splitting at a lower DPM level. This change reverts this
and instead lowers display clock at DPM level 0, this forces
configurations that need pipe split at DPM level 0 to go to
DPM level 1, where they can be driven without split.

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>
7 years agodrm/amd/display: block modes that require read bw greater than 30%
Eric Yang [Tue, 27 Jun 2017 16:09:01 +0000 (12:09 -0400)]
drm/amd/display: block modes that require read bw greater than 30%

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>
7 years agodrm/amd/display: move number of memory channel calc out of pplib call
Eric Yang [Tue, 4 Jul 2017 18:13:25 +0000 (14:13 -0400)]
drm/amd/display: move number of memory channel calc out of pplib call

Move number of memory channel calculation out of dcn_bw_update_from_pplib

Fill in fabric_and_dram_bandwidth for single channel 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>
7 years agodrm/amd/display: update DPM bounding box
Tony Cheng [Sun, 4 Jun 2017 16:50:20 +0000 (12:50 -0400)]
drm/amd/display: update DPM bounding box

value based on STA  target aligned to FCLK for SS corners with 10% margin

also
- group all latency together
- group all voltage state related together

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Eric Yang <eric.yang2@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Undo dc_update_surfaces_and_stream change.
Andrey Grodzovsky [Wed, 5 Jul 2017 17:28:24 +0000 (13:28 -0400)]
drm/amd/display: Undo dc_update_surfaces_and_stream change.

Restoring conditional call to in_transfer_func since no reason
to call it unconditionally.

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>
7 years agodrm/amd/display: Remove acrtc->stream
Andrey Grodzovsky [Thu, 29 Jun 2017 16:03:59 +0000 (12:03 -0400)]
drm/amd/display: Remove acrtc->stream

Remove acrtc->stream and move it into dm_crtc_state.
This allows to get rid of dm_atomic_state->dm_set.
Also reuse streams created in atomic_check during
commit.

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>
7 years agodrm/amd/display: Update atomic state hooks.
Andrey Grodzovsky [Thu, 29 Jun 2017 14:41:17 +0000 (10:41 -0400)]
drm/amd/display: Update atomic state hooks.

Reimplement atomic_state_alloc and atomic_state_clear to
release validate_ctx.

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>
7 years agodrm/amd/display: Use validate_context from atomic_check in commit
Harry Wentland [Wed, 28 Jun 2017 17:23:04 +0000 (13:23 -0400)]
drm/amd/display: Use validate_context from atomic_check in commit

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>
7 years agodrm/amd/display: Add validate_context to atomic_state
Harry Wentland [Wed, 29 Mar 2017 15:25:24 +0000 (11:25 -0400)]
drm/amd/display: Add validate_context to atomic_state

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>
7 years agodrm/amd/display: Commit validation set from state
Harry Wentland [Mon, 6 Mar 2017 14:43:30 +0000 (09:43 -0500)]
drm/amd/display: Commit validation set from state

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>
7 years agodrm/amd/display: Add correct retain/release
Harry Wentland [Fri, 3 Mar 2017 19:50:00 +0000 (14:50 -0500)]
drm/amd/display: Add correct retain/release

Needed by objs in dm_atomic_state

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>
7 years agodrm/amd/display: Hook dm private state into atomic_check
Harry Wentland [Tue, 27 Jun 2017 18:35:17 +0000 (14:35 -0400)]
drm/amd/display: Hook dm private state into atomic_check

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>
7 years agodrm/amd/display: Create dm_atomic_state
Harry Wentland [Tue, 27 Jun 2017 15:55:43 +0000 (11:55 -0400)]
drm/amd/display: Create dm_atomic_state

We really want to use the new private_atomic_state but can't right now
as we have to maintain some backward compatibility to older kernels. For
now let's follow Intel's approach and extend the drm_atomic_state.

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>
7 years agodrm/amd/display: set drr during program timing.
Yongqiang Sun [Mon, 26 Jun 2017 20:25:10 +0000 (16:25 -0400)]
drm/amd/display: set drr during program timing.

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>
7 years agodrm/amd/display: Remove SMU_INTERRUPT_CONTROL
Dmytro Laktyushkin [Thu, 29 Jun 2017 22:01:35 +0000 (18:01 -0400)]
drm/amd/display: Remove SMU_INTERRUPT_CONTROL

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>
7 years agodrm/amd/display: Enable ipp compilation
Dmytro Laktyushkin [Wed, 28 Jun 2017 22:58:27 +0000 (18:58 -0400)]
drm/amd/display: Enable ipp compilation

Update relevant registers

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>
7 years agodrm/amd/display: Rename DCN opp specific function prefixes to oppn10
Dmytro Laktyushkin [Wed, 28 Jun 2017 22:41:22 +0000 (18:41 -0400)]
drm/amd/display: Rename DCN opp specific function prefixes to oppn10

Also update relevant registers.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@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>
7 years agodrm/amd/display: Rename DCN mem input specific function prefixes to min.
Dmytro Laktyushkin [Wed, 28 Jun 2017 20:31:58 +0000 (16:31 -0400)]
drm/amd/display: Rename DCN mem input specific function prefixes to min.

Also updated relevant registers.

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>
7 years agodrm/amd/display: Rename DCN TG specific function prefixes to tg
Dmytro Laktyushkin [Wed, 28 Jun 2017 18:33:29 +0000 (14:33 -0400)]
drm/amd/display: Rename DCN TG specific function prefixes to tg

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@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>
7 years agodrm/amd/display: Set static screen register for stoney/carrizo
Bhawanpreet Lakha [Fri, 30 Jun 2017 19:19:55 +0000 (15:19 -0400)]
drm/amd/display: Set static screen register for stoney/carrizo

-Set CRTC_STATIC_SCREEN_EVENT for stoney/carrizo for FBC implementation
-Code is currently guarded with "ENABLE_FBC" compile time flag

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@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>
7 years agodrm/amd/display: Fix for hdmi frame pack stereo
Vitaly Prosyak [Wed, 28 Jun 2017 18:36:25 +0000 (13:36 -0500)]
drm/amd/display: Fix for hdmi frame pack stereo

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@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>
7 years agodrm/amd/display: Enabling VSR on 4K display causes black screen
Charlene Liu [Fri, 30 Jun 2017 00:25:23 +0000 (20:25 -0400)]
drm/amd/display: Enabling VSR on 4K display causes black screen

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>
7 years agodrm/amd/display: Re-enable Vsync Interrupts for Gradual Refresh Ramp
Amy Zhang [Wed, 28 Jun 2017 22:14:09 +0000 (18:14 -0400)]
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>
7 years agodrm/amd/display: Add DC interface for custom CSC matrix
Yue Hin Lau [Wed, 28 Jun 2017 21:21:42 +0000 (17:21 -0400)]
drm/amd/display: Add DC interface for custom CSC matrix

Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: Vitaly Prosyak <Vitaly.Prosyak@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Change max OPP
Dmytro Laktyushkin [Wed, 28 Jun 2017 18:27:18 +0000 (14:27 -0400)]
drm/amd/display: Change max OPP

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>
7 years agodrm/amd/display: enable diags compilation
Dmytro Laktyushkin [Mon, 26 Jun 2017 19:13:18 +0000 (15:13 -0400)]
drm/amd/display: enable diags compilation

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@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>
7 years agodrm/amd/display: Add extra mode and clock info to DTN logs
Corbin McElhanney [Fri, 23 Jun 2017 21:45:50 +0000 (17:45 -0400)]
drm/amd/display: Add extra mode and clock info to DTN logs

Adds some additional information to logs in dc_commit_streams to
better match Dal2.

Also adds a new function, dc_raw_log, that has the same
functionality as dc_conn_log, but does not attach display specific
prefixes to the log output.

Finally, adds a new DC log type, LOG_DTN, that logs to
LogMinor_DispConnect_dtn in DM. This new log type and dc_raw_log
are used to generate clock info in the logs to match Dal2.

Signed-off-by: Corbin McElhanney <corbin.mcelhanney@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Connect DC resource to FBC compressor
Bhawanpreet Lakha [Tue, 27 Jun 2017 20:34:27 +0000 (16:34 -0400)]
drm/amd/display: Connect DC resource to FBC compressor

- Connected DC resource to FBC compressor,
- Initial Implementation of FBC for Stoney/Carrizo
- Code is currently guarded with "ENABLE_FBC" compile time flag

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@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>
7 years agodrm/amd/display: add hyst frames for fixed refresh
Anthony Koo [Tue, 27 Jun 2017 17:27:00 +0000 (13:27 -0400)]
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>
7 years agodrm/amd/display: Move dm_plane_state to DAL header.
Andrey Grodzovsky [Wed, 28 Jun 2017 15:05:00 +0000 (11:05 -0400)]
drm/amd/display: Move dm_plane_state to DAL header.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: fix dcn pipe reset sequence
Dmytro Laktyushkin [Wed, 14 Jun 2017 22:58:04 +0000 (18:58 -0400)]
drm/amd/display: fix dcn pipe reset sequence

This change fixes dcn10 front end reset sequence. Previously we
would reset front end during flip which led to issues
in certain MPO and 4k/5k scenarios. We would also never properly
power gate our front end.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@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>
7 years agodrm/amd/display: remove unneeded FBC hw programming code
Bhawanpreet Lakha [Fri, 23 Jun 2017 17:35:53 +0000 (13:35 -0400)]
drm/amd/display: remove unneeded FBC hw programming code

- Removed uneeded FBC code.
- Initial placeholder for FBC implementation on stoney/carrizo

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@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>
7 years agodrm/amd/display: Add clock info struct
Corbin McElhanney [Mon, 26 Jun 2017 20:47:27 +0000 (16:47 -0400)]
drm/amd/display: Add clock info struct

Signed-off-by: Corbin McElhanney <corbin.mcelhanney@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>
7 years agodrm/amd/display: Create dm_crtc_state stubs.
Andrey Grodzovsky [Tue, 27 Jun 2017 21:24:00 +0000 (17:24 -0400)]
drm/amd/display: Create dm_crtc_state stubs.

These stubs are initial only since we need to flatten
DC objects (steran at least) to implement deep copy.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Make mode_config_funcs const
Harry Wentland [Tue, 27 Jun 2017 15:12:37 +0000 (11:12 -0400)]
drm/amd/display: Make mode_config_funcs const

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>
7 years agodrm/amd/display: Move drm_get_vblank from legacy code
Leo (Sunpeng) Li [Tue, 25 Jul 2017 22:00:44 +0000 (18:00 -0400)]
drm/amd/display: Move drm_get_vblank from legacy code

Previously, we assumed that allow_modeset=false => page flip. This
assumption breaks when an atomic commit is submitted with allow_modeset
set to false, since the legacy flip code is never called (the legacy
code grabs the vblank reference).

Fix: Move drm_vblank_get() from amdgpu_atomic_helper_page_flip() to
amdgpu_dm_commit_surfaces().

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@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>
7 years agodrm/amd/display: RV stereo support
Ken Chalmers [Mon, 26 Jun 2017 17:02:30 +0000 (13:02 -0400)]
drm/amd/display: RV stereo support

Fix moving directly from frame packed to frame sequential mode: disable
OTG_3D_STRUCTURE_EN if the stereo mode is not frame packed.

Signed-off-by: Ken Chalmers <ken.chalmers@amd.com>
Reviewed-by: Vitaly Prosyak <Vitaly.Prosyak@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fix misuse of plane state destroy helper
Xiaojie Yuan [Tue, 4 Jul 2017 06:21:58 +0000 (14:21 +0800)]
drm/amd/display: Fix misuse of plane state destroy helper

drm_plane_state is subclassed by dm_plane_state, so atomic driver should
use __drm_atomic_helper_plane_destroy_state() to destroy a state.
drm_atomic_helper_plane_destroy_state() frees drm_plane_state which is
allocated inside dm_plane_state, this is problematic.

Fixes: 95ae03a ("drm/amd/display: Create dm_plane_state.")
Signed-off-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com>
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Move kms_atomic support flag to dm_early_init.
Andrey Grodzovsky [Tue, 4 Jul 2017 17:28:57 +0000 (13:28 -0400)]
drm/amd/display: Move kms_atomic support flag to dm_early_init.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Move dm_plane_state definition to DAL header.
Andrey Grodzovsky [Wed, 28 Jun 2017 15:03:11 +0000 (11:03 -0400)]
drm/amd/display: Move dm_plane_state definition to DAL header.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Clean up unused function.
Andrey Grodzovsky [Tue, 27 Jun 2017 14:02:48 +0000 (10:02 -0400)]
drm/amd/display: Clean up unused function.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: w/a no color space info for HDMI when build AVI
Charlene Liu [Sat, 24 Jun 2017 20:01:37 +0000 (16:01 -0400)]
drm/amd/display: w/a no color space info for HDMI when build AVI

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Don't program scaler if we have no surface
Harry Wentland [Wed, 21 Jun 2017 20:48:06 +0000 (16:48 -0400)]
drm/amd/display: Don't program scaler if we have no surface

If we don't have a surface in dc_commit_streams scl_data won't get
populated in resource_build_scaling_params_for_context. In this case we
shouldn't attempt to program the scaler.

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>
7 years agodrm/amd/display: Disable pipe split.
Yongqiang Sun [Fri, 23 Jun 2017 17:56:55 +0000 (13:56 -0400)]
drm/amd/display: Disable pipe split.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
7 years agodrm/amd/display: Global lock typos fix.
Andrey Grodzovsky [Thu, 22 Jun 2017 15:45:13 +0000 (11:45 -0400)]
drm/amd/display: Global lock typos fix.

Fix typos.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@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>
7 years agodrm/amd/display: Workaround IGT multiplane restriction
Leo (Sunpeng) Li [Fri, 16 Jun 2017 19:59:17 +0000 (15:59 -0400)]
drm/amd/display: Workaround IGT multiplane restriction

IGT currently does not properly commit changes on planes with multiple
possible CRTC's. Set one valid CRTC for each plane for now, plus one
underlay plane on Carizzo and Stoney that is valid for all CRTCs.

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>
7 years agodrm/amd/display: fix bw_calc_auto translation error
Dmytro Laktyushkin [Wed, 21 Jun 2017 21:27:59 +0000 (17:27 -0400)]
drm/amd/display: fix bw_calc_auto translation error

The compiler was warning about conditions that will never evaluate
to true. The problem was that the VBA translater didn't translate
the conditions correctly.

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>
7 years agodrm/amd/display: Refine globallock.
Andrey Grodzovsky [Wed, 21 Jun 2017 19:44:23 +0000 (15:44 -0400)]
drm/amd/display: Refine globallock.

Switch to wait_for_completion_interruptible_timeout wait
since the lock is called from IOCTL context and can be
interrupted by a signal.

Global lock function might return EDEADLK or EINTR which
is not an error and just singals to user mode to restart
the call.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: dcn bw_calc_auto update rev 247 to 250
Dmytro Laktyushkin [Thu, 15 Jun 2017 18:10:43 +0000 (14:10 -0400)]
drm/amd/display: dcn bw_calc_auto update rev 247 to 250

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@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>
7 years agodrm/amd/display: make variable latency into a regkey option
Dmytro Laktyushkin [Wed, 21 Jun 2017 13:35:35 +0000 (09:35 -0400)]
drm/amd/display: make variable latency into a regkey option

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@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>
7 years agodrm/amd/display: use different sr latencies for dpm0 dcn bw calc
Dmytro Laktyushkin [Tue, 20 Jun 2017 21:24:23 +0000 (17:24 -0400)]
drm/amd/display: use different sr latencies for dpm0 dcn bw calc

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@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>
7 years agodrm/amd/display: Remove check update type function.
Andrey Grodzovsky [Tue, 20 Jun 2017 14:56:35 +0000 (10:56 -0400)]
drm/amd/display: Remove check update type function.

Due to using dc_commit_surface_to_stream instead of build
stream and surface updates any surface commit today is
evlauted to full. Until we fix this and can corretly
evluate type of surface update, anything which is not page
flip or cursor update will be treted as full update chnage
and global lock will be aquired.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Add global lock function.
Andrey Grodzovsky [Tue, 20 Jun 2017 14:42:33 +0000 (10:42 -0400)]
drm/amd/display: Add global lock function.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: MST atomic_get_property missing.
Andrey Grodzovsky [Mon, 19 Jun 2017 15:38:15 +0000 (11:38 -0400)]
drm/amd/display: MST atomic_get_property missing.

Missing function implementation was leading to EINVAL
in UMD thus not adding MST connector to X topology
and hence not getting set mode for it.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Create dm_plane_state.
Andrey Grodzovsky [Thu, 22 Jun 2017 21:37:22 +0000 (17:37 -0400)]
drm/amd/display: Create dm_plane_state.

Hook up dc_surface creation/destruction to dm_plane_state.
Rename amdgpu_drm_plane_state to dm_plane_state and do
minor cleanups.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: add pipe split disable regkey
Dmytro Laktyushkin [Fri, 16 Jun 2017 15:27:59 +0000 (11:27 -0400)]
drm/amd/display: add pipe split disable regkey

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>
7 years agodrm/amd/display: do full fe reprogram on full update
Dmytro Laktyushkin [Tue, 13 Jun 2017 21:14:51 +0000 (17:14 -0400)]
drm/amd/display: do full fe reprogram on full update

Fixes MPO entry in 2x4k scenario on raven

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>
7 years agodrm/amd/display: fix dc_post_update_surfaces_to_stream
Dmytro Laktyushkin [Tue, 13 Jun 2017 21:08:22 +0000 (17:08 -0400)]
drm/amd/display: fix dc_post_update_surfaces_to_stream

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>
7 years agodrm/amd/display: fix issues with incorrectly detecting UPDATE_TYPE_FULL
Anthony Koo [Wed, 14 Jun 2017 14:19:57 +0000 (10:19 -0400)]
drm/amd/display: fix issues with incorrectly detecting UPDATE_TYPE_FULL

This is due to how structures are being packed with padding added.
Structure field initialization doesn't clear the padding bytes, which cause
our memcmp to give incorrect result.

Move smaller structure parameters to end of structure.

Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: fix dc_check_update_surfaces_for_stream memcmp sequence
Dmytro Laktyushkin [Tue, 13 Jun 2017 20:31:49 +0000 (16:31 -0400)]
drm/amd/display: fix dc_check_update_surfaces_for_stream memcmp sequence

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@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>
7 years agodrm/amd/display: Save hpd_src for dc_link
Zeyu Fan [Tue, 13 Jun 2017 15:54:10 +0000 (11:54 -0400)]
drm/amd/display: Save hpd_src for dc_link

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>
7 years agodrm/amd/display: RV stereo support
Vitaly Prosyak [Mon, 12 Jun 2017 16:03:26 +0000 (11:03 -0500)]
drm/amd/display: RV stereo support

Re-organize 3d declarations

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@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>
7 years agodrm/amd/display: Don't call DCN clk code for Vega
Harry Wentland [Fri, 9 Jun 2017 14:12:36 +0000 (10:12 -0400)]
drm/amd/display: Don't call DCN clk code for Vega

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>
7 years agodrm/amd/display: Handle commit plane with no FB.
Andrey Grodzovsky [Wed, 7 Jun 2017 22:28:43 +0000 (18:28 -0400)]
drm/amd/display: Handle commit plane with no FB.

1) Always call flip ISR, for any surface comit, not only for page flip.

2) For events not signaled in flip ISR, handle them in end of commit_tail.

3)Fix race condition between subsequent atomic calls by removing
  current state access AFTER drm_atomic_helper_commit_hw_done
  was called. After this call a pending next commit will
  swap in his own state into objects and proceed.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Get rid of seperate flip function.
Andrey Grodzovsky [Sun, 4 Jun 2017 13:11:56 +0000 (09:11 -0400)]
drm/amd/display: Get rid of seperate flip function.

This code is remanant of pre atomic age when flip was a
standalone IOCTL.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@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>
7 years agodrm/amd/display: DAL3 RV get DPREFCLK SpreadspectrumInfo from smu_info
Hersen Wu [Fri, 9 Jun 2017 15:32:06 +0000 (11:32 -0400)]
drm/amd/display: DAL3 RV get DPREFCLK SpreadspectrumInfo from smu_info

Signed-off-by: Hersen Wu <hersenxs.wu@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>
7 years agodrm/amd/display: RV stereo support
Vitaly Prosyak [Thu, 8 Jun 2017 20:55:02 +0000 (15:55 -0500)]
drm/amd/display: RV stereo support

HDMI frame pack and DP frame alternate in band

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@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>
7 years agodrm/amd/display: remove get_position() of underlay
Shirish S [Thu, 8 Jun 2017 06:25:06 +0000 (11:55 +0530)]
drm/amd/display: remove get_position() of underlay

get_position() returns CRTC vertical/horizontal counters,
hence it is not applicable for underlay which is plane and not
attached to one crtc.
This patch hence removes the callback from dce110_tg_v_funcs
and hence fixes a bug in dc_debug.c where in
get_position() for underlay pipe is called un-conditionally.

Witout this patch get_position() is called in case one has
to update underlay plane's data,
since callback implmented with an ASSERT(),
the old_surface_count and new_surface_count mismatches; causing
only one plane update which is not right and also assert makes the
rendering slow.

Signed-off-by: Shirish S <shirish.s@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>
7 years agodrm/amd/display: enable pipe split
Dmytro Laktyushkin [Mon, 29 May 2017 22:30:17 +0000 (18:30 -0400)]
drm/amd/display: enable pipe split

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>
7 years agodrm/amd/display: w/a for ycbcr output pre-multiplied alpha corruption
Dmytro Laktyushkin [Mon, 5 Jun 2017 19:08:10 +0000 (15:08 -0400)]
drm/amd/display: w/a for ycbcr output pre-multiplied alpha corruption

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>
7 years agodrm/amd/display: redesign mpc
Dmytro Laktyushkin [Thu, 1 Jun 2017 22:35:54 +0000 (18:35 -0400)]
drm/amd/display: redesign mpc

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>
7 years agodrm/amd/display: disable dcc when reset front end.
Yongqiang Sun [Thu, 8 Jun 2017 18:26:40 +0000 (14:26 -0400)]
drm/amd/display: disable dcc when reset 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>
7 years agodrm/amd/display: RV stereo support
Vitaly Prosyak [Wed, 7 Jun 2017 17:23:59 +0000 (12:23 -0500)]
drm/amd/display: RV stereo support

HDMI frame pack and DP frame alternate in band

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@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>
7 years agodrm/amd/display: add bw logging for dcn
Dmytro Laktyushkin [Wed, 7 Jun 2017 17:53:30 +0000 (13:53 -0400)]
drm/amd/display: add bw logging for dcn

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>
7 years agodrm/amd/display: fix enable_optc_clock reg_wait timeouts
Dmytro Laktyushkin [Wed, 7 Jun 2017 19:02:34 +0000 (15:02 -0400)]
drm/amd/display: fix enable_optc_clock reg_wait timeouts

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>
7 years agodrm/amd/display: Use surface update inuse for pending check.
Yongqiang Sun [Tue, 6 Jun 2017 20:41:00 +0000 (16:41 -0400)]
drm/amd/display: Use surface update inuse for pending check.

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>
7 years agodrm/amd/display: Temporary disable BTR FreeSync support for now
Anthony Koo [Tue, 6 Jun 2017 20:30:51 +0000 (16:30 -0400)]
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>
7 years agodrm/amd/display: propagate surface alpha setting from OS to DC
Dmytro Laktyushkin [Fri, 2 Jun 2017 23:01:37 +0000 (19:01 -0400)]
drm/amd/display: propagate surface alpha setting from OS to DC

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>
7 years agodrm/amd/display: Call program_gamut explicitly instead of entire set_plane
Zeyu Fan [Fri, 2 Jun 2017 21:25:49 +0000 (17:25 -0400)]
drm/amd/display: Call program_gamut explicitly instead of entire set_plane

This fixes on boot crush on Vega, Polaris with Dal3.

Signed-off-by: Zeyu Fan <Zeyu.Fan@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>
7 years agodrm/amd/display: Add function to log connectivity
Zeyu Fan [Mon, 5 Jun 2017 21:56:05 +0000 (17:56 -0400)]
drm/amd/display: Add function to log connectivity

Signed-off-by: Zeyu Fan <Zeyu.Fan@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>
7 years agodrm/amd/display: fix single link black screen
Charlene Liu [Mon, 5 Jun 2017 20:54:33 +0000 (16:54 -0400)]
drm/amd/display: fix single link black screen

Don't fall back to dual link DVI mode if the connector
is single Link only.

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>
7 years agodrm/amd/display: Fix DRR Enable on Desktop
Amy Zhang [Fri, 2 Jun 2017 20:33:47 +0000 (16:33 -0400)]
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>
7 years agodrm/amd/display: Refactor to call set PSR wait loop in dce_dmcu instead of dce_clocks
Amy Zhang [Wed, 31 May 2017 20:53:01 +0000 (16:53 -0400)]
drm/amd/display: Refactor to call set PSR wait loop in dce_dmcu instead of dce_clocks

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>
7 years agodrm/amd/display: fix mpc alpha programming
Dmytro Laktyushkin [Fri, 2 Jun 2017 23:00:45 +0000 (19:00 -0400)]
drm/amd/display: fix mpc alpha programming

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>
7 years agodrm/amd/display: disable forced stutter disable after programming watermark
Tony Cheng [Fri, 2 Jun 2017 10:15:57 +0000 (06:15 -0400)]
drm/amd/display: disable forced stutter disable after programming watermark

vbios will disable stutter pre-OS.  driver re-enable after programming watermark

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>
7 years agodrm/amd/display: remove disable_clk_gate debug flag for DCN
Hersen Wu [Thu, 1 Jun 2017 19:49:16 +0000 (15:49 -0400)]
drm/amd/display: remove disable_clk_gate debug flag for DCN

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>
7 years agodrm/amd/display: Add assertion for invalid surface dimensions
Corbin McElhanney [Thu, 1 Jun 2017 20:54:53 +0000 (16:54 -0400)]
drm/amd/display: Add assertion for invalid surface dimensions

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>
7 years agodrm/amd/display: clean up mpc programing during fe reset
Dmytro Laktyushkin [Thu, 1 Jun 2017 16:27:00 +0000 (12:27 -0400)]
drm/amd/display: clean up mpc programing during fe reset

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>
7 years agodrm/amd/display: Don't update surface if dimensions are 0
Corbin McElhanney [Thu, 1 Jun 2017 19:40:04 +0000 (15:40 -0400)]
drm/amd/display: Don't update surface if dimensions are 0

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>