platform/kernel/linux-starfive.git
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>
7 years agodrm/amd/display: Don't attempt to program missing register fields on DCE8
Jordan Lazare [Tue, 14 Feb 2017 23:20:35 +0000 (18:20 -0500)]
drm/amd/display: Don't attempt to program missing register fields on DCE8

When moving to a common dce/ infrastructure for all asics, some register fields
do not exist in DCE8, and cause ASSERTS and debug spam.

Instead, check to see whether a register field mask is valid before attempting
to program the register field

Signed-off-by: Jordan Lazare <Jordan.Lazare@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 64-bit division, yet again
Harry Wentland [Tue, 14 Feb 2017 19:51:06 +0000 (14:51 -0500)]
drm/amd/display: Fix 64-bit division, yet again

Also make the code somewhat more readable.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/dc: hw_sequencer: fix semicolon.cocci warnings
Julia Lawall [Tue, 14 Feb 2017 06:19:36 +0000 (07:19 +0100)]
drm/amd/dc: hw_sequencer: fix semicolon.cocci warnings

Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/dc: fix semicolon.cocci warnings
Julia Lawall [Tue, 14 Feb 2017 06:14:58 +0000 (07:14 +0100)]
drm/amd/dc: fix semicolon.cocci warnings

Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/dc: fix semicolon.cocci warnings
Julia Lawall [Tue, 14 Feb 2017 06:13:04 +0000 (07:13 +0100)]
drm/amd/dc: fix semicolon.cocci warnings

Remove unneeded semicolons.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Fix missing fcn pointer on DCE8
Jordan Lazare [Tue, 14 Feb 2017 20:03:04 +0000 (15:03 -0500)]
drm/amd/display: Fix missing fcn pointer on DCE8

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: Fix logic that causes segfault on DP display.
Zeyu Fan [Mon, 13 Feb 2017 16:49:07 +0000 (11:49 -0500)]
drm/amd/display: Fix logic that causes segfault on DP display.

Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com>
Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: color distortion after DPMS+ background color fix
Charlene Liu [Fri, 10 Feb 2017 22:51:27 +0000 (17:51 -0500)]
drm/amd/display: color distortion after DPMS+ background color fix

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: report cursor size base on the ASIC
Tony Cheng [Thu, 9 Feb 2017 03:13:52 +0000 (22:13 -0500)]
drm/amd/display: report cursor size base on the ASIC

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>
7 years agodrm/amd/display: Fix program pix clk logic to unblock deep color set.
Zeyu Fan [Fri, 10 Feb 2017 16:59:31 +0000 (11:59 -0500)]
drm/amd/display: Fix program pix clk logic to unblock deep color set.

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: Set ignore_msa_timing flag for freesync modes
Sylvia Tsai [Thu, 9 Feb 2017 21:35:39 +0000 (16:35 -0500)]
drm/amd/display: Set ignore_msa_timing flag for freesync modes

- Set ignore_msa_timing_param to 1 only for modes that can support freesync

Signed-off-by: Sylvia Tsai <sylvia.tsai@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Enable regamma 25 segments and use double buffer.
Vitaly Prosyak [Tue, 7 Feb 2017 16:41:37 +0000 (10:41 -0600)]
drm/amd/display: Enable regamma 25 segments and use double buffer.

Moved custom floating point calculation to the shared place
between dce's.

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: handle unsupported sink types
Reza Amini [Fri, 3 Feb 2017 19:19:41 +0000 (14:19 -0500)]
drm/amd/display: handle unsupported sink types

