openwrt/staging/blogic.git
7 years agodrm/amd/display: Remove get_connector_for_sink.
Andrey Grodzovsky [Tue, 14 Feb 2017 20:47:24 +0000 (15:47 -0500)]
drm/amd/display: Remove get_connector_for_sink.

Keep 1:1 relation between MST sink and it's MST connector.

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: Remove get_connector_for_link.
Andrey Grodzovsky [Tue, 14 Feb 2017 18:50:17 +0000 (13:50 -0500)]
drm/amd/display: Remove get_connector_for_link.

We can keep a 1:1 relation between a link and a physical
connector and hence skip the iteration. This function
is used in context of only physical connetors.

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 dce_calc surface pitch setting for non underlay pipes
Dmytro Laktyushkin [Wed, 29 Mar 2017 20:24:19 +0000 (16:24 -0400)]
drm/amd/display: fix dce_calc surface pitch setting for non underlay pipes

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Temporary disable PSR for HBR2 & HBR3
Zeyu Fan [Wed, 29 Mar 2017 21:21:56 +0000 (17:21 -0400)]
drm/amd/display: Temporary disable PSR for HBR2 & HBR3

Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: refactor member referencing to improve readability
Reza Amini [Wed, 29 Mar 2017 16:05:15 +0000 (12:05 -0400)]
drm/amd/display: refactor member referencing to improve readability

Signed-off-by: Reza Amini <reza.amini@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: remove surface validation against stream rect
Reza Amini [Fri, 17 Mar 2017 19:24:09 +0000 (15:24 -0400)]
drm/amd/display: remove surface validation against stream rect

Surface information is by default copied from old context in dc_commit_stream.
Thus unchange streams will not be affected. For new streams, we shouldn't
validate the new mode against the surface configuration of old_context.

Signed-off-by: Reza Amini <reza.amini@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: update plane functionalities
Shirish S [Thu, 23 Mar 2017 09:24:40 +0000 (14:54 +0530)]
drm/amd/display: update plane functionalities

This patch introduces amdgpu_drm_plane_state
structure, which subclasses drm_plane_state and
holds data suitable for configuring hardware.

It switches reset(), atomic_duplicate_state()
& atomic_destroy_state() functions to new internal
implementation, earlier they were pointing to
drm core functions.

TESTS(On Chromium OS on Stoney Only)
* Builds without compilation errors.
* 'plane_test' passes for XR24 format
  based Overlay plane.
* Chromium OS ui comes up.

Signed-off-by: Shirish S <shirish.s@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fix cleanup in amdgpu_dm_initialize_drm_device
Harry Wentland [Mon, 3 Apr 2017 17:36:26 +0000 (13:36 -0400)]
drm/amd/display: Fix cleanup in amdgpu_dm_initialize_drm_device

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: decouple per-crtc-plane model
Alex Deucher [Thu, 15 Jun 2017 20:24:01 +0000 (16:24 -0400)]
drm/amd/display: decouple per-crtc-plane model

Current design has per-crtc-plane model.
As a result, for asic's that support underlay,
are unable to expose it to user space for modesetting.

To enable this, the drm driver intialisation now runs
for number of surfaces instead of stream/crtc.

This patch plumbs surface capabilities to drm framework
so that it can be effectively used by user space.

Tests: (On Chromium OS for Stoney Only)
* 'modetest -p'  now shows additional plane
  with YUV capabilities in case of CZ and ST.
* 'plane_test' fails with below error:
  [drm:amdgpu_dm_connector_atomic_set_property [amdgpu]] *ERROR* Unsupported screen depth 0
  as ther is no support for YUYV
* Checked multimonitor display works fine

Signed-off-by: Shirish S <shirish.s@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: obtain usHBR3En bit from BP 1
Ding Wang [Mon, 27 Mar 2017 18:50:27 +0000 (14:50 -0400)]
drm/amd/display: obtain usHBR3En bit from BP 1

ASICs using bios parser 1 don't check HBR3 capability as there is no such
a bit usHBR3En in ATOM_ENCODER_CAP_RECORDER.
Therefore, will use ATOM_ENCODER_CAP_RECORDER_V2 and thus obtain the usHBR3En
bit.

