Eric Yang
35b71a3f6e
drm/amd/display: always call set output tf
...
Temporary solution to fix gamma adjustment not
working.
Signed-off-by: Eric Yang <Eric.Yang2@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-12-06 12:47:35 -05:00
Yongqiang Sun
e58d866e8d
drm/amd/display: Fixed not set scaler bug.
...
New scaler parameter assign to dpp is after early return,
cause next flip scaler not program.
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-12-06 12:47:35 -05:00
Tony Cheng
c12eefc257
drm/amd/display: dal 3.1.15
...
Signed-off-by: Tony Cheng <tony.cheng@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-12-06 12:47:34 -05:00
Eric Bernstein
8c15e81975
drm/amd/display: Remove unused OPP functions from interface
...
Signed-off-by: Eric Bernstein <eric.bernstein@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-12-06 12:47:34 -05:00
Ken Chalmers
d39b3acbf6
drm/amd/display: fix dcn10_hubbub_wm_read_state
...
The ALLOW_SR registers might not always be available.
Signed-off-by: Ken Chalmers <ken.chalmers@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:34 -05:00
SivapiriyanKumarasamy
a03f39a05a
drm/amd/display: Add transfer function to dc_surface_update
...
Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@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-12-06 12:47:33 -05:00
Hersen Wu
631aaa0af4
drm/amd/display: send display_count msg so SMU can enter S0i2
...
SMU can future lower voltages in long idle case when all display is off.
If all display output is turned off via DPMS, send display_count = 0
after all output are turned off.
otherwise send display_count msg before turning on display to make sure
SMU exit S0i2 state. before is not neccessary as we are out of S0i2
when driver execute code, but send message before anyways for correctness.
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:33 -05:00
Yongqiang Sun
0af4096db9
drm/amd/display: Modified front end initiail in init_hw
...
Optimized front end initial sequence, reset MPC module
properly.
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-12-06 12:47:33 -05:00
Dmytro Laktyushkin
42cf181b59
drm/amd/display: add warning on long reg_wait
...
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 >
2017-12-06 12:47:32 -05:00
Dmytro Laktyushkin
33af27bb11
drm/amd/display: remove unnecessary waits in dcn10
...
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 >
2017-12-06 12:47:32 -05:00
Dmytro Laktyushkin
bbe3f058ec
drm/amd/display: fix uninitialized variable warning
...
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 >
2017-12-06 12:47:32 -05:00
Dmytro Laktyushkin
3e64668d79
drm/amd/display: fix regamma programming
...
When new coefficients match cached we would skip setting regamma mode
Also, when doing a stream update we would program regamma for all pipes,
even thos that are not yet powered on. This resulted in never setting
regamma since we would cache before the pipe is powered.
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 >
2017-12-06 12:47:31 -05:00
Harry Wentland
a6114e854c
drm/amd/display: Fix some more color indentations
...
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 >
2017-12-06 12:47:31 -05:00
Harry Wentland
efd5220405
drm/amd/display: Bunch of indentation cleanups in color stuff
...
Trying to align with kernel coding style and make it a bit more
readable.
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 >
2017-12-06 12:47:30 -05:00
Yongqiang Sun
e6c258cb4e
drm/amd/display: Refactor disable front end pipes.
...
There are different code to disable front end, it is
difficult to debug and adding new process.
This refactor makes all disable front end call the same
functions.
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-12-06 12:47:30 -05:00
Tony Cheng
46f6b85cff
drm/amd/display: dal 3.1.14
...
Signed-off-by: Tony Cheng <tony.cheng@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-12-06 12:47:30 -05:00
Yue Hin Lau
5fa2ec4fad
drm/amd/display: renaming dpp function to follow naming convention
...
Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com >
Reviewed-by: Yuehin Lau <Yuehin.Lau@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:29 -05:00
Tony Cheng
37cf55bad9
drm/amd/display: dal 3.1.13
...
Signed-off-by: Tony Cheng <tony.cheng@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-12-06 12:47:29 -05:00
Yue Hin Lau
ea826d640d
drm/amd/display: call set csc_default if enable adjustment is false
...
Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com >
Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:29 -05:00
Eric Bernstein
6d56c57332
drm/amd/display: Add OPP DPG blank function
...
Added a function to blank data using OPP DPG.
Clean up code to prepare for pseudocode review with HW.
Signed-off-by: Eric Bernstein <eric.bernstein@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-12-06 12:47:28 -05:00
Tony Cheng
63340ae9a6
drm/amd/display: dal 3.1.12
...
Signed-off-by: Tony Cheng <tony.cheng@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-12-06 12:47:28 -05:00
Dmytro Laktyushkin
6334ac93a1
drm/amd/display: cache pwl params and scl_data to avoid extra programming
...
This saves us about 5000 reg writes per full update. This translates to about
40000 writes over the course of single eDP bootup.
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 >
2017-12-06 12:47:28 -05:00
Andrew Jiang
069d418f41
drm/amd/display: Don't use dc_link in link_encoder
...
dc_link is at a higher level than link_encoder, and we only want
higher-level components to be able to access lower-level ones,
not the other way around.
Signed-off-by: Andrew Jiang <Andrew.Jiang@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-12-06 12:47:27 -05:00
Harry Wentland
83c3e57bc4
drm/amd/display: Both timing_sync and multisync need stream_count > 1
...
Previous code threw a warning about misleading indentation
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:27 -05:00
Yongqiang Sun
073a45e824
drm/amd/display: Add tg_init interface.
...
Clear OPTC underflow status when init_hw.
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-12-06 12:47:26 -05:00
Yongqiang Sun
3861421252
drm/amd/display: Enalbe blank data double buffer after mpc disconnected.
...
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-12-06 12:47:26 -05:00
Eric Yang
7d8d90d84f
drm/amd/display: get remote dpcd caps for timing validation
...
Signed-off-by: Eric Yang <Eric.Yang2@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-12-06 12:47:26 -05:00
Yue Hin Lau
8a4cf458a8
drm/amd/display: Only update dchub if hubbub is available
...
Signed-off-by: Yue Hin Lau <Yuehin.Lau@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-12-06 12:47:25 -05:00
Eric Bernstein
bc71a20db2
drm/amd/display: Call ipp_program_bias_and_scale only if available
...
Also move some register definitions to common DCN regs.
Signed-off-by: Eric Bernstein <eric.bernstein@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-12-06 12:47:25 -05:00
Tony Cheng
f4dd6dca57
drm/amd/display: dal 3.1.11
...
Signed-off-by: Tony Cheng <tony.cheng@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-12-06 12:47:25 -05:00
Yue Hin Lau
e70fe3b1f0
drm/amd/display: hubbub function flipping true and false
...
no logic change
Signed-off-by: Yue Hin Lau <Yuehin.Lau@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-12-06 12:47:24 -05:00
Charlene Liu
c2a5b5008a
drm/amd/display: Do post_update_surfaces on new state
...
Signed-off-by: Charlene Liu <charlene.liu@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 >
2017-12-06 12:47:24 -05:00
Yue Hin Lau
ea00f2979b
drm/amd/display: function renaming for hubbub
...
following the naming convention with correct prefix
Signed-off-by: Yue Hin Lau <Yuehin.Lau@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-12-06 12:47:24 -05:00
Yue Hin Lau
afa9104b04
drm/amd/display: create new function prototype update_dchub for dcn
...
dcn version of update_dchub now uses hubbub instead of hwseq
Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com >
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:23 -05:00
Colin Ian King
288e46d398
drm/amdgpu/virt: remove redundant variable pf2vf_ver
...
Variable pf2vf_ver is assigned but never read, it is redundant and
hence can be removed.
Cleans up clang warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:310:3: warning: Value stored
to 'pf2vf_ver' is never read
Reivewed-by: Horace Chen <horace.chen@amd.com >
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:23 -05:00
Piotr Redlewski
c1fe75c9e4
drm/amd/amdgpu: fix UVD mc offsets
...
When UVD bo is created, its size is based on the information from firmware
header (ucode_size_bytes). The same value should be be used when programming
UVD mc controller offsets, otherwise it can happen that
(mmUVD_VCPU_CACHE_OFFSET2 + mmUVD_VCPU_CACHE_SIZE2) will point
AMDGPU_GPU_PAGE_SIZE bytes after the UVD bo end.
Second issue is that when programming the mmUVD_VCPU_CACHE_SIZE0 register,
AMDGPU_UVD_FIRMWARE_OFFSET should be taken into account. If it isn't,
(mmUVD_VCPU_CACHE_OFFSET2 + mmUVD_VCPU_CACHE_SIZE2) will always point
AMDGPU_UVD_FIRMWARE_OFFSET bytes after the UVD bo end.
v2: move firmware size calculation into macro definition
v3: align firmware size to the gpu page size
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Piotr Redlewski <predlewski@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:22 -05:00
Mikita Lipski
fa2123dbcc
drm/amd/display: Multi display synchronization logic
...
This feature synchronizes multiple displays with various timings
to a display with the highest refresh rate
it is enabled if edid caps flag multi_display_sync is set to one
There are limitations on refresh rates allowed
that can be synchronized. That would
prevent from underflow and other potential
corruptions.
Multi display synchronization is using the
same functions as timing_sync in order to minimize
redunduncy and decision to disable synchronization is
based on trigger parametre set in DM
Feature is developed for DCN1 and DCE11
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com >
Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:22 -05:00
Andrey Grodzovsky
79c631239a
drm/amdgpu: Implement BO size validation V2
...
Validates BO size against each requested domain's total memory.
v2:
Make GTT size check a MUST to allow fall back to GTT.
Rmove redundant NULL check.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:22 -05:00
Christian König
fdd5faaa08
drm/amdgpu: cleanup vm_size handling
...
It's pointless to have the same value twice, just always use max_pfn.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:21 -05:00
Christian König
c47b41a79a
drm/amdgpu: remove nonsense const u32 cast on ARRAY_SIZE result
...
Not sure what that should originally been good for, but it doesn't seem
to make any sense any more.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:21 -05:00
Chunming Zhou
6f16b4fb60
drm/amdgpu: use dep_sync for CS dependency/syncobj
...
Otherwise, they could be optimized by scheduled fence.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:21 -05:00
Xiangliang.Yu
75737cb4eb
drm/amdgpu/gfx8: Fix compute ring failure after resetting
...
Do ring clear before ring test, otherwise compute ring test will
fail after gpu resetting. Still can't find the root cause, just
workaround it.
Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com >
Acked-by: Monk Liu <Monk.Liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:20 -05:00
Christian König
add526b34a
drm/ttm: remove ttm_bo_unreserve_ticket
...
Just another alias for ttm_bo_unreserve.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:20 -05:00
Christian König
842cde0584
drm/ttm: user reservation object wrappers v2
...
Consistently use the reservation object wrappers instead of accessing
the ww_mutex directly.
Additional to that use the reservation object wrappers directly instead of
calling __ttm_bo_reserve with fixed parameters.
v2: fix typo
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:19 -05:00
Christian König
36a0680aac
drm/ttm: consistently use reservation_object_unlock
...
Instead of having a confusing wrapper or call the underlying ww_mutex
function directly.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:19 -05:00
Christian König
a376b0cedb
drm/ttm: move unlocking out of ttm_bo_cleanup_memtype_use
...
Needed for the next patch and makes the code quite a bit easier to
understand.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:19 -05:00
Chunming Zhou
45bfd9690a
drm/amd/scheduler: add WARN_ON for s_fence->parent
...
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:18 -05:00
Chunming Zhou
f4323bccd1
drm/amd/scheduler: fix page protection of cb
...
We must remove the fence callback.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:18 -05:00
Pixel Ding
1daee8b472
drm/amdgpu: revise retry init to fully cleanup driver
...
Retry at drm_dev_register instead of amdgpu_device_init.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Pixel Ding <Pixel.Ding@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-06 12:47:18 -05:00
Harry Wentland
baef9a196f
amdgpu/dm: Remove fb_location form fill_plane_attributes
...
We no longer set the framebuffer address here so this is now
dead code.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-04 16:41:46 -05:00