Signed-off-by: Reza Amini <reza.amini@amd.com>
Reviewed-by: Wesley Chalmers <Wesley.Chalmers@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 is not switching to DP when HDMI/DP hot plug/unplug
Hersen Wu [Wed, 8 Feb 2017 16:28:33 +0000 (11:28 -0500)]
drm/amd/display: Audio is not switching to DP when HDMI/DP hot plug/unplug

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: fix psr status wait
Dmytro Laktyushkin [Mon, 6 Feb 2017 20:07:19 +0000 (15:07 -0500)]
drm/amd/display: fix psr status wait

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Eagle Yeh <eagle.yeh@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 disp clock value in context rather than bw_results
Dmytro Laktyushkin [Thu, 2 Feb 2017 22:08:19 +0000 (17:08 -0500)]
drm/amd/display: use disp clock value in context rather than bw_results

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: Fix MST physical ports always disconnected
Krzysztof Nowicki [Fri, 27 Jan 2017 17:58:27 +0000 (18:58 +0100)]
drm/amd/display: Fix MST physical ports always disconnected

Remove a false assumption that a cached EDID will be present whenever
the connector is in a connected state as this will only be true for
logical MST ports. For physical ports the EDID will never be cached,
which will cause them to always appear as disconnected.

This reverts commit 4ff8a88888de271bfb7750b2a5c68163848e2bf1
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: fix crash with modesetting driver
Harry Wentland [Fri, 3 Feb 2017 16:45:43 +0000 (11:45 -0500)]
drm/amd/display: fix crash with modesetting driver

They might call commit with ACTION_NOTHING without a mode.
We shouldn't crash but simply skip updating stream scaling
settings since scaling obviously didn't change without a
provided mode.

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: Fixed color temperature corruption.
Yongqiang Sun [Thu, 2 Feb 2017 20:21:45 +0000 (15:21 -0500)]
drm/amd/display: Fixed color temperature corruption.

Signed-off-by: Yongqiang Sun <yongqiang.sun@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: Adding 10 bpcc video P010 format
Vitaly Prosyak [Wed, 1 Feb 2017 18:54:15 +0000 (12:54 -0600)]
drm/amd/display: Adding 10 bpcc video P010 format

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: HDMI YCbCr422 12bpc pixel format issue
Charlene Liu [Thu, 2 Feb 2017 01:35:53 +0000 (20:35 -0500)]
drm/amd/display: HDMI YCbCr422 12bpc pixel format issue

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 YCbCr pixel format shows green issue
Charlene Liu [Wed, 1 Feb 2017 01:18:05 +0000 (20:18 -0500)]
drm/amd/display: Fix YCbCr pixel format shows green issue

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Clear test pattern when enabling stream
Hersen Wu [Fri, 27 Jan 2017 20:44:26 +0000 (15:44 -0500)]
drm/amd/display: Clear test pattern when enabling stream

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: mclk level can't be 0.
Rex Zhu [Mon, 6 Feb 2017 04:37:44 +0000 (12:37 +0800)]
drm/amd/display: mclk level can't be 0.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@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 64-bit division
Harry Wentland [Mon, 6 Feb 2017 16:23:20 +0000 (11:23 -0500)]
drm/amd/display: Fix 64-bit division

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: remove CV-specific timing standard
Charlene Liu [Mon, 30 Jan 2017 22:35:59 +0000 (17:35 -0500)]
drm/amd/display: remove CV-specific timing standard

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@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: surface validation on dce100
Leon Elazar [Mon, 30 Jan 2017 15:25:43 +0000 (10:25 -0500)]
drm/amd/display: surface validation on dce100

Signed-off-by: Leon Elazar <leon.elazar@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 dcfclk reporting to pplib
Dmytro Laktyushkin [Wed, 25 Jan 2017 18:58:46 +0000 (13:58 -0500)]
drm/amd/display: add dcfclk reporting to pplib

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: Debug option to force enable ABM
Anthony Koo [Fri, 27 Jan 2017 22:50:03 +0000 (17:50 -0500)]
drm/amd/display: Debug option to force enable ABM

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: Support ABM without PPlib
Anthony Koo [Fri, 27 Jan 2017 22:22:46 +0000 (17:22 -0500)]
drm/amd/display: Support ABM without PPlib

