Rex Zhu
84877256f6
drm/amd/pp: Add querying current gfx voltage for CI/VI
...
Store the voltage regulator configuration,
so we can properly query the voltage.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:49 -05:00
Rex Zhu
680731ade5
drm/amd/pp: Export registers for read vddc on VI/Vega10
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:49 -05:00
Rex Zhu
039fdc94c1
drm/amd/pp: Add memory clock info display on Cz/St
...
show mclk info as in MHz on Cz/St as
0: 333Mhz *
1: 800Mhz
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:48 -05:00
Christian König
5a4633c4b8
drm/amdgpu: forward pasid to backend flush implementations
...
rd the pasid from the VM code to the emit_vm_flush function and update
all implementations with the new parameter.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:47 -05:00
Christian König
ba35222437
drm/amdgpu: trace the PASID instead of the VM pointer
...
Makes more sense than tracing the kernel pointer.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:47 -05:00
Christian König
c35ff18823
drm/amdgpu: trace allocated PASIDs
...
Trace all allocated PASIDs.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:46 -05:00
Christian König
5c2ff9a60d
drm/amdgpu: always allocate a PASIDs for each VM v2
...
Start to always allocate a pasid for each VM.
v2: use dev_warn when we run out of PASIDs
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:46 -05:00
Christian König
4b5f755049
drm/amdgpu: add amdgpu_pasid_free_delayed v2
...
Free up a pasid after all fences signaled.
v2: also handle the case when we can't allocate a fence array.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:45 -05:00
Christian König
373ac645c9
drm/amdgpu: move PD/PT address calculation into backend function
...
This way we can better handle the differences for CPU based updates.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:45 -05:00
Christian König
132f34e4b5
drm/amdgpu: move struct gart_funcs into amdgpu_gmc.h
...
And rename it to struct gmc_funcs.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Samuel Li <Samuel.Li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:44 -05:00
Christian König
770d13b19f
drm/amdgpu: move struct amdgpu_mc into amdgpu_gmc.h
...
And rename it to amdgpu_gmc as well.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Samuel Li <Samuel.Li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:43 -05:00
Christian König
da320625de
drm/amdgpu: remove agp_base
...
No AGP support for in this driver.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Samuel Li <Samuel.Li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:43 -05:00
Christian König
904a3374a9
drm/amdgpu: print the PASID with VM faults on GMC v8
...
Print that extra information on GMC v8.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:42 -05:00
Christian König
a9f7cd1b0b
drm/amdgpu: print the PASID with VM faults on GMC v7
...
Print that extra information on GMC v7.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:42 -05:00
Christian König
3816e42f5f
drm/amdgpu: rename pas_id to pasid
...
sed -i "s/pas_id/pasid/g" drivers/gpu/drm/amd/amdgpu/*.c
sed -i "s/pas_id/pasid/g" drivers/gpu/drm/amd/amdgpu/*.h
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:41 -05:00
Samuel Li
09052fc376
drm/amdgpu: Move to gtt before cpu accesses dma buf.
...
To improve cpu read performance. This is implemented for APUs currently.
v2: Adapt to change https://lists.freedesktop.org/archives/amd-gfx/2017-October/015174.html
v3: Adapt to change "forward begin_cpu_access callback to drivers"
v4: Instead of v3, reuse drm_gem dmabuf_ops here. Also some minor fixes as suggested.
v5: only set dma_buf ops when it is valid (Samuel)
Signed-off-by: Samuel Li <Samuel.Li@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:41 -05:00
Harry Wentland
6e227308a9
drm/amd/display: Enable VM support only on APUs newer than CZ
...
VM support is only available for CZ and newer APUs. Trying to
enable it for dGPU will blow up in DC.
v2: Don't enable gpu_vm_support for Raven yet since it leads to
a black screen. Need to debug this further before enabling.
Change-Id: Ibe467c36affe2e7a7ee740c8d4f73027ca807178
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Suggested-by: Alex Deucher <alexander.deucher@amd.com >
CC: Christian Koenig <christian.koenig@amd.com >
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:40 -05:00
Alex Deucher
2c9c178b7d
drm/amdgpu: only allow scatter/gather display with DC
...
Check if DC is enabled before allowing scanout buffers
to be pinned in system memory.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:39 -05:00
Christian König
5d43be0ccb
drm/amdgpu: allow framebuffer in GART memory as well
...
On CZ and newer APUs we can pin the fb into GART as well as VRAM.
v2: Don't enable gpu_vm_support for Raven yet since it leads to
a black screen. Need to debug this further before enabling.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Samuel Li <samuel.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:39 -05:00
Yong Zhao
c8553f4bd2
drm/amdgpu: Update MMHUB power gating register settings
...
The new register settings are needed to fix a tlb invalidation issue
when MMHUB power gating is turned on for Raven.
Signed-off-by: Yong Zhao <yong.zhao@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Acked-by: Eric Huang <JinhuiEric.Huang@amd.com >
Reviewed-by: Eric Huang <JinhuiEric.Huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:38 -05:00
Krunoslav Kovac
6d9ac917e6
drm/amd/display: [RS4][RV] SDR Brightness Boost
...
We assume FP16 1.0 frame buffer value maps to 80 nits.
DC changes are to make this configurable.
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@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 >
2018-02-19 14:17:38 -05:00
Eric Bernstein
529c690ba8
drm/amd/display: Update dcn10_init_hw for FPGA
...
Update dcn10_init_hw such that initialization of relevant
HW blocks for Maximus FPGA are also initialized (and not skipped).
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 >
2018-02-19 14:17:37 -05:00
Leo (Sunpeng) Li
28dc87e41f
drm/amd/display: Implement CRTC CRC for DCE110
...
Implement the timing generator hooks for configure_crc and get_crc.
Also implement is_tg_enabled, as configure_crc uses it.
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:37 -05:00
Leo (Sunpeng) Li
31aec354f9
drm/amd/display: Implement interface for CRC on CRTC
...
Add interfaces in DC for per CRTC CRC configuration and fetching.
Also implement amdgpu_dm functions to hook onto DRM.
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-02-19 14:17:36 -05:00
Eric Bernstein
8cb1545cad
drm/amd/display: clean up DCHUBBUB register definition in hwseq
...
Cleanup to remove unused register definition from hw sequencer
header file since implementation moved from hw sequencer to dchubub file.
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 >
2018-02-19 14:17:35 -05:00
Yongqiang Sun
365acbaf46
drm/amd/display: Refactor remove mpcc processing.
...
No need to use loop find opp, use opp in stream_res.
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 >
2018-02-19 14:17:35 -05:00
Yongqiang Sun
be2f449a19
drm/amd/display: Move opp reg access from hwss to opp module.
...
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 >
2018-02-19 14:17:34 -05:00
Charlene Liu
c4bd27ac1a
drm/amd/display: disablePSR in UpdatePlanes in PassiveLevel
...
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 >
2018-02-19 14:17:34 -05:00
Roman Li
bc373a890f
drm/amd/display: Fix null-derefs on non-dcn builds
...
Fixing regression introduced by
'Use real BE and FE index to program regs.'
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 >
2018-02-19 14:17:33 -05:00
Yongqiang Sun
f8e413bf3c
drm/amd/display: Move dpp reg access from hwss to dpp module.
...
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 >
2018-02-19 14:17:33 -05:00
Yongqiang Sun
2e9d6a571c
drm/amd/display: Check opplist in pipe ctx not in res pool.
...
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 >
2018-02-19 14:17:32 -05:00
Harry Wentland
978cc9728f
drm/amd/display: Drop dm_connector_update_modes
...
It's unused since the drm_edid_to_eld cleanup
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 >
2018-02-19 14:17:31 -05:00
Andrew Jiang
405c50a07d
drm/amd/display: Fix check for setting input TF
...
We no longer change the plane state pointer for full updates, and as
such, we weren't setting the input transfer function and programming the
degamma registers when we are supposed to. Check for a full update, an
input TF change, or a gamma change in the update flags instead to correct
this.
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 >
2018-02-19 14:17:31 -05:00
Nikola Cornij
e56ae556e1
drm/amd/display: Define remove_stream_from_ctx resource func
...
This will allow us to clean up resources on a stream as needed.
Signed-off-by: Nikola Cornij <nikola.cornij@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 >
2018-02-19 14:17:30 -05:00
Harry Wentland
f4791779ae
drm/amd/display: Make create_stream_for_sink more consistent
...
We've got a helper function to call dc_create_stream_for_sink and one
other place that calls it directly. Make sure we call the helper
functions always since we need to update a bunch of things in stream and
don't want to miss that.
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 >
2018-02-19 14:17:30 -05:00
Harry Wentland
c7e74f4959
drm/amd/display: Log which clocks are unsupported
...
It would be useful to know which clocks are unsupported when logging an
error message about unsupported clocks.
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 >
2018-02-19 14:17:29 -05:00
Yongqiang Sun
e07f541f50
drm/amd/display: Use real BE and FE index to program regs.
...
In case of some pipes are fused, pipe_idx should not
be used to program pipe regs. Instead of that, BE and FE
inst number should be used for reg index.
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 >
2018-02-19 14:17:29 -05:00
Yongqiang Sun
c8242b9858
drm/amd/display: Move hubp reg access from hwss to hubp module.
...
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 >
2018-02-19 14:17:28 -05:00
Harry Wentland
9f921b147b
drm/amd/display: Debug-print reason for mode validation failure
...
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 >
2018-02-19 14:17:27 -05:00
Harry Wentland
f2c7c55b0e
drm/amd/display: Don't block dual-link DVI modes
...
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 >
2018-02-19 14:17:27 -05:00
Harry Wentland
7e98ab1035
drm/amd/display: Don't allow dual-link DVI on all ASICs.
...
Our APUs (Carrizo, Stoney, Raven) don't support it.
v2: Don't use is_apu as other ASICs might also not support it
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 >
2018-02-19 14:17:26 -05:00
Harry Wentland
a39438f0b9
drm/amd/display: Debug print when validate_stream fails
...
It might be good to understand why validate fails.
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 >
2018-02-19 14:17:26 -05:00
Yongqiang Sun
25292028d7
drm/amd/display: Disable eDP with a proper sequence.
...
Proper sequence should be:
disable backlight
dp blank
disable output
edp power off
In enable accelatate mode, all the encoder and controller
are disabled, so move disable eDP to the function is the
easiest way to implement.
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 >
2018-02-19 14:17:25 -05:00
Tony Cheng
34d924f598
drm/amd/display: dal 3.1.28
...
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 >
2018-02-19 14:17:25 -05:00
Harry Wentland
3d5bae9eb7
drm/amd/display: Pass signal directly to enable_tmds_output
...
This makes the check for HDMI and dual-link DVI a bit more
straightforward.
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 >
2018-02-19 14:17:24 -05:00
Harry Wentland
64245fa72d
drm/amd/display: Remove unnecessary fail labels in create_stream_for_sink
...
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 >
2018-02-19 14:17:23 -05:00
Harry Wentland
eb6c24a3e6
drm/amd/display: Move MAX_TMDS_CLOCK define to header
...
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 >
2018-02-19 14:17:23 -05:00
Yongqiang Sun
91178796ba
drm/amd/display: disable eDP backlight for extend monitor only reboot use case.
...
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 >
2018-02-19 14:17:22 -05:00
Krunoslav Kovac
146a9f6368
drm/amd/display: Pass full 3x4 remap matrix for color transform
...
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@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 >
2018-02-19 14:17:22 -05:00
Mikita Lipski
03736f4cf8
drm/amd/display: Prevent master programming in multisync
...
Verify that the stream is master - and program only the slave displays
Signed-off-by: Mikita Lipski <mikita.lipski@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 >
2018-02-19 14:17:21 -05:00