diff options
author | Christian König <christian.koenig@amd.com> | 2016-05-03 09:17:40 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-11 12:31:27 -0400 |
commit | aa3b73f67bda66637f17c3d847a8a36d3649f3f8 (patch) | |
tree | f3025d5a5fa4a8ec850641197d62eaf8010a4ac7 /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
parent | 822b2cef4d9ffe680b880ec39734ad8a1d178b02 (diff) |
drm/amdgpu: use fence_context to judge ctx switch v2
Use of the ctx pointer is not safe, because they are likely already
be assigned to another ctx when doing comparing.
v2: recreate from scratch, avoid all unnecessary changes.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Monk.Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 910556136fde..f670519efbbc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -121,7 +121,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
121 | { | 121 | { |
122 | struct amdgpu_device *adev = ring->adev; | 122 | struct amdgpu_device *adev = ring->adev; |
123 | struct amdgpu_ib *ib = &ibs[0]; | 123 | struct amdgpu_ib *ib = &ibs[0]; |
124 | struct amdgpu_ctx *ctx, *old_ctx; | 124 | uint64_t ctx, old_ctx; |
125 | struct fence *hwf; | 125 | struct fence *hwf; |
126 | struct amdgpu_vm *vm = NULL; | 126 | struct amdgpu_vm *vm = NULL; |
127 | unsigned i, patch_offset = ~0; | 127 | unsigned i, patch_offset = ~0; |