| .. | .. |
|---|
| 28 | 28 | * Christian König <christian.koenig@amd.com> |
|---|
| 29 | 29 | */ |
|---|
| 30 | 30 | |
|---|
| 31 | | -#include <drm/drmP.h> |
|---|
| 32 | 31 | #include "radeon.h" |
|---|
| 33 | 32 | #include "radeon_trace.h" |
|---|
| 34 | 33 | |
|---|
| .. | .. |
|---|
| 88 | 87 | */ |
|---|
| 89 | 88 | int radeon_sync_resv(struct radeon_device *rdev, |
|---|
| 90 | 89 | struct radeon_sync *sync, |
|---|
| 91 | | - struct reservation_object *resv, |
|---|
| 90 | + struct dma_resv *resv, |
|---|
| 92 | 91 | bool shared) |
|---|
| 93 | 92 | { |
|---|
| 94 | | - struct reservation_object_list *flist; |
|---|
| 93 | + struct dma_resv_list *flist; |
|---|
| 95 | 94 | struct dma_fence *f; |
|---|
| 96 | 95 | struct radeon_fence *fence; |
|---|
| 97 | 96 | unsigned i; |
|---|
| 98 | 97 | int r = 0; |
|---|
| 99 | 98 | |
|---|
| 100 | 99 | /* always sync to the exclusive fence */ |
|---|
| 101 | | - f = reservation_object_get_excl(resv); |
|---|
| 100 | + f = dma_resv_get_excl(resv); |
|---|
| 102 | 101 | fence = f ? to_radeon_fence(f) : NULL; |
|---|
| 103 | 102 | if (fence && fence->rdev == rdev) |
|---|
| 104 | 103 | radeon_sync_fence(sync, fence); |
|---|
| 105 | 104 | else if (f) |
|---|
| 106 | 105 | r = dma_fence_wait(f, true); |
|---|
| 107 | 106 | |
|---|
| 108 | | - flist = reservation_object_get_list(resv); |
|---|
| 107 | + flist = dma_resv_get_list(resv); |
|---|
| 109 | 108 | if (shared || !flist || r) |
|---|
| 110 | 109 | return r; |
|---|
| 111 | 110 | |
|---|
| 112 | 111 | for (i = 0; i < flist->shared_count; ++i) { |
|---|
| 113 | 112 | f = rcu_dereference_protected(flist->shared[i], |
|---|
| 114 | | - reservation_object_held(resv)); |
|---|
| 113 | + dma_resv_held(resv)); |
|---|
| 115 | 114 | fence = to_radeon_fence(f); |
|---|
| 116 | 115 | if (fence && fence->rdev == rdev) |
|---|
| 117 | 116 | radeon_sync_fence(sync, fence); |
|---|