Signed-off-by: Ding Wang <ding.wang@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: stereo support
Vitaly Prosyak [Mon, 27 Mar 2017 17:48:46 +0000 (12:48 -0500)]
drm/amd/display: stereo support

Frame sequential, top-bottom and side-by-side support.

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: use CP2520-3 for PHY compliance automation
Tony Cheng [Mon, 27 Mar 2017 16:39:22 +0000 (12:39 -0400)]
drm/amd/display: use CP2520-3 for PHY compliance automation

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fix MPO exit and cursor issue.
Yongqiang Sun [Mon, 27 Mar 2017 13:59:38 +0000 (09:59 -0400)]
drm/amd/display: Fix MPO exit and cursor issue.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: increase timeout for dmif dealloc
Roman Li [Fri, 24 Mar 2017 20:26:09 +0000 (16:26 -0400)]
drm/amd/display: increase timeout for dmif dealloc

In some use-cases, e.g. multiple 4K displays,
exisitng wait time for reg update of 30msec timed out
during mode setiing that sometimes resulted in system bad state
as we continue without waiting for registry update complete.
Increasing timeout to 35msec fixes that problem.

Signed-off-by: Roman Li <Roman.Li@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: voltage request related change
Charlene Liu [Fri, 24 Mar 2017 20:54:02 +0000 (16:54 -0400)]
drm/amd/display: voltage request related change

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: use CRTC_VERTICAL_INTERRUPT0 as a trigger for VBLANK.
Andrey Grodzovsky [Thu, 23 Mar 2017 19:30:35 +0000 (15:30 -0400)]
drm/amd/display: use CRTC_VERTICAL_INTERRUPT0 as a trigger for VBLANK.

Register ISR hnadler on the new interrupt.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: use CRTC_VERTICAL_INTERRUPT0 as VBLANK trigger.
Andrey Grodzovsky [Thu, 23 Mar 2017 19:27:15 +0000 (15:27 -0400)]
drm/amd/display: use CRTC_VERTICAL_INTERRUPT0 as VBLANK trigger.

VBLANK interrupt is driven bu line buffer vcounter which is
ahead of CRTC vcounter. Use an interrupt that fires at the actual
CRTC vblank start boundry.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Rename bandwidth_calcs.h to dce_calcs.h
Harry Wentland [Tue, 21 Mar 2017 22:17:12 +0000 (18:17 -0400)]
drm/amd/display: Rename bandwidth_calcs.h to dce_calcs.h

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Power on front end during set mode.
Yongqiang Sun [Thu, 23 Mar 2017 14:34:06 +0000 (10:34 -0400)]
drm/amd/display: Power on front end during set mode.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Add audio/video ContainerId implementation
xhdu [Tue, 21 Mar 2017 15:05:32 +0000 (11:05 -0400)]
drm/amd/display: Add audio/video ContainerId implementation

Leave hardcoded if no ContainerId provided by DM.

Signed-off-by: Duke Du <Duke.Du@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: using calculated values for VReady/Startup
Charlene Liu [Tue, 21 Mar 2017 19:16:04 +0000 (15:16 -0400)]
drm/amd/display: using calculated values for VReady/Startup

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: remove redundant check
Charlene Liu [Mon, 20 Mar 2017 18:49:53 +0000 (14:49 -0400)]
drm/amd/display: remove redundant check

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: DP is hotplugged, HDMI with 4:2:0 corruption
Charlene Liu [Fri, 17 Mar 2017 17:09:09 +0000 (13:09 -0400)]
drm/amd/display: DP is hotplugged, HDMI with 4:2:0 corruption

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fix applying surface to underlay pipe
Leon Elazar [Fri, 17 Mar 2017 16:02:58 +0000 (12:02 -0400)]
drm/amd/display: Fix applying surface to underlay pipe

1. Locking all pipes before doing any changes
2. Applying surface for both top and bottom pipes

