Chunming Zhou
049fc527b4
drm/amdgpu: dispatch jobs in cs
...
BO validation is moved to scheduler except usrptr which must be validated
in user process
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Acked-by: Christian K?nig <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:34 -04:00
Chunming Zhou
372bc1e18c
drm/amdgpu: add bo list copy
...
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Acked-by: Christian K?nig <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:33 -04:00
Chunming Zhou
c1b69ed0c6
drm/amdgpu: add backend implementation of gpu scheduler (v2)
...
v2: fix rebase breakage
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Acked-by: Christian K?nig <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:33 -04:00
Chunming Zhou
2c4888a0d3
drm/amdgpu: disable hw semaphore with scheduler
...
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Acked-by: Christian K?nig <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:32 -04:00
Chunming Zhou
9cb7e5a91f
drm/amdgpu: add context entity init
...
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Acked-by: Christian K?nig <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:32 -04:00
Alex Deucher
b80d8475c1
drm/amdgpu: add scheduler initialization
...
1. Add kernel parameter option, default 0
2. Add scheduler initialization for amdgpu
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Acked-by: Christian K?nig <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:31 -04:00
David Zhang
2da78e21d1
drm/amdgpu: Enable the Fiji DID 0x7300 support
...
Signed-off-by: David Zhang <david1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:30 -04:00
Alex Deucher
d07f5c4c23
drm/amdgpu: remove VM workaround for Fiji
...
The bug is fixed in fiji.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:29 -04:00
Alex Deucher
188a9bcd6c
drm/amdgpu: add support for VCE 3.x on Fiji
...
VCE on fiji is single pipe only.
Reviewed-by: David Zhang <david1.zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:29 -04:00
David Zhang
974ee3db0f
drm/amdgpu: Add Fiji support to the UVD 6.0 IP module
...
Signed-off-by: David Zhang <david1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:28 -04:00
David Zhang
1a5bbb6695
drm/amdgpu: Add Fiji support to the SDMA 3.0 IP module
...
Signed-off-by: David Zhang <david1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:27 -04:00
David Zhang
af15a2d51d
drm/amdgpu: Add Fiji support to the GFX 8.0 IP module (v2)
...
v2: agd5f: fix the rb setup.
Signed-off-by: David Zhang <david1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:27 -04:00
David Zhang
843908604d
drm/amdgpu: Add Fiji support to the DCE 10.0 IP module (v2)
...
v2: agd5f: fix up XDMA golden settings
Signed-off-by: David Zhang <david1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:26 -04:00
David Zhang
8e711e1a1a
drm/amdgpu: Add Fiji support to SMC and DPM (v2)
...
v2: agd5f: prepare for release
Signed-off-by: David Zhang <david1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:26 -04:00
David Zhang
aa8a3b5395
drm/amdgpu: Add Fiji support to IH module
...
Signed-off-by: David Zhang <david1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:24 -04:00
David Zhang
127a262853
drm/amdgpu: Add Fiji support to the GMC 8.5 IP module
...
Signed-off-by: David Zhang <david1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:24 -04:00
David Zhang
48299f95f7
drm/amdgpu: Add Fiji DID 0x7300 common support
...
Signed-off-by: David Zhang <david1.zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:23 -04:00
Alex Deucher
41548ef78b
drm/amdgpu: handle conditional support for CIK properly
...
gfx7 support is not necessary or available if CIK support
is not enabled.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:23 -04:00
monk.liu
e60b344f6c
drm/amdgpu: optimize amdgpu_parser_init
...
use kmalloc_array instead of kcalloc where appropriate and other
cleanups.
Signed-off-by: monk.liu <monk.liu@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:22 -04:00
Jammy Zhou
2f7d10b393
drm/amdgpu: merge amdgpu_family.h into amd_shared.h (v2)
...
Make the definitions common for all driver components
v2: fix kfd
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:21 -04:00
Marek Olšák
c7890fea04
drm/amdgpu: allow userspace to read more debug registers
...
Feel free to suggest more.
Signed-off-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Michel Dänzer <michel.daenzer@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-17 16:50:20 -04:00
Alex Deucher
8e9198d069
drm/amdgpu: move some atombios definitions to common folder (v2)
...
the definitions can be shared by different IP components.
v2: fix include path
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:19 -04:00
Christian König
5430a3ffb0
drm/amdgpu: fix UVD/VCE fence handling
...
We need to return the sequence number to userspace
even when we don't use user fences.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:18 -04:00
Alex Deucher
5ceb54c68a
drm/amdgpu: add fence suspend/resume functions
...
Added to:
- handle draining the ring on suspend
- properly enable/disable interrupts on suspend and resume
Fix breakages from:
commit 467ee3be53d240d08beed2e82a941e820c1ac323
Author: Chunming Zhou <david1.zhou@amd.com >
Date: Mon Jun 1 14:14:32 2015 +0800
drm/amdgpu: always enable EOP interrupt v2
Tested-by: Audrey Grodzovsky <audrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:18 -04:00
Chunming Zhou
c6a4079bad
drm/amdgpu: always enable EOP interrupt v2
...
v2 (chk): always enable EOP interrupt, independent of scheduler,
remove now unused delayed_irq handling.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:17 -04:00
Christian König
7f8a5290f5
drm/amdgpu: rework vm_grab_id interface
...
This makes assigning VM IDs independent from the use of VM IDs.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:16 -04:00
Christian König
fc8fa5e428
drm/amdgpu: no updates shouldn't cause vm flush v2
...
v2 (chk): split fix from original patch
Signed-off-by: monk.liu <monk.liu@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:16 -04:00
Christian König
cf6f1d3949
drm/amdgpu: fix signed overrun in amdgpu_ctx_get_fence
...
Otherwise the first 16 fences of a context will always signal immediately.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:15 -04:00
Christian König
cdecb65b4e
drm/amdgpu: fix context memory leak
...
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
2015-08-17 16:50:15 -04:00
Christian König
0753b45242
drm/amdgpu: remove amdgpu_fence_recreate
...
It's not used any more.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
2015-08-17 16:50:14 -04:00
Christian König
21c16bf634
drm/amdgpu: add user fence context map v2
...
This is a prerequisite for the GPU scheduler to make the order
of submission independent from the order of execution.
v2: properly implement the locking
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
2015-08-17 16:50:14 -04:00
Christian König
91e1a5207e
drm/amdgpu: deal with foreign fences in amdgpu_sync
...
This also requires some error handling from the callers of that function.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
2015-08-17 16:50:13 -04:00
Alex Deucher
0b492a4c92
drm/amdgpu: cleanup context structure v2
...
The comment is misleading and incorrect, remove it.
Printing the id is completely meaningless and this practice
can cause a race conditions on command submission.
The flags and hangs fields are completely unused.
Give all fields a common indentation.
v2: remove fpriv reference and unused flags as well, fix debug message.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
2015-08-17 16:50:12 -04:00
rezhu
404b2fa338
drm/amdgpu: add cgs_interface for pg and cg
...
v3: check whether ip_blocks is enable
v2: add break in the for loop.
Signed-off-by: Rex zhu <rezhu@amd.com >
2015-08-17 16:50:12 -04:00
Jammy Zhou
bf3911b06f
drm/amdgpu: add cgs_get_firmware_info interface v2
...
This new interface can be used by IP components to retrieve the
firmware information from the core driver.
v2: fix one typo
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhou@amd.com >
Signed-off-by: Young Yang <Young.Yang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:11 -04:00
Chunming Zhou
57ff96cf47
drm/amdgpu: implement cgs gpu memory callbacks
...
This implements the cgs interface for allocating
GPU memory.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Chunming Zhou <david1.zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:10 -04:00
Chunming Zhou
25da442779
drm/amdgpu: add atom interfaces for CGS
...
This implements the interface for atombios command
and data table access.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:09 -04:00
Alex Deucher
0cf3be2178
drm/amdgpu: Implement irq interfaces for CGS
...
This implements the irq src registrar.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:09 -04:00
Chunming Zhou
97cb7f6e6c
drm/amdgpu: Implement the pciconfig callbacks for CGS
...
This implements the pciconfig register accessors.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:08 -04:00
Chunming Zhou
aba684d87a
drm/amdgpu: Implement mmio callbacks for CGS
...
This implements the MMIO register accessors.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2015-08-17 16:50:08 -04:00
Chunming Zhou
d03846af92
drm/amd: Add CGS interfaces
...
CGS (Common Graphics Services) is an AMD cross component
abstraction layer to designed to better encapsulate
specific IP block drivers so different teams can effectively
work on differnet IP block drivers independently. It provides
a common interface for things like accessing registers,
allocating GPU memory, and registering interrupt sources.
The plan is to eventually move more and more IP drivers to
this interface. The first user is the ACP IP driver.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Chunming Zhou <David1.Zhou@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 >
2015-08-17 16:49:52 -04:00
Jammy Zhou
21df89a566
drm/amdgpu: fix one warning message
...
In function 'amdgpu_uvd_cs_pass2':
warning: 'min_ctx_size' may be used uninitialized in this function
buf_sizes[0x4] = min_ctx_size;
^
note: 'min_ctx_size' was declared here
unsigned image_size, tmp, min_dpb_size, num_dpb_buffer, min_ctx_size;
^
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Cc: stable@vger.kernel.org
2015-08-17 09:50:18 -04:00
Dave Airlie
4eebf60b74
Merge tag 'v4.2-rc7' into drm-next
...
Linux 4.2-rc7
Backmerge master for i915 fixes
2015-08-17 14:13:53 +10:00
Dave Airlie
8f9cb50789
Merge tag 'drm-amdkfd-next-fixes-2015-08-05' of git://people.freedesktop.org/~gabbayo/linux into drm-next
...
Two small bug fixes for the code you pulled for 4.3:
- Used a SHIFT define instead of a MASK define to check if a bit is turned on
when destroying hqd. Luckily, this is in gfx7 interface file with amdgpu,
which was used only for bring-up purposes of amdgpu, so no real effect on
a running system
- Used a logical AND instead of a bitwise AND operator, when initializing
sdma virtual memory when using SDMA queues
* tag 'drm-amdkfd-next-fixes-2015-08-05' of git://people.freedesktop.org/~gabbayo/linux:
drm/amdkfd: fix bug when initializing sdma vm
drm/amdgpu: fix bug when amdkfd destroys hqd
2015-08-14 10:15:24 +10:00
Alex Deucher
b8826b0cbf
Revert "drm/amdgpu: Configure doorbell to maximum slots"
...
This reverts commit 78ad5cdd21 .
This commit breaks dpm and suspend/resume on CZ.
2015-08-12 12:24:04 -04:00
Boyuan Zhang
8c8bac59dd
drm/amdgpu: add context buffer size check for HEVC
...
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-12 12:24:03 -04:00
Archit Taneja
2dbaf392d2
drm/amdgpu: Use new drm_fb_helper functions
...
Use the newly created wrapper drm_fb_helper functions instead of calling
core fbdev functions directly. They also simplify the fb_info creation.
v3:
- Don't touch remove_conflicting_framebuffers
v2:
- Fixed PTR_ERR issue mentioned by kbuild bot
Cc: Fengguang Wu <fengguang.wu@intel.com >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Oded Gabbay <oded.gabbay@gmail.com >
Cc: "Christian König" <christian.koenig@amd.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2015-08-06 14:13:06 +02:00
Jammy Zhou
595fd013f7
drm/amdgpu: set fw_version and feature_version for smu fw loading
...
The fw_version and feature_verion should be set correctly when the
firmwares are loaded by SMU on Tonga/Carrzio/Iceland
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-05 14:26:50 -04:00
Jammy Zhou
cfa2104fbc
drm/amdgpu: add feature version for SDMA ucode
...
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-05 14:26:50 -04:00
Jammy Zhou
351643d7dd
drm/amdgpu: add feature version for RLC and MEC v2
...
Expose feature version to user space for RLC/MEC/MEC2 ucode as well
v2: fix coding style
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
2015-08-05 14:26:49 -04:00