Harry Wentland
be3cb58883
drm/amd/display: Error print when ATOM BIOS implementation is missing
...
We fail apply_ctx_to_hw when crtc_source_select is missing. This isn't
really helpful at this point. It would aid ASIC bringup if we log an error
when we can't find the implementation for the ATOM version.
Do the same for all other function points in the command table that do a
NULL check before being called.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Roman Li <Roman.Li@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 >
2017-12-20 14:45:58 -05:00
Harry Wentland
4486c3fcdf
drm/amd/display: Remove dead enable_plane function definition and call
...
Signed-off-by: Harry Wentland <harry.wentland@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 >
2017-12-20 14:45:52 -05:00
Harry Wentland
63b371ec54
drm/amd/display: Print type if we get wrong ObjectID from bios
...
We've seen a bunch of issues where we can't get the connector from vbios
for what we think should be a valid connector id. Print some more info
when this happens.
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-20 14:45:40 -05:00
Rex Zhu
923a50a686
drm/amd/pp: Implement force_dpm_level on Rv
...
user can change dpm level on Rv through sysfs
v3: add smu version check
v2: fix no return statement
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 >
2017-12-20 11:59:40 -05:00
Rex Zhu
f49e9bac19
drm/amd/pp: Get and save Rv smu version
...
The smu firmware is loaded by the sbios on APUs, so query it
from the smu and save the smu fw version info that is reported
to userspace.
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 >
2017-12-20 11:59:21 -05:00
Rex Zhu
82eb0f3071
drm/amd/pp: update smu_version value for CI/VI
...
Set the new common smu firmware version for smu7 parts (CI and VI).
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 >
2017-12-20 11:57:14 -05:00
Rex Zhu
d100033b2a
drm/amd/pp: Move smu_version to common code
...
Move the smu_version to struct hwmgr, so it can be shared
by other asics.
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 >
2017-12-20 11:56:48 -05:00
Alex Deucher
04a0d2d9a6
drm/amdgpu: use defines for mmBIF_IOV_FUNC_IDENTIFIER fields
...
Rather than magic numbers.
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-19 23:44:13 -05:00
Alex Deucher
57ad33a307
drm/amdgpu: only check mmBIF_IOV_FUNC_IDENTIFIER on tonga/fiji
...
We only support SR-IOV on tonga/fiji. Don't check this register
on other VI parts.
Fixes: 048765ad5a
(amdgpu: fix asic initialization for virtualized environments (v2))
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2017-12-19 23:40:51 -05:00
Rex Zhu
ea478d01ed
drm/amd/pp: export more smu message on Rv
...
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 >
2017-12-19 12:11:58 -05:00
Rex Zhu
8621bbbbd3
drm/amd/pp: delete repeated call of force_dpm_level
...
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 >
2017-12-19 12:11:58 -05:00
Rex Zhu
582dd5da5c
drm/amd/pp: implement phm_reset_power_profile_state
...
mv related code out of force_dpm_level to
phm_reset_power_profile_state
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 >
2017-12-19 12:11:57 -05:00
Rex Zhu
29411f05c6
drm/amd/pp: delete dead code of arbiter overdriver clk
...
for sclk/mclk, can be adjusted through sysfs.
for uvd/vce clk, will be adjusted case by case when
requested.
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 >
2017-12-19 12:11:57 -05:00
Andrey Grodzovsky
2456252368
Revert "drm/amd/amdgpu: set gtt size according to system memory size only"
...
This reverts commit ba851eed895c76be0eb4260bdbeb7e26f9ccfaa2.
With that change piglit max size tests (running with -t max.*size) are causing
OOM and hard hang on my CZ with 1GB RAM.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Roger He <Hongbo.He@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 11:53:24 -05:00
Christian König
6a42fd6fbf
drm/amdgpu: implement 2+1 PD support for Raven v3
...
Instead of falling back to 2 level and very limited address space use
2+1 PD support and 128TB + 512GB of virtual address space.
v2: cleanup defines, rebase on top of level enum
v3: fix inverted check in hardware setup
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-and-Tested-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 11:53:08 -05:00
Jim Qu
3b1186fd2a
drm/amdgpu: restore uvd fence seq in uvd resume
...
otherwise, uvd block will be never powered up in ring begin_use()
callback. uvd ring test will be fail in resume in rumtime pm.
Signed-off-by: Jim Qu <Jim.Qu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 11:52:39 -05:00
Jim Qu
8daf94e900
drm/amdgpu: always cancel uvd idle handler in uvd suspend
...
Signed-off-by: Jim Qu <Jim.Qu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 11:51:59 -05:00
Alex Deucher
041d9d93b5
drm/amdgpu: rename amdgpu_get_pcie_info
...
add device to the name for consistency.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 11:00:08 -05:00
Alex Deucher
6b8f4ee56f
drm/amdgpu: move amdgpu_need_backup to amdgpu_object.c
...
It's the only place it's used.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 11:00:03 -05:00
Alex Deucher
5f152b5e69
drm/amdgpu: rename amdgpu_gpu_recover
...
add device to the name for consistency.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:58 -05:00
Alex Deucher
55e0037aab
drm/amdgpu: move dummy page functions to amdgpu_gart.c
...
It's the only place they are used.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:52 -05:00
Alex Deucher
39c640c086
drm/amdgpu: rename amdgpu_need_post
...
add device to the name for consistency.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:46 -05:00
Alex Deucher
2990a1fc01
drm/amdgpu: rename ip block helper functions
...
add device to the name for consistency.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:40 -05:00
Alex Deucher
f5ec697e37
drm/amdgpu: move fw_reserve functions to amdgpu_ttm.c
...
It's the only place they are used.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:35 -05:00
Alex Deucher
2543e28a81
drm/amdgpu: rename amdgpu_*_location functions
...
add device to the name for consistency.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:28 -05:00
Alex Deucher
22cb016437
drm/amdgpu: move amdgpu_doorbell_get_kfd_info to amdgpu_amdkfd.c
...
It's the only place it's used.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:23 -05:00
Alex Deucher
8111c38727
drm/amdgpu: rename amdgpu_pci_config_reset
...
add device for consistency with other functions in this file.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:18 -05:00
Alex Deucher
9c3f2b5474
drm/amdgpu: rename amdgpu_program_register_sequence
...
add device for consistency with other functions in this file.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:13 -05:00
Alex Deucher
131b4b3686
drm/amdgpu: rename amdgpu_wb_* functions
...
add device for consistency.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:07 -05:00
Alex Deucher
75758255dc
drm/amdgpu: move debugfs functions to their own file
...
amdgpu_device.c was getting pretty cluttered.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:59:01 -05:00
Alex Deucher
cdd61df614
drm/amdgpu: rename amdgpu_suspend to amdgpu_device_ip_suspend
...
for consistency with the other functions in that file.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:58:54 -05:00
Alex Deucher
06ec907054
drm/amdgpu: use consistent naming for static funcs in amdgpu_device.c
...
Prefix the functions with device or device_ip for functions which
deal with ip blocks for consistency.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:58:47 -05:00
Alex Deucher
4e89df63c1
drm/amdgpu: move atom functions from amdgpu_device.c
...
and move them to amdgpu_atombios.c for consistency.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-18 10:58:35 -05:00
Colin Ian King
a89ff457d6
drm/amd/display: remove redundant null check of array 'data'
...
The null check on aconnector->base.edid_blob_ptr->data is redundant
since data is an array and can never be null. Remove it.
Detected by CoverityScan, CID#1460369 ("Array compared against 0")
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-15 17:15:09 -05:00
Alex Deucher
a7ea6548a5
drm/amdgpu: setup the shared and private apertures on gfx9
...
Same as previous asics. This was not yet set for gfx9.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-15 17:15:09 -05:00
Andrey Grodzovsky
8854695add
drm/amdgpu: Simplify amdgpu_lockup_timeout usage.
...
With introduction of amdgpu_gpu_recovery we don't need any more
to rely on amdgpu_lockup_timeout == 0 for disabling GPU reset.
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-15 17:15:00 -05:00
Andrey Grodzovsky
dcebf026e6
drm/amdgpu: Add gpu_recovery parameter
...
Add new parameter to control GPU recovery procedure.
v2:
Add auto logic where reset is disabled for bare metal and enabled
for SR-IOV.
Allow forced reset from debugfs.
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-15 17:14:50 -05:00
Roger He
3e98d829ad
drm/ttm: use an ttm operation ctx for ttm_bo_move_xxx
...
include ttm_bo_move_memcpy and ttm_bo_move_ttm
Signed-off-by: Roger He <Hongbo.He@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-15 17:14:25 -05:00
Roger He
9251859a9a
drm/amdgpu: set allow_reserved_eviction and resv when bo allocation and cs
...
enable eviction of other per VM BOs during allocation and allows
reaping of deleted BOs during CS.
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Roger He <Hongbo.He@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-15 17:10:54 -05:00
Chunming Zhou
196f74897b
drm/amdgpu: add enumerate for PDB/PTB v3
...
v2:
remove SUBPTB member
v3:
remove last_level, use AMDGPU_VM_PTB directly instead.
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-14 11:01:30 -05:00
Tony Cheng
a53d45d8e4
drm/amd/display: dal 3.1.25
...
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-14 11:01:24 -05:00
Harry Wentland
cf3d1a8c77
drm/amd/display: Add TODO item to remove vector.c
...
Signed-off-by: Harry Wentland <harry.wentland@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 >
2017-12-14 11:01:13 -05:00
Harry Wentland
aff10cfe64
drm/amd/display: Remove grph_object_id.c and move function to bios_parser
...
Signed-off-by: Harry Wentland <harry.wentland@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 >
2017-12-14 11:01:07 -05:00
Harry Wentland
5b92d9d409
drm/amd/display: Remove redundant NULL check in DCE11 HWSS
...
We already check this a couple lines earlier.
Signed-off-by: Harry Wentland <harry.wentland@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 >
2017-12-14 11:01:00 -05:00
Dmytro Laktyushkin
78b56c5234
drm/amd/display: use clamping rather than truncation for CM fp conversions
...
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-14 11:00:53 -05:00
Yue Hin Lau
51ca0b0362
drm/amd/display: remove format_control from set_cursor_attributes
...
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-14 11:00:47 -05:00
Yongqiang Sun
904623ee59
drm/amd/display: Move wait for hpd ready out from edp power control.
...
It may take over 200ms for wait hpd ready. To optimize the resume time,
we can power on eDP in init_hw, wait for hpd ready when doing link
training.
also create separate eDP enable function to make sure eDP is powered up
before doing and DPCD access, as HPD low will result in DPDC transaction
failure.
After optimization,
setpowerstate 145ms -> 9.8ms,
DPMS 387ms -> 18.9ms
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com >
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-14 11:00:35 -05:00
Eric Yang
73da927b08
drm/amd/display: fix missing pixel clock adjustment for dongle
...
Signed-off-by: Eric Yang <Eric.Yang2@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Reviewed-by: Andrew Jiang <Andrew.Jiang@amd.com >
Acked-by: Harry Wentland <harry.wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-12-14 11:00:27 -05:00
Eric Bernstein
f23d558466
drm/amd/display: Move OPP mpc tree initialization to hw_init
...
Move OPP initialization of mpc tree parameters to hw_init function.
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-14 10:57:50 -05:00
Eric Bernstein
043b19bded
drm/amd/display: use REG_UPDATE for MPC mux
...
Use REG_UPDATE instead of REG_SET for programming MPC out mux.
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-14 10:57:43 -05:00