Signed-off-by: Leon Elazar <leon.elazar@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Set cursor pitch to cursor width (in pixels).
Andrey Grodzovsky [Wed, 22 Feb 2017 19:23:51 +0000 (14:23 -0500)]
drm/amd/display: Set cursor pitch to cursor width (in pixels).

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Unhardcode cursor size reported back to UMD.
Andrey Grodzovsky [Wed, 22 Feb 2017 19:24:11 +0000 (14:24 -0500)]
drm/amd/display: Unhardcode cursor size reported back to UMD.

This will return back MAX cursor size for given ASIC.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Unhardcode acrtc->max_cursor_{height,width}
Andrey Grodzovsky [Wed, 22 Feb 2017 20:31:47 +0000 (15:31 -0500)]
drm/amd/display: Unhardcode acrtc->max_cursor_{height,width}

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@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 gfx9 parameters reading for DC.
Andrey Grodzovsky [Wed, 8 Feb 2017 20:58:50 +0000 (15:58 -0500)]
drm/amd/display: Fix gfx9 parameters reading for DC.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fix the NULL pointer. (v2)
Andrey Grodzovsky [Thu, 16 Mar 2017 19:51:00 +0000 (15:51 -0400)]
drm/amd/display: Fix the NULL pointer. (v2)

ret value in amdgpu_dm_atomic_check was not rest to EINVAL
after drm_atomic_add_affected_planes and by this making
any subsequent validation failure pass when returning
to atomic_check.

v2: Add WARN_ON print for dc_commit_streams in
amdgpu_dm_atomic_commit_tail since this should never
fail.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: support PHY compliance automation for CP2520 pattern 1/2/3
Tony Cheng [Tue, 14 Mar 2017 23:16:36 +0000 (19:16 -0400)]
drm/amd/display: support PHY compliance automation for CP2520 pattern 1/2/3

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: support CP2520 pattern 2 for HBR2 compliance
Tony Cheng [Tue, 14 Mar 2017 20:30:06 +0000 (16:30 -0400)]
drm/amd/display: support CP2520 pattern 2 for HBR2 compliance

- also some clean up

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Use stream_enc to get head pipe.
Yongqiang Sun [Tue, 14 Mar 2017 20:41:50 +0000 (16:41 -0400)]
drm/amd/display: Use stream_enc to get head pipe.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: remove dc_pre_update_surfaces_to_stream from dc use
Dmytro Laktyushkin [Tue, 14 Mar 2017 16:30:29 +0000 (12:30 -0400)]
drm/amd/display: remove dc_pre_update_surfaces_to_stream from dc use

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: use extended receiver cap for dpcd ver
Tony Cheng [Tue, 14 Mar 2017 05:40:53 +0000 (01:40 -0400)]
drm/amd/display: use extended receiver cap for dpcd ver

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: changing the dc_update_surfaces_and_stream
Leon Elazar [Tue, 14 Mar 2017 15:54:31 +0000 (11:54 -0400)]
drm/amd/display: changing the dc_update_surfaces_and_stream

1. Adding the ability to update the stream parameters during FULL_UPDATE type

Signed-off-by: Leon Elazar <leon.elazar@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: fix bw calc internal initialization error
Dmytro Laktyushkin [Tue, 14 Mar 2017 15:16:11 +0000 (11:16 -0400)]
drm/amd/display: fix bw calc internal initialization error

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fixed bandwidth calculation error when converting fractions
Logatharshan Thothiralingam [Thu, 9 Mar 2017 16:37:26 +0000 (11:37 -0500)]
drm/amd/display: Fixed bandwidth calculation error when converting fractions

[Problem]
VSR greyed out

[Root cause]
When converting fractions, we were using the integer function, which let to
a large display clock and the view was not supported

[Solution]
Change the integer to fraction functions

Signed-off-by: Logatharshan Thothiralingam <logatharshan.thothiralingam@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: adding new dc_update_surfaces_and_stream
Leon Elazar [Thu, 9 Mar 2017 19:38:15 +0000 (14:38 -0500)]
drm/amd/display: adding new dc_update_surfaces_and_stream

