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>
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>
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>
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>
- 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>
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 [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>
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>
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>
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>
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 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Yongqiang Sun [Fri, 23 Dec 2016 15:18:08 +0000 (10:18 -0500)]
drm/amd/display: Set gamma to NULL at release
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>
Harry Wentland [Fri, 23 Dec 2016 15:53:24 +0000 (10:53 -0500)]
drm/amd/display: Don't use target before null check
It might blow up.
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>
Tony Cheng [Fri, 23 Dec 2016 12:20:53 +0000 (07:20 -0500)]
drm/amd/display: debug option to disable color module fucntionality
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, 23 Dec 2016 12:12:19 +0000 (07:12 -0500)]
drm/amd/display: debug opt disable hdmi deep color
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>
Andrew Wong [Thu, 22 Dec 2016 20:41:30 +0000 (15:41 -0500)]
drm/amd/display: DAL3: HDR10 Infoframe encoding
- Add HDR metadata struct
- Add register programming calculations
- Added HDR metadata to surface and update_surface
- Add HDR info packet programming for DP port
Signed-off-by: Andrew Wong <andrew.wong1@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>
Tony Cheng [Thu, 22 Dec 2016 19:54:50 +0000 (14:54 -0500)]
drm/amd/display: Allow multiple instance of DTO regs
Signed-off-by: Tony Cheng <tony.cheng@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>
Yongqiang Sun [Thu, 22 Dec 2016 18:07:11 +0000 (13:07 -0500)]
drm/amd/display: Fixed crash caused by unnecessary clock source in split pipe.
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>
Yongqiang Sun [Thu, 22 Dec 2016 15:48:19 +0000 (10:48 -0500)]
drm/amd/display: Fixed split update bug.
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>
Harry Wentland [Thu, 22 Dec 2016 15:25:57 +0000 (10:25 -0500)]
drm/amd/display: Fix licensing header
Signed-off-by: Harry Wentland <harry.wentland@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>
Yongqiang Sun [Wed, 21 Dec 2016 21:48:51 +0000 (16:48 -0500)]
drm/amd/display: Fixed crash
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>
Yongqiang Sun [Wed, 21 Dec 2016 16:13:48 +0000 (11:13 -0500)]
drm/amd/display: reset transfer_func to NULL on release
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>
Yongqiang Sun [Wed, 21 Dec 2016 16:16:48 +0000 (11:16 -0500)]
drm/amd/display: don't crash if stream is NULL when trying to share clocks
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>
Aric Cyr [Wed, 21 Dec 2016 01:24:24 +0000 (20:24 -0500)]
drm/amd/display: Implement gamma correction using input LUT
The dc_gamma in dc_surface will be programmed to the input
LUT if provided. If dc_gamma is not provided in dc_surface
regamma may be used to emulate gamma.
Some refactor and cleanup included as well.
Signed-off-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>
Tony Cheng [Tue, 20 Dec 2016 15:54:38 +0000 (10:54 -0500)]
drm/amd/display: track cursor width in ipp
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>