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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Leon Elazar [Thu, 5 Jan 2017 22:47:43 +0000 (17:47 -0500)]
drm/amd/display: blank mechanism for supporting MPO
blank/unblanck functionality apply_ctx_for_surface will update planes visibility
by manipulating Blender and CRTC HW modules.
Signed-off-by: Leon Elazar <leon.elazar@amd.com>
Reviewed-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>
Arindam Nath [Mon, 9 Jan 2017 06:20:27 +0000 (11:50 +0530)]
drm/amd/display: fix cursor disappearing after resume
Since during suspend, the cursor registers are cleared,
once the system resumes back, the cursor remains disabled.
cursor_set_attributes() only sets the cursor attributes
along with cursor size and surface address, but does not
enable the cursor back on.
We need to save the current cursor location so that
we can resume back to the same location. This is done
in dm_crtc_cursor_move(), where we save the current
cursor location into cursor_x and cursor_y. Later during
resume we use these same values to set the cursor
position along with cursor attributes.
Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Xiangliang Yu [Tue, 10 Jan 2017 09:34:52 +0000 (17:34 +0800)]
drm/amdgpu/virt: disable dc
Virtualization don't need the dc, disable it.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Yongqiang Sun [Fri, 6 Jan 2017 16:21:47 +0000 (11:21 -0500)]
drm/amd/display: Don't fail validation for SIGNAL_TYPE_VIRTUAL
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tony Cheng [Thu, 5 Jan 2017 17:59:34 +0000 (12:59 -0500)]
drm/amd/display: remove HDMI deep color debug flag
Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tony Cheng [Thu, 5 Jan 2017 16:29:27 +0000 (11:29 -0500)]
drm/amd/display: fix Infoframe byte 28-31 doesn't get written out to register
Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Yongqiang Sun [Thu, 5 Jan 2017 16:26:59 +0000 (11:26 -0500)]
drm/amd/display: Check hdr support before setting.
In case of programing info frame to
some monitors don't support HDR, it will
result in black screen or corruption when
unplug monitor.
By checking hdr flag to avoid unnecessary
setting for monitors don't support HDR.
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Harry Wentland [Wed, 4 Jan 2017 23:54:29 +0000 (18:54 -0500)]
drm/amd/display: Fix wrong index bug in set_avi_info_frame
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Harry Wentland [Wed, 4 Jan 2017 23:48:07 +0000 (18:48 -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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Harry Wentland [Wed, 4 Jan 2017 23:43:04 +0000 (18:43 -0500)]
drm/amd/display: Fix misleading indentation bug in link_encoder
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Harry Wentland [Wed, 4 Jan 2017 23:41:25 +0000 (18:41 -0500)]
drm/amd/display: Remove unused function in gamma_calcs
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Andrey Grodzovsky [Thu, 29 Dec 2016 18:21:31 +0000 (13:21 -0500)]
drm/amd/display: [MST] Fix startup sequence v3.
Problem: MST topology discovery was started before fbdev
init causing kernel panic on boot.
Fix: Defer MST to late init hook, after fbdev strucutres
already initilized.
v2: Add explicit late_init hook function in DAL.
v3:
Change signature of detect_mst_link_for_all_connectors
from void* to drm_dev*
Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Hersen Wu [Wed, 4 Jan 2017 15:22:35 +0000 (10:22 -0500)]
drm/amd/display: Fix DP PHY test pre-emphasis not set properly
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Roman Li [Tue, 3 Jan 2017 18:46:45 +0000 (13:46 -0500)]
drm/amd/display: fix gamma for dpms usecase
For dpms usecase we need to set surface transfer function
regardless of gamma set flag.
Signed-off-by: Roman Li <Roman.Li@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>
Tony Cheng [Tue, 3 Jan 2017 17:40:40 +0000 (12:40 -0500)]
drm/amd/display: limit HBR3 support to Polaris and up
- also fix YCbCr420 supported on Polaris and up
Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tony Cheng [Thu, 29 Dec 2016 15:56:32 +0000 (10:56 -0500)]
drm/amd/display: simplify link_encoder
- remove unnecessary feature flags
- remove wireless and VGA validation
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>
Hersen Wu [Thu, 29 Dec 2016 19:58:54 +0000 (14:58 -0500)]
drm/amd/display: Fix link retraining hw sequence for auto test
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Zeyu Fan [Fri, 23 Dec 2016 21:53:12 +0000 (16:53 -0500)]
drm/amd/display: Fix link retraining hw sequence
Signed-off-by: Zeyu Fan <Zeyu.Fan@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Harry Wentland [Thu, 29 Dec 2016 20:27:07 +0000 (15:27 -0500)]
drm/amd/display: Remove unused color and power modules
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tony Cheng [Fri, 23 Dec 2016 16:08:43 +0000 (11:08 -0500)]
drm/amd/display: enable option to disable HDR related updates.
Signed-off-by: Tony Cheng <tony.cheng@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>
Anthony Koo [Fri, 23 Dec 2016 20:43:04 +0000 (15:43 -0500)]
drm/amd/display: Fix color module crash when hotplug monitors.
Assume we have two monitors, and monitor 0 is unplugged.
This shifts the internal state of index 1 to index 0 by memcpy.
This means there are two copies of the gamma pointer previously
owned by state[1].
When hotplug occurs, this re-assigns the new display with state[1],
which has some garbage left over from before, including the
gamma pointer.
We should correctly clear unused states and re-initialize correctly.
Also, due to async nature of the hotplug and other events like commit,
we also need to safe guard against sink that has been removed.
Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@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>