Signed-off-by: Leon Elazar <leon.elazar@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amdgpu/soc15: enable dc on vega10
Alex Deucher [Wed, 19 Apr 2017 21:28:47 +0000 (17:28 -0400)]
drm/amdgpu/soc15: enable dc on vega10

Add the DC display module to drive the DCE12 IP on vega10.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Remove DCE12 guards
Alex Deucher [Thu, 15 Jun 2017 20:21:43 +0000 (16:21 -0400)]
drm/amd/display: Remove DCE12 guards

Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Less log spam
Jordan Lazare [Wed, 8 Mar 2017 19:04:16 +0000 (14:04 -0500)]
drm/amd/display: Less log spam

Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: need to handle DCE_Info table ver4.2
Charlene Liu [Tue, 7 Mar 2017 21:54:32 +0000 (16:54 -0500)]
drm/amd/display: need to handle DCE_Info table ver4.2

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Enable DCE12 support
Alex Deucher [Thu, 15 Jun 2017 20:20:24 +0000 (16:20 -0400)]
drm/amd/display: Enable DCE12 support

This wires DCE12 support into DC and enables it.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Add DCE12 core support
Harry Wentland [Mon, 6 Mar 2017 19:36:02 +0000 (14:36 -0500)]
drm/amd/display: Add DCE12 core support

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Add DCE12 irq support
Harry Wentland [Mon, 6 Mar 2017 19:34:18 +0000 (14:34 -0500)]
drm/amd/display: Add DCE12 irq support

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Add DCE12 i2c/aux support
Harry Wentland [Mon, 6 Mar 2017 19:33:19 +0000 (14:33 -0500)]
drm/amd/display: Add DCE12 i2c/aux support

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Add DCE12 gpio support
Harry Wentland [Mon, 6 Mar 2017 19:32:06 +0000 (14:32 -0500)]
drm/amd/display: Add DCE12 gpio support

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Add DCE12 bios parser support
Harry Wentland [Mon, 6 Mar 2017 19:29:52 +0000 (14:29 -0500)]
drm/amd/display: Add DCE12 bios parser support

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amdgpu: get display info from DC when DC enabled.
Rex Zhu [Tue, 28 Feb 2017 08:21:27 +0000 (16:21 +0800)]
drm/amdgpu: get display info from DC when DC enabled.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: fix incorrect vp adjustment
Dmytro Laktyushkin [Wed, 8 Mar 2017 18:45:33 +0000 (13:45 -0500)]
drm/amd/display: fix incorrect vp adjustment

Viewport would be incorrectly adjusted when surface was used
for multiple displays

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Less log spam
Jordan Lazare [Wed, 8 Mar 2017 19:04:16 +0000 (14:04 -0500)]
drm/amd/display: Less log spam

Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: fix viewport adjustment on rotated surface
Dmytro Laktyushkin [Mon, 6 Mar 2017 23:02:30 +0000 (18:02 -0500)]
drm/amd/display: fix viewport adjustment on rotated surface

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: fix hsplit viewport calculation for rotated/mirrored usecases
Dmytro Laktyushkin [Mon, 6 Mar 2017 19:57:28 +0000 (14:57 -0500)]
drm/amd/display: fix hsplit viewport calculation for rotated/mirrored usecases

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: add init calculation to scaler params
Dmytro Laktyushkin [Wed, 1 Mar 2017 23:27:17 +0000 (18:27 -0500)]
drm/amd/display: add init calculation to scaler params

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Refactor on dc_sink structure.
Zeyu Fan [Tue, 7 Mar 2017 16:48:50 +0000 (11:48 -0500)]
drm/amd/display: Refactor on dc_sink structure.

Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Switch to DRM helpers in s3.
Andrey Grodzovsky [Thu, 20 Apr 2017 19:59:25 +0000 (15:59 -0400)]
drm/amd/display: Switch to DRM helpers in s3.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Do not copy bottom pipe when map resource.
Yongqiang Sun [Mon, 6 Mar 2017 19:58:59 +0000 (14:58 -0500)]
drm/amd/display: Do not copy bottom pipe when map resource.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: After program backend, also program front end regs.
Yongqiang Sun [Fri, 3 Mar 2017 14:37:11 +0000 (09:37 -0500)]
drm/amd/display: After program backend, also program front end regs.