Fix problem with loading IRAM

Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Make new pixel clock more obvious
Dmytro Laktyushkin [Tue, 24 Jan 2017 20:45:33 +0000 (15:45 -0500)]
drm/amd/display: Make new pixel clock more obvious

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: Move backlight from encoder to ABM
Anthony Koo [Tue, 24 Jan 2017 20:19:42 +0000 (15:19 -0500)]
drm/amd/display: Move backlight from encoder to ABM

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: DMCU Compile and Load
Anthony Koo [Mon, 23 Jan 2017 21:55:20 +0000 (16:55 -0500)]
drm/amd/display: DMCU Compile and Load

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: Change power gating off sequence to fix hang
Yongqiang Sun [Fri, 27 Jan 2017 15:29:01 +0000 (10:29 -0500)]
drm/amd/display: Change power gating off sequence to fix hang

Power off plane clear all the reg values includes cursor.
When OS call set cursor position, cursor address reg is cleared,
results in system hard hang.

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: DP compliance automation test fixes
Leon Elazar [Thu, 26 Jan 2017 23:03:16 +0000 (18:03 -0500)]
drm/amd/display: DP compliance automation test fixes

Fixes:
1. Removing pending flag since we are executing teh entire flow without context switches
2. Adding stream enablment - connection between DIG BE to DIG FE during test link training

Signed-off-by: Leon Elazar <leon.elazar@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: Expose hw sequencer gamma function
Yongqiang Sun [Wed, 25 Jan 2017 19:51:39 +0000 (14:51 -0500)]
drm/amd/display: Expose hw sequencer gamma function

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: Fix compile warnings
Anthony Koo [Wed, 25 Jan 2017 14:31:45 +0000 (09:31 -0500)]
drm/amd/display: Fix compile warnings

1. Fix init of integer
2. Fix mixed declarations

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: Rename atomic_commit parameter.
Andrey Grodzovsky [Tue, 24 Jan 2017 22:28:50 +0000 (17:28 -0500)]
drm/amd/display: Rename atomic_commit parameter.

This parameter name is misleading. It's previous
meaning confuses with ASYNC (immidiate flip)
which is totatlly different thing then nonblocking
commit.

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 sure to update address without flip
Harry Wentland [Tue, 24 Jan 2017 21:06:32 +0000 (16:06 -0500)]
drm/amd/display: Make sure to update address without flip

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: fix timing trace debug print
Dmytro Laktyushkin [Fri, 20 Jan 2017 22:14:23 +0000 (17:14 -0500)]
drm/amd/display: fix timing trace debug print

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 Warnings
Amy Zhang [Tue, 24 Jan 2017 14:50:05 +0000 (09:50 -0500)]
drm/amd/display: Fix Warnings

- Remove mixed declarations and unused variables

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: enable color gamma programming
Tony Cheng [Mon, 23 Jan 2017 22:51:17 +0000 (17:51 -0500)]
drm/amd/display: enable color gamma programming

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>
7 years agodrm/amd/display: Fixed 4K black issue by refactor update surface.
Yongqiang Sun [Mon, 23 Jan 2017 22:10:04 +0000 (17:10 -0500)]
drm/amd/display: Fixed 4K black issue by refactor update surface.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Check we got a stream in update_info_frame
Hersen Wu [Fri, 20 Jan 2017 20:54:13 +0000 (15:54 -0500)]
drm/amd/display: Check we got a stream in update_info_frame

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: clean up redundant logic
Tony Cheng [Thu, 19 Jan 2017 19:46:26 +0000 (14:46 -0500)]
drm/amd/display: clean up redundant logic

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>
7 years agodrm/amd/display: refactor dc_update_surfaces_for_stream
Tony Cheng [Fri, 20 Jan 2017 04:57:09 +0000 (23:57 -0500)]
drm/amd/display: refactor dc_update_surfaces_for_stream

- reuse existing helper functions
- helper function to make it more obvious which cases we can do optimize programming

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>
7 years agodrm/amd/display: improve debug-ability
Tony Cheng [Thu, 19 Jan 2017 15:57:56 +0000 (10:57 -0500)]
drm/amd/display: improve debug-ability

