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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>