Issue:
In case of two 4K@60 + one non-4k monitor, when unplug non-4k monitor,
the remain two 4k monitor don't work properly.
Reason:
In that case, two 4k use two pipes and no split, when unplug happens,
those two monitor will use 4 pipes and split, but on that time, frontend
is not programed properly.
Solution:
After programed backend, front end should be programmed as per new pipe
setting.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: TPS4 logic typo fix
Charlene Liu [Fri, 3 Mar 2017 20:16:03 +0000 (15:16 -0500)]
drm/amd/display: TPS4 logic typo fix

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: move refclk from dc to resource_pool
Charlene Liu [Fri, 3 Mar 2017 18:44:35 +0000 (13:44 -0500)]
drm/amd/display: move refclk from dc to resource_pool

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Memory leak fix during disable
Leon Elazar [Fri, 3 Mar 2017 19:37:08 +0000 (14:37 -0500)]
drm/amd/display: Memory leak fix during disable

1.current_context memory wasn't released at
dc_post_update_surfaces_to_stream during context swap.

Signed-off-by: Leon Elazar <leon.elazar@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: refclock from bios firmwareInfoTable
Charlene Liu [Fri, 3 Mar 2017 02:18:03 +0000 (21:18 -0500)]
drm/amd/display: refclock from bios firmwareInfoTable

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Simplify some DMCU waits
Amy Zhang [Wed, 1 Mar 2017 14:46:20 +0000 (09:46 -0500)]
drm/amd/display: Simplify some DMCU waits

Signed-off-by: Amy Zhang <Amy.Zhang@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Adding FastUpdate functionality
Leon Elazar [Wed, 1 Mar 2017 17:30:11 +0000 (12:30 -0500)]
drm/amd/display: Adding FastUpdate functionality

Exposing DC Api dc_check_update_surfaces_for_stream
validation will return the answer which type of update is required,
so upper layers can is it safe to call the update API fro high IRQ yes/no.

Signed-off-by: Leon Elazar <leon.elazar@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: sometime VtotalMin less than VTotal (rounding issue)
Charlene Liu [Wed, 1 Mar 2017 23:20:58 +0000 (18:20 -0500)]
drm/amd/display: sometime VtotalMin less than VTotal (rounding issue)

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: remove independent lock as we have no use case today
Tony Cheng [Wed, 1 Mar 2017 03:52:29 +0000 (22:52 -0500)]
drm/amd/display: remove independent lock as we have no use case today

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: clean up and simply locking logic
Tony Cheng [Wed, 1 Mar 2017 02:30:32 +0000 (21:30 -0500)]
drm/amd/display: clean up and simply locking logic

always take update lock instead of using HW built in update
lock trigger with write to primary_addr_lo.

we will be a little more inefficient with the extra registers
write to lock, but this simplify code and make it always correct.

Will revisit locking optimization once update sequence mature

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Remove page_fleep_needed function.
Andrey Grodzovsky [Tue, 28 Feb 2017 21:45:46 +0000 (16:45 -0500)]
drm/amd/display: Remove page_fleep_needed function.

This function makes a lot of assumptions to try and deduce
tha an atomic_commit came from FLIP ioctl. Those assumptions
are not explicit contract with DRM API and might lead to wrong
result as the code changes. Instead use drm_atomic_state.allow_modeset
flag which explicitly is set to false only in atomic flip
helper function, otherwise this flag is always true.
P.S When we get to do actual atomic IOCTL this will have to be revised
with the atomic call behavior.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Refactor headless to use atomic commit. (v2)
Andrey Grodzovsky [Mon, 6 Feb 2017 02:48:19 +0000 (21:48 -0500)]
drm/amd/display: Refactor headless to use atomic commit. (v2)

Headless mode set needs to be synchronized against outstanding nonblocking
commits. This achieved by building atomic state and commiting it.

v2: rebase on 4.11

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agoRevert "drm/amdgpu: Pulling old prepare and submit for flip back"
Harry Wentland [Wed, 13 Sep 2017 19:17:19 +0000 (15:17 -0400)]
Revert "drm/amdgpu: Pulling old prepare and submit for flip back"

