Alex Deucher
898b7893e4
drm/amdgpu: split gfx_v9_0_kiq_init_queue into two
...
One for KIQ and one for the KCQ. This simplifies the logic and
allows for future optimizations.
Acked-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:33:02 -04:00
Alex Deucher
b5ab16bf64
drm/amdgpu: properly byteswap gpu_info firmware
...
It's stored in LE format.
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:32:51 -04:00
Marek Olšák
68e2c5ffeb
drm/amdgpu: add an INFO query for monitoring VRAM CPU page faults
...
v2: bump the DRM version
Signed-off-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:24:38 -04:00
Tom St Denis
9156e72330
drm/amd/amdgpu: Return error if initiating read out of range on vram
...
If you initiate a read that is out of the VRAM address space return
ENXIO instead of 0.
Reads that begin below that point will read upto the VRAM limit as
before.
Cc: stable@vger.kernel.org
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 >
2017-05-24 18:23:55 -04:00
Tom St Denis
9c2e1ae3ae
drm/amd/amdgpu: Clean up gmc6 wait_for_idle
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Acked-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-05-24 18:22:40 -04:00
Tom St Denis
c990b718f9
drm/amd/amdgpu: Tidy up static int dce_v6_0_get_num_crtc()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:22:30 -04:00
Tom St Denis
e44143e31c
drm/amd/amdgpu: Drop commented out stub function
...
Drop the function gmc_v6_0_init_compute_vmid() since it wasn't
implemented and commented out.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:22:17 -04:00
Tom St Denis
2de3aac91b
drm/amd/amdgpu: Tidy up of gfx_v6_0_setup_rb()
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:22:07 -04:00
Tom St Denis
5a7bfded78
drm/amd/amdgpu: gfx6 tidy up raster config
...
Clean up coding style in gfx_v6_0_write_harvested_raster_configs()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:21:57 -04:00
Tom St Denis
167327d6e7
drm/amd/amdgpu: Clean up GFX6 tilemode programming
...
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:21:46 -04:00
Christian König
f5f3b16aae
drm/amdgpu: fix merge of vcn_v1_0.c v2
...
That line got missed during the merge.
v2: fix vcn_v1_0_enc_ring_emit_vm_flush as well
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:21:29 -04:00
Christian König
9a94f5a593
drm/amdgpu: move adjust adjust_mc_addr into the GFX9 vm_flush functions
...
That GFX9 needs a PDE in the registers is entirely GFX9 specific.
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 >
2017-05-24 18:19:49 -04:00
Christian König
60bfcd313c
drm/amdgpu: change default of amdgpu_vram_page_split to 512
...
512 is enough for one PD entry on Vega10.
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 >
2017-05-24 18:19:31 -04:00
Flora Cui
de37e68a3d
drm/amdgpu: fix ocl test performance drop
...
partial revert commit <6971d3d> - drm/amdgpu: cleanup logic in
amdgpu_vm_flush
Signed-off-by: Flora Cui <Flora.Cui@amd.com >
Reviewed-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 >
2017-05-24 18:18:49 -04:00
Yintian Tao
78cb9083d9
drm/amdgpu/sdma3: correct wptr initialization for sdma
...
If doorbell is used for wptr update, we also need to use it
to initialize wptr to 0.
Signed-off-by: Yintian Tao <yttao@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:18:15 -04:00
Christian König
05ec3eda8b
drm/amdgpu: cleanup VM manager init/fini
...
VM is mandatory for all hw amdgpu supports. So remove the leftovers
to make it optionally.
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-05-24 18:17:58 -04:00
Chunming Zhou
a340c7bcf1
drm/amdgpu: add dep_sync for amdgpu job
...
The fence in dep_sync cannot be optimized.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Tested and Reviewed-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-05-24 18:14:49 -04:00
Ken Wang
f8af933206
drm/amdgpu/gfx9: update golden settings
...
Update gfx9 golden settings.
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:14:07 -04:00
Chunming Zhou
15d73ce6f9
drm/amdgpu: skip all jobs of guilty vm
...
If the vm is guilty of a GPU reset, skips all its jobs.
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-05-24 18:13:17 -04:00
Chunming Zhou
f1892138ab
drm/amdgpu: return -ENODEV to user space when vram is lost v2
...
below ioctl will return -ENODEV:
amdgpu_cs_ioctl
amdgpu_cs_wait_ioctl
amdgpu_cs_wait_fences_ioctl
amdgpu_gem_va_ioctl
amdgpu_info_ioctl
v2: only for map and replace cases in amdgpu_gem_va_ioctl
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-05-24 18:11:52 -04:00
Chunming Zhou
0c49e0b8a4
drm/amdgpu: check if vram is lost v2
...
backup first 64 byte of gart table as reset magic, check if magic is same
after gpu hw reset.
v2: use memcmp instead of manual innovation.
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-05-24 18:10:06 -04:00
Alex Deucher
2d2e5e7e53
drm/amdgpu: add raven gpu_info support
...
Add support for parsing the gpu info table on raven.
This is required to get the gpu config data for raven.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:09:19 -04:00
Hawking Zhang
fbf09b6935
drm/amdgpu: correct emit frame size for vcn dec/enc ring
...
only mmhub will be invalidated during vcn dec/enc vm flush
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:08:59 -04:00
Hawking Zhang
04e5f2a635
drm/amdgpu: correct vmhub for vcn dec/enc ring
...
This got missed due to differences in the trees
when raven support was merged.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: ken wang <Qingqing.Wang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 18:07:59 -04:00
Alex Deucher
0dfafa225d
drm/amdgpu/vcn: remove duplicate mask
...
Looks like a copy past issue.
Reported-by: Julia Lawall <julia.lawall@lip6.fr >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:57 -04:00
Chunming Zhou
df515052ed
drm/amdgpu: add RAVEN pci id (v2)
...
Add the RAVEN pci id.
v2: add exp flag for now (Alex)
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:56 -04:00
Hawking Zhang
30db095f51
drm/amdgpu/powerplay/raven: add smu block and enable powerplay
...
Add the ip block and enable powerplay on raven.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:55 -04:00
Huang Rui
d2a33871b5
drm/amdgpu: enable sw clock gating for vcn
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:48 -04:00
Huang Rui
fb4d56fa37
drm/amdgpu/vcn: add sw clock gating
...
Add sw controlled clockgating for VCN.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:47 -04:00
Leo Liu
3b8f5ab331
drm/amdgpu: update vcn decode create msg
...
Based on new vcn firmware interface changes
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:47 -04:00
Leo Liu
62a9f37e4c
drm/amdgpu: add vcn firmware header offset
...
New firmware add psp header.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:46 -04:00
Leo Liu
f93aa00c0b
drm/amdgpu: get cs support for AMDGPU_HW_IP_VCN_ENC
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-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-05-24 17:41:45 -04:00
Leo Liu
cefbc5989f
drm/amdgpu: add AMDGPU_HW_IP_VCN_ENC to info query
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-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-05-24 17:41:44 -04:00
Leo Liu
25547cfd26
drm/amdgpu: add vcn enc ib test
...
Update and enable the vcn encode IB test.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:43 -04:00
Leo Liu
c3bd304009
drm/amdgpu: enable vcn encode ring tests
...
Wire up the callback and enable them.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-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-05-24 17:41:43 -04:00
Leo Liu
9b257116e7
drm/amdgpu: add vcn enc irq support
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-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-05-24 17:41:42 -04:00
Leo Liu
8ace845ff0
drm/amdgpu: add vcn enc ring type and functions
...
Add the ring function callbacks for the encode rings.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-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-05-24 17:41:41 -04:00
Leo Liu
101c6fee53
drm/amdgpu: add vcn enc rings
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-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-05-24 17:41:40 -04:00
Leo Liu
3639f7d855
drm/amdgpu: change vcn dec rb command specific for decode
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-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-05-24 17:41:39 -04:00
Leo Liu
f2d7e70708
drm/amdgpu: add vcn ip block to soc15
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Acked-by: Chunming Zhou <david1.zhou@amd.com >
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:39 -04:00
Leo Liu
81439659f4
drm/amdgpu: implement new vcn cache window programming
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:38 -04:00
Leo Liu
ef80d30b02
drm/amdgpu: Disable uvd and vce free handles for raven
...
Not required on raven.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:37 -04:00
Leo Liu
fc739f82c5
drm/amdgpu: get cs support of AMDGPU_HW_IP_VCN_DEC
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:36 -04:00
Leo Liu
bdc799e5ee
drm/amdgpu: add AMDGPU_HW_IP_VCN_DEC to info query
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:35 -04:00
Leo Liu
2d8a425bf6
drm/amdgpu/vcn: implement ib tests with new message buffer interface
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:33 -04:00
Leo Liu
a4c424c5c6
drm/amdgpu: implement insert end ring function for vcn decode
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:32 -04:00
Leo Liu
e7501c34aa
drm/amdgpu: implement vcn start RB command
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:31 -04:00
Leo Liu
ef44f8541e
drm/amdgpu: add a ring func for vcn start command
...
Needed for the proper command sequence for VCN.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:31 -04:00
Leo Liu
7741cced67
drm/amdgpu: expose vcn RB command
...
Signed-off-by: Leo Liu <leo.liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:30 -04:00
Leo Liu
8c303c0190
drm/amdgpu: move vcn ring test to amdgpu_vcn.c
...
Hope it will be generic for vcn later
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-05-24 17:41:29 -04:00