- make failure status obvious

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>
7 years agodrm/amd/display: prevent setting cursor position with no surface
Dmytro Laktyushkin [Thu, 19 Jan 2017 22:54:39 +0000 (17:54 -0500)]
drm/amd/display: prevent setting cursor position with no surface

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: Change update surface condition, fix surface transition corruption.
Yongqiang Sun [Thu, 19 Jan 2017 15:53:58 +0000 (10:53 -0500)]
drm/amd/display: Change update surface condition, fix surface transition corruption.

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: Proper de-allocation of OPP
Joshua Aberback [Tue, 17 Jan 2017 21:01:35 +0000 (16:01 -0500)]
drm/amd/display: Proper de-allocation of OPP

- refactor opp_destroy functions to dce common file
  - fixes memory leak, dce specific variations didn't free regamma_params
- remove unused dce110_regamma structure

Signed-off-by: Joshua Aberback <Joshua.Aberback@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: check surface size is at least as large as stream
Leon Elazar [Tue, 17 Jan 2017 21:16:04 +0000 (16:16 -0500)]
drm/amd/display: check surface size is at least as large as stream

Signed-off-by: Leon Elazar <leon.elazar@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 power gating debug flags
Harry Wentland [Thu, 19 Jan 2017 23:58:33 +0000 (18:58 -0500)]
drm/amd/display: Remove power gating debug flags

They're not used anywhere

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Don't reserve pipe for underlay on ASIC without underlay
Harry Wentland [Mon, 23 Jan 2017 16:49:24 +0000 (11:49 -0500)]
drm/amd/display: Don't reserve pipe for underlay on ASIC without underlay

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Jordan Lazare <Jordan.Lazare@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 missing dcc update on flip call
Dmytro Laktyushkin [Tue, 17 Jan 2017 22:40:13 +0000 (17:40 -0500)]
drm/amd/display: add missing dcc update on flip call

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: Clean index in irq init loop
Andrey Grodzovsky [Wed, 19 Apr 2017 17:55:35 +0000 (13:55 -0400)]
drm/amd/display: Clean index in irq init loop

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: Register on VLBLANK ISR.
Andrey Grodzovsky [Wed, 19 Apr 2017 17:29:11 +0000 (13:29 -0400)]
drm/amd/display: Register on VLBLANK ISR.

Switch from VUPDATE to VBLANK.

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: Add interrupt entries for VBLANK isr.
Andrey Grodzovsky [Mon, 16 Jan 2017 21:16:22 +0000 (16:16 -0500)]
drm/amd/display: Add interrupt entries for VBLANK isr.

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: Add missing MI masks
Leon Elazar [Tue, 17 Jan 2017 21:16:04 +0000 (16:16 -0500)]
drm/amd/display: Add missing MI masks

This will fix the memory Input programing with MST tiled display.
This Fix should fix connectivity problems with MST tiled Display

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 missing conditions in hw sequencer.
Zeyu Fan [Tue, 17 Jan 2017 20:14:11 +0000 (15:14 -0500)]
drm/amd/display: Fix missing conditions in hw sequencer.

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: rename BGRA8888 to ABGR8888
Tony Cheng [Tue, 17 Jan 2017 01:50:47 +0000 (20:50 -0500)]
drm/amd/display: rename BGRA8888 to ABGR8888

DC actually support ABGR8888 instead of BGRA8888 (R/B swap rather than endian swap) ,
rename to avoid confusion

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Remove meta_pitch
Dmytro Laktyushkin [Tue, 17 Jan 2017 16:18:55 +0000 (11:18 -0500)]
drm/amd/display: Remove meta_pitch

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: refactor clk_resync to avoid assertion
Tony Cheng [Tue, 17 Jan 2017 01:37:08 +0000 (20:37 -0500)]
drm/amd/display: refactor clk_resync to avoid assertion

