summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-05-11 15:34:59 +0200
committerAlex Deucher <alexander.deucher@amd.com>2015-06-03 21:03:34 -0400
commit3cb485f34049b7f3a00f6f73d2325e0858f64ddb (patch)
treeed523717c68630c27010a39d112b360492b23c93 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentd919ad49ac04e1e417ea511d61455786a0f0fdb7 (diff)
downloadlinux-3cb485f34049b7f3a00f6f73d2325e0858f64ddb.tar.bz2
drm/amdgpu: fix context switch
Properly protect the state and also handle submission failures. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 72d9d9ec5c9f..003fa2d12bfb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -893,6 +893,7 @@ struct amdgpu_ib {
struct amdgpu_fence *fence;
struct amdgpu_user_fence *user;
struct amdgpu_vm *vm;
+ struct amdgpu_ctx *ctx;
struct amdgpu_sync sync;
uint32_t gds_base, gds_size;
uint32_t gws_base, gws_size;
@@ -943,9 +944,7 @@ struct amdgpu_ring {
unsigned wptr_offs;
unsigned next_rptr_offs;
unsigned fence_offs;
- struct drm_file *current_filp;
- unsigned current_ctx;
- bool need_ctx_switch;
+ struct amdgpu_ctx *current_ctx;
enum amdgpu_ring_type type;
char name[16];
};
@@ -1236,7 +1235,7 @@ struct amdgpu_cs_chunk {
struct amdgpu_cs_parser {
struct amdgpu_device *adev;
struct drm_file *filp;
- uint32_t ctx_id;
+ struct amdgpu_ctx *ctx;
struct amdgpu_bo_list *bo_list;
/* chunks */
unsigned nchunks;