Alex Deucher
2e24ada2fc
drm/amdgpu/sdma4: specify vega12 firmware
...
Declare the firmware and fetch the proper file.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:47 -05:00
Alex Deucher
f8d27677e1
drm/amdgpu/mmhub: add clockgating support for vega12
...
Treat it the same as vega10 for now.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:47 -05:00
Alex Deucher
273a14cd15
drm/amdgpu/gmc9: add vega12 support (v2)
...
Same as vega10.
v2: squash in golden regs fix from Feifei
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:36:46 -05:00
Alex Deucher
dca7b4015c
drm/amdgpu: add vega12 to dc support check
...
DC is used for modesetting on vega12.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:51 -05:00
Jerry (Fangzhi) Zuo
b6a8a2bc83
drm/amd/display: Add bios firmware info version for VG12
...
VG12 shows minor revision version of 2 which is not handled in
bios_parser_get_firmware_info() routine.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:24:45 -05:00
Alex Deucher
2325ff305e
drm/amd/display/dm: add vega12 support
...
Add support for vega12 to the display manager.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:40 -05:00
Alex Deucher
f79f3fc141
drm/amdgpu/virtual_dce: add vega12 support
...
Add virtual dce support for vega12.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:35 -05:00
Alex Deucher
9aa52bc487
drm/amdgpu: specify vega12 vce firmware
...
Declare firmware and add support for the file.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:30 -05:00
Alex Deucher
2327e6261a
drm/amdgpu: specify vega12 uvd firmware
...
Declare firmware and add support for the file.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:24 -05:00
Feifei Xu
6b9c6e1b15
drm/amdgpu: add vega12 ucode loading method
...
Same as vega10.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
2018-03-21 14:24:18 -05:00
Evan Quan
eddfa8dfad
drm/amdgpu: initilize vega12 psp firmwares
...
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:24:12 -05:00
Alex Deucher
ff13dc671d
drm/amdgpu/psp: initial vega12 support
...
Same as vega10 for now.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:24:07 -05:00
Hawking Zhang
ad0ad9aa20
drm/amdgpu: vega12 to smu firmware
...
Add the cgs interface to query the smu firmware for vega12
and declare the firmware.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
2018-03-21 14:24:00 -05:00
Alex Deucher
e48a3cd9cb
drm/amdgpu: set asic family and ip blocks for vega12
...
soc15 just like vega10 and raven.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:23:55 -05:00
Alex Deucher
3f76dcedb3
drm/amdgpu: add gpu_info firmware for vega12
...
Stores gpu configuration details.
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
2018-03-21 14:23:49 -05:00
Feifei Xu
8fab806ad1
drm/amdgpu: add vega12 to asic_type enum
...
Add vega12 to amd_asic_type enum and amdgpu_asic_name[].
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
2018-03-21 14:23:39 -05:00
Feifei Xu
133f97945f
drm/amd/include: Add ip header files for vega12.
...
Add ip header files for IPs with a delta for vg12:
GC, MMHUB, OSS
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-By: Ken Wang <ken.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 14:23:01 -05:00
Sean Paul
1c7095d283
Merge airlied/drm-next into drm-misc-next
...
Refresh -misc-next
Signed-off-by: Sean Paul <seanpaul@chromium.org >
2018-03-21 09:40:55 -04:00
Harry Wentland
731a373698
drm/amd/display: Add one to EDID's audio channel count when passing to DC
...
DC takes channel count to mean the actual count. cea_sad's channels
represent it as number of channels - 1.
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 >
Cc: stable@vger.kernel.org
2018-03-21 00:24:47 -05:00
Harry Wentland
509648fcf0
drm/amd/display: We shouldn't set format_default on plane as atomic driver
...
This is still a leftover from early atomic brinup days.
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 >
Cc: stable@vger.kernel.org
2018-03-21 00:23:51 -05:00
Mikita Lipski
4407a29bad
drm/amd/display: Fix FMT truncation programming
...
Switch the order of parameters being set for depth
and mode of truncation, as it previously was not correct
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com >
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-21 00:22:35 -05:00
Mikita Lipski
8bfac12f88
drm/amd/display: Allow truncation to 10 bits
...
The truncation isn't being programmed if the truncation
depth is set to 2, it causes an issue with dce11.2 asic
using 6bit eDP panel. It required to truncate 12:10 in order to
perform spatial dither 10:6.
This change will allow 12:10 truncation to be enabled.
Signed-off-by: Mikita Lipski <mikita.lipski@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 >
2018-03-21 00:22:08 -05:00
Rex Zhu
46b27ee925
drm/amd/pp: Fix unable to handle kernel paging request
...
when set pp table
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-03-20 23:45:10 -05:00
Rex Zhu
d3472266fb
drm/amd/pp: Fix gfx ring test failed on Fiji without hw avfs support
...
caused by
'commit ca82cec868d1 ("drm/amd/pp: Simplified the avfs btc state on smu7")'
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-03-20 23:45:01 -05:00
Rex Zhu
eb4900aa4c
drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions
...
caused by
'commit 83e3c4615872 ("drm/amdgpu: Remove wrapper layer of smu ip functions")'
BUG: unable to handle kernel NULL pointer dereference at 00000000000005d8
[ 313.241459] IP: ci_dpm_read_sensor+0x37/0xf0 [amdgpu]
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-03-20 23:44:50 -05:00
Rex Zhu
81ce8bea03
drm/amdgpu: Fix kernel NULL pointer dereference when amdgpu fini
...
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-03-20 23:44:21 -05:00
Mikita Lipski
e5b03032e3
drm/amdgpu - Disable all irqs before disabling all CRTCs
...
By moving amdgpu_irq_disable_all earlier in the sequence
fixes an issue with disabling pflip interrupts:
*ERROR* dal_irq_service_dummy_ack: called for non-implemented irq source
Earlier patch fixed a memory corruption and revealed irq
warnings.This way it seems to be there no obvious issues
with unloading the module.
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-20 23:44:12 -05:00
Mikita Lipski
088e7c1617
drm/amdgpu: Disable irq on device before destroying it
...
Disable irq on devices before destroying them. That prevents
use-after-free memory access when unloading the driver.
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-20 23:44:03 -05:00
Mikita Lipski
ff97cba8c1
drm/amdgpu: Use atomic function to disable crtcs with dc enabled
...
This change fixes the deadlock when unloading the driver with displays
connected.
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com >
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-20 23:43:42 -05:00
Tom St Denis
864917a3b8
drm/amd/amdgpu: fix offset into page with amdgpu_iomem debugfs file
...
The offset inside the page wasn't included in the copy call meaning
the start of the page was being read/written instead.
Reported-by: Jay Cornwall <Jay.Cornwall@amd.com >
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-20 23:43:34 -05:00
Hawking Zhang
bd08a8d9e8
drm/amdgpu/nbio6: Correct PCIE_INDEX/DATA pair used for smn register accessing
...
PCIE_INDEX2/DATA2 pair will be used for smn register accessing since from vega.
PCIE_INDEX/DATA pair should be reserved for smu
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-20 23:43:25 -05:00
Andrey Grodzovsky
f004938f78
drm/amd/powerplay: Fix NULL pointer deref on driver unbind.
...
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 >
2018-03-20 23:43:05 -05:00
Alex Deucher
e3ecdffac9
drm/amdgpu: add documentation for amdgpu_device.c
...
Add kernel doc for the functions in amdgpu_device.c
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-20 23:43:05 -05:00
Alex Deucher
3ac952b10d
drm/amdgpu: add VCN to firmware query interface
...
Need to be able to query the VCN firmware version from
userspace to determine supported features, etc.
Reviewed-by: Huang Rui <ray.huang@amd.com >
Acked-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-20 23:42:49 -05:00
Rex Zhu
690dc62662
drm/amd/pp: Remove unneeded void * casts for Vega10
...
Removes unneeded void * casts for the following pointers:
hwmgr->backend
hwmgr->smu_backend
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 13:38:31 -05:00
Rex Zhu
2538090cb6
drm/amd/pp: Delete get_xclk function in powerplay (v2)
...
use asic's callback function get_xclk in amdgpu
v2: squash in removal of leftover debug info
(drm/amd/pp: Delete debug info in smu7_hwmgr.c) (Rex)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 13:38:31 -05:00
Rex Zhu
c7d30b40a2
drm/amd/pp: Clean up header file for Vega10
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 13:35:37 -05:00
Rex Zhu
3f9ca14a1d
drm/amd/pp: Move functions to smu backend table for vega10
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 13:35:30 -05:00
Rex Zhu
9281c1f8a4
drm/amd/pp: Mark bunches of functins in vega10_smumgr.c static
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 13:35:22 -05:00
Rex Zhu
0b10f20022
drm/amd/pp: Remove dead functions in vega10_smumgr.c
...
use smc_table_manager function to copy/save tables to/from smu.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 13:35:15 -05:00
Rex Zhu
699f47951e
drm/amdgpu: Delete dead code when early init
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 13:34:46 -05:00
Shirish S
cd2d6c92a8
drm/amd/display: fix dereferencing possible ERR_PTR()
...
This patch fixes static checker warning caused by
"36cc549d5986: "drm/amd/display: disable CRTCs with
NULL FB on their primary plane (V2)"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Shirish S <shirish.s@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 11:23:23 -05:00
Clark Zheng
219be9dda6
drm/amd/display: Refine disable VGA
...
bad case won't follow normal sense, it will not enable vga1 as usual, but vga2,3,4 is on.
Signed-off-by: Clark Zheng <clark.zheng@amd.com >
Reviewed-by: Tony Cheng <tony.cheng@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-19 11:23:03 -05:00
Harry Wentland
6da2b9332c
amdgpu/dm: Default PRE_VEGA ASIC support to 'y'
...
Even though we default PRE_VEGA support to 'n' upstream in amd-staging
we want to keep it enabled by default.
Signed-off-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-16 16:16:50 -05:00
Rex Zhu
59156faf81
drm/amd/pp: Remove the cgs wrapper for notify smu version on APU
...
Refine commit f49e9bac19
("drm/amd/pp: Get and save Rv smu version")
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-03-16 16:16:49 -05:00
Shirish S
6f4969ef0a
drm/amd/display: fix dereferencing possible ERR_PTR()
...
This patch fixes static checker warning caused by
"36cc549d5986: "drm/amd/display: disable CRTCs with
NULL FB on their primary plane (V2)"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Shirish S <shirish.s@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-16 16:16:49 -05:00
Clark Zheng
5e9a4f0873
drm/amd/display: Refine disable VGA
...
bad case won't follow normal sense, it will not enable vga1 as usual, but vga2,3,4 is on.
Signed-off-by: Clark Zheng <clark.zheng@amd.com >
Reviewed-by: Tony Cheng <tony.cheng@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-03-16 16:16:49 -05:00
Felix Kuehling
374200b154
drm/amdkfd: Add module option for testing large-BAR functionality
...
Simulate large-BAR system by exporting only visible memory. This
limits the amount of available VRAM to the size of the BAR, but
enables CPU access to VRAM.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Acked-by: Oded Gabbay <oded.gabbay@gmail.com >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
2018-03-15 17:27:53 -04:00
Felix Kuehling
0fc8011f89
drm/amdkfd: Kmap event page for dGPUs
...
The events page must be accessible in user mode by the GPU and CPU
as well as in kernel mode by the CPU. On dGPUs user mode virtual
addresses are managed by the Thunk's GPU memory allocation code.
Therefore we can't allocate the memory in kernel mode like we do
on APUs. But KFD still needs to map the memory for kernel access.
To facilitate this, the Thunk provides the buffer handle of the
events page to KFD when creating the first event.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
2018-03-15 17:27:52 -04:00
Felix Kuehling
5ec7e02854
drm/amdkfd: Add ioctls for GPUVM memory management
...
v2:
* Fix error handling after kfd_bind_process_to_device in
kfd_ioctl_map_memory_to_gpu
v3:
* Add ioctl to acquire VM from a DRM FD
v4:
* Return number of successful map/unmap operations in failure cases
* Facilitate partial retry after failed map/unmap
* Added comments with parameter descriptions to new APIs
* Defined AMDKFD_IOC_FREE_MEMORY_OF_GPU write-only
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
2018-03-15 17:27:51 -04:00