This reverts commit 0eb4667a073e.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Refactor atomic commit implementation. (v2)
Andrey Grodzovsky [Thu, 20 Apr 2017 19:57:05 +0000 (15:57 -0400)]
drm/amd/display: Refactor atomic commit implementation. (v2)

Modify amdgpu_dm_atomic_comit to implement
atomic_comit_tail hook.
Unify Buffer objects allocation and dealocation
for surface updates and page flips.
Simplify wait for fences and target_vbank logic
for non blockiing commit.
Remove hacky update surface to page flip synchronization
we had and rely on atomic framework synchronization logic.

v2:
Add state->allow_modeset as indicator of page flip call.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: extended the programming sequence to VFlip as well
Charlene Liu [Wed, 1 Mar 2017 00:49:15 +0000 (19:49 -0500)]
drm/amd/display: extended the programming sequence to VFlip as well

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: We don't support interlace and doublescan
Harry Wentland [Thu, 16 Feb 2017 15:37:00 +0000 (10:37 -0500)]
drm/amd/display: We don't support interlace and doublescan

Don't tell DRM otherwise.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: freesync pipe split :VTotal_Min_Mask for Hflip/lock.
Charlene Liu [Tue, 28 Feb 2017 20:23:38 +0000 (15:23 -0500)]
drm/amd/display: freesync pipe split :VTotal_Min_Mask for Hflip/lock.

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Remove unused define from amdgpu_dm_types
Harry Wentland [Wed, 18 Jan 2017 01:24:03 +0000 (20:24 -0500)]
drm/amd/display: Remove unused define from amdgpu_dm_types

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Use amdgpu mode funcs statically
Harry Wentland [Thu, 12 Jan 2017 14:09:08 +0000 (09:09 -0500)]
drm/amd/display: Use amdgpu mode funcs statically

No need to assign them dynamically. This is much more readable.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: fix dce100_validate_bandwidth return value
Dmytro Laktyushkin [Tue, 28 Feb 2017 21:14:10 +0000 (16:14 -0500)]
drm/amd/display: fix dce100_validate_bandwidth return value

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Some more warning fixes
Harry Wentland [Fri, 24 Feb 2017 21:25:51 +0000 (16:25 -0500)]
drm/amd/display: Some more warning fixes

This doesn't show with gcc6

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: move visual confirm recout adjustment to scaler
Dmytro Laktyushkin [Wed, 22 Feb 2017 23:14:52 +0000 (18:14 -0500)]
drm/amd/display: move visual confirm recout adjustment to scaler

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: bandwidth update fix
Dmytro Laktyushkin [Wed, 22 Feb 2017 22:52:22 +0000 (17:52 -0500)]
drm/amd/display: bandwidth update fix

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: remove apply_clk_constraints, used validate_bandwidth universally
Dmytro Laktyushkin [Fri, 24 Feb 2017 19:19:40 +0000 (14:19 -0500)]
drm/amd/display: remove apply_clk_constraints, used validate_bandwidth universally

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fix warnings in DC
Harry Wentland [Fri, 24 Feb 2017 16:31:23 +0000 (11:31 -0500)]
drm/amd/display: Fix warnings in DC

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fix warnings in amdgpu_dm
Harry Wentland [Fri, 24 Feb 2017 16:21:11 +0000 (11:21 -0500)]
drm/amd/display: Fix warnings in amdgpu_dm

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Surface Validation Fixes + Audio Mask
Leon Elazar [Thu, 23 Feb 2017 21:10:43 +0000 (16:10 -0500)]
drm/amd/display: Surface Validation Fixes + Audio Mask

1. dc: Adding missing mask for audio register DCCG_AUDIO_DTO_SOURCE
2. Changing the surface validation to check the limits of the clip rect instead of the source rect.

