]> git.baikalelectronics.ru Git - kernel.git/commit
dma-buf/dma-resv: Respect num_fences when initializing the shared fence list.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 24 Nov 2020 11:57:07 +0000 (12:57 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 25 Nov 2020 09:48:28 +0000 (10:48 +0100)
commit1339e72a2a6f2d87a69d5d380df008d1b63aa77a
tree7bac66a93ef0397f6ca4eb738f56c739b5aa1b7b
parent6cdd6a3001579221ae79aced250ae890a5741a5d
dma-buf/dma-resv: Respect num_fences when initializing the shared fence list.

We hardcode the maximum number of shared fences to 4, instead of
respecting num_fences. Use a minimum of 4, but more if num_fences
is higher.

This seems to have been an oversight when first implementing the
api.

Fixes: 476fef4aa26f ("reservation: update api and add some helpers")
Cc: <stable@vger.kernel.org> # v3.17+
Reported-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201124115707.406917-1-maarten.lankhorst@linux.intel.com
drivers/dma-buf/dma-resv.c