Tony Cheng
d98e5cc2dd
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 >
2017-09-26 17:17:51 -04:00
Andrey Grodzovsky
2d60ded132
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 >
2017-09-26 17:17:44 -04:00
Andrey Grodzovsky
92cc37fba0
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 >
2017-09-26 17:17:40 -04:00
Harry Wentland
5f42aa394e
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 >
2017-09-26 17:17:10 -04:00
Andrey Grodzovsky
54f5499a54
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 >
2017-09-26 17:17:05 -04:00
Charlene Liu
92a65e32ad
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 >
2017-09-26 17:17:02 -04:00
Harry Wentland
67a277055b
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 >
2017-09-26 17:16:58 -04:00
Charlene Liu
f0828115ef
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 >
2017-09-26 17:16:55 -04:00
Harry Wentland
e7738c8a50
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 >
2017-09-26 17:16:51 -04:00
Harry Wentland
a49dcb88e8
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 >
2017-09-26 17:16:48 -04:00
Dmytro Laktyushkin
3853c184ed
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 >
2017-09-26 17:16:42 -04:00
Harry Wentland
c2e218dda0
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 >
2017-09-26 17:16:39 -04:00
Dmytro Laktyushkin
ce9c088051
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 >
2017-09-26 17:16:35 -04:00
Dmytro Laktyushkin
cf43759306
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 >
2017-09-26 17:16:31 -04:00
Dmytro Laktyushkin
45209ef719
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 >
2017-09-26 17:16:27 -04:00
Harry Wentland
6480136967
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 >
2017-09-26 17:16:22 -04:00
Harry Wentland
0d70570f71
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 >
2017-09-26 17:16:18 -04:00
Leon Elazar
1781958ff4
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 >
2017-09-26 17:16:14 -04:00
Dmytro Laktyushkin
227d251899
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 >
2017-09-26 17:16:09 -04:00
Jordan Lazare
5936223f7b
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 >
2017-09-26 17:16:06 -04:00
Amy Zhang
3548f0731a
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 >
2017-09-26 17:16:02 -04:00
Charlene Liu
d5b4f2bcff
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 >
2017-09-26 17:15:58 -04:00
Charlene Liu
4b679bc3ca
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 >
2017-09-26 17:15:54 -04:00
Dmytro Laktyushkin
4ef3a67b6a
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 >
2017-09-26 17:15:47 -04:00
Andrey Grodzovsky
dd55d12c26
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 >
2017-09-26 17:15:43 -04:00
Harry Wentland
b0fb632f9b
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 >
2017-09-26 17:15:39 -04:00
Charlene Liu
181a888fcd
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 >
2017-09-26 17:15:36 -04:00
Charlene Liu
896b3cb3f4
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 >
2017-09-26 17:15:33 -04:00
Charlene Liu
87b58768ec
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 >
2017-09-26 17:15:30 -04:00
Zeyu Fan
185189dc51
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 >
2017-09-26 17:15:25 -04:00
Zeyu Fan
2b230ea3e7
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 >
2017-09-26 17:15:22 -04:00
Amy Zhang
70063a5957
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 >
2017-09-26 17:15:18 -04:00
Ken Chalmers
5c1879b6b9
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 >
2017-09-26 17:15:15 -04:00
Harry Wentland
7d4e9bf983
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 >
2017-09-26 17:15:10 -04:00
Jordan Lazare
beed42b5bc
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 >
2017-09-26 17:15:06 -04:00
Harry Wentland
4a9054dda6
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 >
2017-09-26 17:15:02 -04:00
Julia Lawall
e166ad43d5
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 >
2017-09-26 17:14:58 -04:00
Julia Lawall
17a96033da
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 >
2017-09-26 17:14:54 -04:00
Julia Lawall
5866e7cf7d
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 >
2017-09-26 17:14:49 -04:00
Jordan Lazare
26ada804d6
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 >
2017-09-26 17:14:42 -04:00
Zeyu Fan
77f36b2712
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 >
2017-09-26 17:14:38 -04:00
Charlene Liu
b3c64dff24
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 >
2017-09-26 17:14:35 -04:00
Tony Cheng
a37656b99a
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 >
2017-09-26 17:14:31 -04:00
Zeyu Fan
27e947b0e1
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 >
2017-09-26 17:14:27 -04:00
Sylvia Tsai
8f16f28936
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 >
2017-09-26 17:14:23 -04:00
Vitaly Prosyak
e266fdf694
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 >
2017-09-26 17:14:18 -04:00
Reza Amini
67c3bd40b3
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 >
2017-09-26 17:14:12 -04:00
Hersen Wu
ab8812a386
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 >
2017-09-26 17:14:08 -04:00
Dmytro Laktyushkin
871ffb606a
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 >
2017-09-26 17:14:04 -04:00
Dmytro Laktyushkin
a99240d5f8
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 >
2017-09-26 17:14:00 -04:00