diff options
author | Christian König <christian.koenig@amd.com> | 2016-06-01 09:10:02 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-02 02:27:41 -0400 |
commit | 76bf0db5543976ef50362db7071da367cb118532 (patch) | |
tree | c8f94084239df5d095c80d87d423d44d95081379 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 3377900791ea48a638fb9b70869258332951271d (diff) |
dma-buf/fence: make fence context 64 bit v2
Fence contexts are created on the fly (for example) by the GPU scheduler used
in the amdgpu driver as a result of an userspace request. Because of this
userspace could in theory force a wrap around of the 32bit context number
if it doesn't behave well.
Avoid this by increasing the context number to 64bits. This way even when
userspace manages to allocate a billion contexts per second it takes more
than 500 years for the context number to wrap around.
v2: fix printf formats as well.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1464786612-5010-2-git-send-email-deathsimple@vodafone.de
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 992f00b65be4..da3d02154fa6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -2032,7 +2032,7 @@ struct amdgpu_device { | |||
2032 | struct amdgpu_irq_src hpd_irq; | 2032 | struct amdgpu_irq_src hpd_irq; |
2033 | 2033 | ||
2034 | /* rings */ | 2034 | /* rings */ |
2035 | unsigned fence_context; | 2035 | u64 fence_context; |
2036 | unsigned num_rings; | 2036 | unsigned num_rings; |
2037 | struct amdgpu_ring *rings[AMDGPU_MAX_RINGS]; | 2037 | struct amdgpu_ring *rings[AMDGPU_MAX_RINGS]; |
2038 | bool ib_pool_ready; | 2038 | bool ib_pool_ready; |