- not all DCE has PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE bit defined.

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: HDR Enablement For Applications
Amy Zhang [Fri, 13 Jan 2017 21:49:26 +0000 (16:49 -0500)]
drm/amd/display: HDR Enablement For Applications

- Made sure dest color space is updated in stream and info frame
- Optimized segment distribution algorithm for regamma mapping

Signed-off-by: Amy Zhang <Amy.Zhang@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Set default degamma to sRGB instead of bypass
Amy Zhang [Fri, 13 Jan 2017 21:19:36 +0000 (16:19 -0500)]
drm/amd/display: Set default degamma to sRGB instead of bypass

Signed-off-by: Amy Zhang <Amy.Zhang@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: enable clock gating and dchubp power gating
Tony Cheng [Fri, 6 Jan 2017 20:55:47 +0000 (15:55 -0500)]
drm/amd/display: enable clock gating and dchubp power gating

also refactor to clean reduce loc to achieve same logic

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: remove calculate_adjustments in conversion.h
Tony Cheng [Sun, 15 Jan 2017 01:56:08 +0000 (20:56 -0500)]
drm/amd/display: remove calculate_adjustments in conversion.h

- these are moved to color module

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: remove dead code
Tony Cheng [Sun, 15 Jan 2017 01:56:08 +0000 (20:56 -0500)]
drm/amd/display: remove dead code

Signed-off-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 SIGNAL_TYPE_WIRELESS
Tony Cheng [Sun, 15 Jan 2017 01:48:21 +0000 (20:48 -0500)]
drm/amd/display: remove SIGNAL_TYPE_WIRELESS

Signed-off-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 hw_info_frame
Tony Cheng [Sun, 15 Jan 2017 01:36:14 +0000 (20:36 -0500)]
drm/amd/display: remove hw_info_frame

- construct using encoder_info_frame directly

Signed-off-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 hw_crtc_timing
Tony Cheng [Sat, 14 Jan 2017 23:57:57 +0000 (18:57 -0500)]
drm/amd/display: remove hw_crtc_timing

Signed-off-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 un-used defines and dead code
Tony Cheng [Sat, 14 Jan 2017 16:46:53 +0000 (11:46 -0500)]
drm/amd/display: remove un-used defines and dead code

Signed-off-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: assert if mask is 0 in set_reg_field_value_ex
Tony Cheng [Sat, 14 Jan 2017 06:44:52 +0000 (01:44 -0500)]
drm/amd/display: assert if mask is 0 in set_reg_field_value_ex

-  mask = 0 means something is wrong in caller and no register field will be updated

Signed-off-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: mode change without breaking unaffected streams
Tony Cheng [Fri, 13 Jan 2017 04:18:33 +0000 (23:18 -0500)]
drm/amd/display: mode change without breaking unaffected streams

- include clock constraint logic in validate
- in dc_commit_streams, include surfaces of unaffected streams

Signed-off-by: Yongqiang Sun <yongqiang.sun@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 pflip prepare and submit parts (v2)
Andrey Grodzovsky [Wed, 9 Nov 2016 10:41:51 +0000 (05:41 -0500)]
drm/amd/display: Use pflip prepare and submit parts (v2)

Use new functions so flip failures can be gracefully handled

v2:
Avoid -EINVAL returned from amdgpu_crtc_prepare_flip in some
error cases, it is not allowed according to expected
return values for atomic_commit hook.

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: No audio output heard from DP panel
Hersen Wu [Fri, 13 Jan 2017 15:10:26 +0000 (10:10 -0500)]
drm/amd/display: No audio output heard from DP panel

Signed-off-by: Hersen Wu <hersenxs.wu@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/amd/display: Fixing some fallout from dc_target removal
Leon Elazar [Wed, 11 Jan 2017 19:33:36 +0000 (14:33 -0500)]
drm/amd/display: Fixing some fallout from dc_target removal

