dma-buf: make fence sequence numbers 64 bit v2
authorChristian König <christian.koenig@amd.com>
Wed, 14 Nov 2018 15:11:06 +0000 (16:11 +0100)
committerChristian König <christian.koenig@amd.com>
Fri, 7 Dec 2018 11:44:16 +0000 (12:44 +0100)
commitb312d8ca3a7cebe19941d969a51f2b7f899b81e2
treeb38afe698b8f8c4cfb9a9e8e8ee1808fad4c33e5
parentfcc4a00294a585dfee7588410d5cc9768abc7f00
dma-buf: make fence sequence numbers 64 bit v2

For a lot of use cases we need 64bit sequence numbers. Currently drivers
overload the dma_fence structure to store the additional bits.

Stop doing that and make the sequence number in the dma_fence always
64bit.

For compatibility with hardware which can do only 32bit sequences the
comparisons in __dma_fence_is_later only takes the lower 32bits as significant
when the upper 32bits are all zero.

v2: change the logic in __dma_fence_is_later

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Link: https://patchwork.freedesktop.org/patch/266927/
drivers/dma-buf/dma-fence.c
drivers/dma-buf/sw_sync.c
drivers/dma-buf/sync_file.c
drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
drivers/gpu/drm/i915/i915_sw_fence.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/vgem/vgem_fence.c
include/linux/dma-fence.h