Yongqiang Sun
dcbd4ee0fa
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 >
2017-09-26 17:11:47 -04:00
Joshua Aberback
4d35b093e6
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 >
2017-09-26 17:11:42 -04:00
Leon Elazar
9c1a57d79d
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 >
2017-09-26 17:11:38 -04:00
Harry Wentland
cad3c7a997
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 >
2017-09-26 17:11:32 -04:00
Harry Wentland
f0e3db90a6
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 >
2017-09-26 17:11:28 -04:00
Dmytro Laktyushkin
adc9b14139
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 >
2017-09-26 17:11:25 -04:00
Andrey Grodzovsky
3d761e7990
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 >
2017-09-26 17:11:22 -04:00
Andrey Grodzovsky
b57de80a51
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 >
2017-09-26 17:11:15 -04:00
Andrey Grodzovsky
b10d51f8b0
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 >
2017-09-26 17:11:12 -04:00
Leon Elazar
b565ff86aa
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 >
2017-09-26 17:11:07 -04:00
Zeyu Fan
009432e581
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 >
2017-09-26 17:11:03 -04:00
Tony Cheng
8693049a89
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 >
2017-09-26 17:11:00 -04:00
Dmytro Laktyushkin
031ec27640
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 >
2017-09-26 17:10:57 -04:00
Tony Cheng
ab7044d0d1
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 >
2017-09-26 17:10:52 -04:00
Amy Zhang
534db19886
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 >
2017-09-26 17:10:47 -04:00
Amy Zhang
306dadf01a
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 >
2017-09-26 17:10:44 -04:00
Tony Cheng
e0d7ce783a
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 >
2017-09-26 17:10:41 -04:00
Tony Cheng
f33ad37feb
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 >
2017-09-26 17:10:37 -04:00
Tony Cheng
5e701406ed
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 >
2017-09-26 17:10:34 -04:00
Tony Cheng
a10eadfb15
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 >
2017-09-26 17:10:31 -04:00
Tony Cheng
6e4d6beec6
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 >
2017-09-26 17:10:26 -04:00
Tony Cheng
6235b23cb9
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 >
2017-09-26 17:10:23 -04:00
Tony Cheng
ac0e562c52
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 >
2017-09-26 17:10:19 -04:00
Tony Cheng
bf72726358
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 >
2017-09-26 17:10:12 -04:00
Tony Cheng
f84a8161cb
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 >
2017-09-26 17:10:07 -04:00
Andrey Grodzovsky
858058da47
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 >
2017-09-26 17:10:03 -04:00
Hersen Wu
721d30cf83
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 >
2017-09-26 17:09:59 -04:00
Leon Elazar
cc0cb445ae
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 >
2017-09-26 17:09:56 -04:00
Anthony Koo
7a1c37e00a
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 >
2017-09-26 17:09:52 -04:00
Amy Zhang
fcd2f4bf8b
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 >
2017-09-26 17:09:48 -04:00
Yongqiang Sun
457b74cb37
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 >
2017-09-26 17:09:44 -04:00
Aric Cyr
ab2541b673
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 >
2017-09-26 17:09:40 -04:00
Yongqiang Sun
624d7c4708
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 >
2017-09-26 17:09:37 -04:00
Joshua Aberback
02dfc70737
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 >
2017-09-26 17:09:33 -04:00
Ding Wang
0ea9e02af5
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 >
2017-09-26 17:09:30 -04:00
Dave Airlie
3e183c5f08
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 >
2017-09-26 17:09:26 -04:00
Dave Airlie
7d7024ca20
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 >
2017-09-26 17:09:23 -04:00
Joshua Aberback
00c91d0d48
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 >
2017-09-26 17:09:20 -04:00
Joshua Aberback
2796eaee69
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 >
2017-09-26 17:09:16 -04:00
Hersen Wu
4b5e7d6209
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 >
2017-09-26 17:09:13 -04:00
Leon Elazar
b06b7680e3
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 >
2017-09-26 17:09:09 -04:00
Arindam Nath
cf388c0da8
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 >
2017-09-26 17:09:06 -04:00
Xiangliang Yu
2555039d12
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 >
2017-09-26 17:09:02 -04:00
Yongqiang Sun
546b9b619b
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 >
2017-09-26 17:08:58 -04:00
Tony Cheng
c87af595c0
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 >
2017-09-26 17:08:55 -04:00
Tony Cheng
e33a18f333
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 >
2017-09-26 17:08:51 -04:00
Yongqiang Sun
10bff00592
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 >
2017-09-26 17:08:47 -04:00
Harry Wentland
e66e4d6428
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 >
2017-09-26 17:08:44 -04:00
Harry Wentland
e5cf325b0c
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 >
2017-09-26 17:08:41 -04:00
Harry Wentland
5727c77cf8
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 >
2017-09-26 17:08:37 -04:00