Also avoid allocating memory dce110_set_output_transfer_func
if not needed

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: Disable Modules at Runtime
Anthony Koo [Thu, 12 Jan 2017 19:24:11 +0000 (14:24 -0500)]
drm/amd/display: Disable Modules at Runtime

Add NULL check in modules

Signed-off-by: Anthony Koo <anthony.koo@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: Output Transfer Function Regamma Refactor
Amy Zhang [Thu, 5 Jan 2017 22:12:20 +0000 (17:12 -0500)]
drm/amd/display: Output Transfer Function Regamma Refactor

- Create translation function to translate logical format to hw format
- Refactor to use transfer function in dc instead of input gamma

Signed-off-by: Amy Zhang <Amy.Zhang@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: Null check clock source.
Yongqiang Sun [Wed, 11 Jan 2017 20:52:06 +0000 (15:52 -0500)]
drm/amd/display: Null check clock source.

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_target object
Aric Cyr [Thu, 29 Dec 2016 20:27:12 +0000 (15:27 -0500)]
drm/amd/display: Remove dc_target object

dc_target does not fit well into DRM framework so removed it.
This will prevent the driver from leveraging the pipe-split
code for tiled displays, so will have to be handled at a higher
level.  Most places that used dc_target now directly use dc_stream
instead.

Signed-off-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: Pass visible flag into surface programming
Yongqiang Sun [Mon, 9 Jan 2017 14:42:33 +0000 (09:42 -0500)]
drm/amd/display: Pass visible flag into surface 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>
7 years agodrm/amd/display: Add Polaris12 to bw_calc
Joshua Aberback [Tue, 10 Jan 2017 19:05:49 +0000 (14:05 -0500)]
drm/amd/display: Add Polaris12 to bw_calc

Signed-off-by: Joshua Aberback <Joshua.Aberback@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 DTO as clock on DP if not
Ding Wang [Tue, 10 Jan 2017 17:47:37 +0000 (12:47 -0500)]
drm/amd/display: Use DTO as clock on DP if not

Use DVO as pixel clock for DP before enabling link
PHY. Otherwise, when switching from HDMI passive dongle
to DP on the same connector, the PHY PLL is used as
pixel clock, and CRTC would stop working.

Signed-off-by: Ding Wang <Ding.Wang@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: start using linux hdmi header
Dave Airlie [Mon, 9 Jan 2017 23:33:32 +0000 (09:33 +1000)]
drm/amd/display: start using linux hdmi header

DAL has defines for things, and it doesn't even use them itself.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: drop min/max wrappers
Dave Airlie [Mon, 9 Jan 2017 22:35:47 +0000 (08:35 +1000)]
drm/amd/display: drop min/max wrappers

These aren't needed, and aren't really used in too many places.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
7 years agodrm/amd/display: Support 64-bit Polaris11 5k VSR
Joshua Aberback [Mon, 9 Jan 2017 21:26:58 +0000 (16:26 -0500)]
drm/amd/display: Support 64-bit Polaris11 5k VSR

- pass full asic_id info into bw_calc_init instead of only version enum
- 64-bit Polaris11 needs an extra microsecond of dmif_urgent_latency
- add helper to convert from asic_id.family to bw_calc version enum

Signed-off-by: Joshua Aberback <Joshua.Aberback@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: When signal type of sink is none, use link type for stream
Joshua Aberback [Mon, 9 Jan 2017 19:43:08 +0000 (14:43 -0500)]
drm/amd/display: When signal type of sink is none, use link type for stream

Signed-off-by: Joshua Aberback <Joshua.Aberback@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 blank functionality
Hersen Wu [Fri, 6 Jan 2017 21:23:18 +0000 (16:23 -0500)]
drm/amd/display: set blank functionality

1. remove the sleep mechanism while set_blank true from
the timing generator.
Since Hw sequencer is the one that manages the flow
he will be responsible for wait for blanck in a critical places.

Signed-off-by: Leon Elazar <leon.elazar@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>