Signed-off-by: Leon Elazar <leon.elazar@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: add scaler coefficients for 64 phase 5-8 taps
Dmytro Laktyushkin [Thu, 23 Feb 2017 20:25:51 +0000 (15:25 -0500)]
drm/amd/display: add scaler coefficients for 64 phase 5-8 taps

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fix gamma colour corruption for 10 bit surfaces
Jordan Lazare [Thu, 23 Feb 2017 19:07:29 +0000 (14:07 -0500)]
drm/amd/display: Fix gamma colour corruption for 10 bit surfaces

Gamma LUT shouldn't be used for 10-bit and above. Should instead be
using prescale and bypassing input gamma.

Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: DMCU PSR Refactor
Amy Zhang [Fri, 17 Feb 2017 16:56:03 +0000 (11:56 -0500)]
drm/amd/display: DMCU PSR Refactor

- Move PSR programming from link encoder to dmcu

Signed-off-by: Amy Zhang <Amy.Zhang@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: 420 clock divided by 2 twice
Charlene Liu [Wed, 22 Feb 2017 23:26:20 +0000 (18:26 -0500)]
drm/amd/display: 420 clock divided by 2 twice

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: HDMI deep color mode audio issue
Charlene Liu [Wed, 22 Feb 2017 18:46:29 +0000 (13:46 -0500)]
drm/amd/display: HDMI deep color mode audio issue

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: rename bandwidth_calcs.c to dce_calcs.c (v2)
Dmytro Laktyushkin [Wed, 15 Feb 2017 23:21:20 +0000 (18:21 -0500)]
drm/amd/display: rename bandwidth_calcs.c to dce_calcs.c (v2)

v2: agd: squash in the Makefile change as well.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Eagle Yeh <eagle.yeh@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amdgpu: Add a few members to support DAL atomic refactor.
Andrey Grodzovsky [Mon, 30 Jan 2017 04:16:03 +0000 (23:16 -0500)]
drm/amdgpu: Add a few members to support DAL atomic refactor.

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/amdgpu: Expose mode_config functions for DM
Harry Wentland [Thu, 12 Jan 2017 14:07:38 +0000 (09:07 -0500)]
drm/amdgpu: Expose mode_config functions for DM

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: fix incorrect programming for YCbCr422 and YCbCr420
Charlene Liu [Fri, 17 Feb 2017 18:59:11 +0000 (13:59 -0500)]
drm/amd/display: fix incorrect programming for YCbCr422 and YCbCr420

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>
7 years agodrm/amd/display: fix 12bpc truncate to 10bpc
Charlene Liu [Fri, 17 Feb 2017 18:51:32 +0000 (13:51 -0500)]
drm/amd/display: fix 12bpc truncate to 10bpc

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>
7 years agodrm/amd/display: audio bug fix part 1: Add missing audio ACR
Charlene Liu [Fri, 17 Feb 2017 03:28:46 +0000 (22:28 -0500)]
drm/amd/display: audio bug fix part 1: Add missing audio ACR

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>
7 years agodrm/amd/display: Fix error where wrong payload size is given.
Zeyu Fan [Thu, 16 Feb 2017 23:34:50 +0000 (18:34 -0500)]
drm/amd/display: Fix error where wrong payload size is given.

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 query_ddc_data function
Zeyu Fan [Thu, 16 Feb 2017 21:15:30 +0000 (16:15 -0500)]
drm/amd/display: Add query_ddc_data function

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: Add bypass case for PQ transfer function
Amy Zhang [Thu, 16 Feb 2017 16:04:48 +0000 (11:04 -0500)]
drm/amd/display: Add bypass case for PQ transfer function

- Source and destination color space should be the same for
  app control case
- Bypass degamma, regamma, and gamut remap
- Add hdr supported check for info frame

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: fix dc_commit_surfaces_to_stream for dcc
Ken Chalmers [Mon, 13 Feb 2017 16:07:33 +0000 (11:07 -0500)]
drm/amd/display: fix dc_commit_surfaces_to_stream for dcc

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>
7 years agodrm/amd/display: Remove LINUX_VERSION_CODE check
Harry Wentland [Tue, 21 Feb 2017 22:09:34 +0000 (17:09 -0500)]
drm/amd/display: Remove LINUX_VERSION_CODE check

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>