Merge tag 'arm-fixes-5.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[linux-2.6-microblaze.git] / drivers / gpu / drm / i915 / dma_resv_utils.c
1 // SPDX-License-Identifier: MIT
2 /*
3  * Copyright © 2020 Intel Corporation
4  */
5
6 #include <linux/dma-resv.h>
7
8 #include "dma_resv_utils.h"
9
10 void dma_resv_prune(struct dma_resv *resv)
11 {
12         if (dma_resv_trylock(resv)) {
13                 if (dma_resv_test_signaled_rcu(resv, true))
14                         dma_resv_add_excl_fence(resv, NULL);
15                 dma_resv_unlock(resv);
16         }
17 }