diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2017-12-05 08:03:13 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-07 11:48:56 -0500 |
commit | 54f539086ae8ed0297b02efb757b3be1a64a1cf2 (patch) | |
tree | 680d13ae753a19819acad44c7b86e39d0492327c /drivers/gpu/drm/amd/amdgpu | |
parent | 9c606cd4117a3c45e04a6616b1a0dbeb18eeee62 (diff) |
drm/amdgpu: Fix amdgpu_sync_add_later to preserve explicit flag.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index ebe1ffbab0c1..bb79fd3f3c36 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | |||
@@ -120,7 +120,7 @@ static void amdgpu_sync_keep_later(struct dma_fence **keep, | |||
120 | * Tries to add the fence to an existing hash entry. Returns true when an entry | 120 | * Tries to add the fence to an existing hash entry. Returns true when an entry |
121 | * was found, false otherwise. | 121 | * was found, false otherwise. |
122 | */ | 122 | */ |
123 | static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f) | 123 | static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f, bool explicit) |
124 | { | 124 | { |
125 | struct amdgpu_sync_entry *e; | 125 | struct amdgpu_sync_entry *e; |
126 | 126 | ||
@@ -129,6 +129,10 @@ static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f) | |||
129 | continue; | 129 | continue; |
130 | 130 | ||
131 | amdgpu_sync_keep_later(&e->fence, f); | 131 | amdgpu_sync_keep_later(&e->fence, f); |
132 | |||
133 | /* Preserve eplicit flag to not loose pipe line sync */ | ||
134 | e->explicit |= explicit; | ||
135 | |||
132 | return true; | 136 | return true; |
133 | } | 137 | } |
134 | return false; | 138 | return false; |
@@ -148,12 +152,11 @@ int amdgpu_sync_fence(struct amdgpu_device *adev, struct amdgpu_sync *sync, | |||
148 | 152 | ||
149 | if (!f) | 153 | if (!f) |
150 | return 0; | 154 | return 0; |
151 | |||
152 | if (amdgpu_sync_same_dev(adev, f) && | 155 | if (amdgpu_sync_same_dev(adev, f) && |
153 | amdgpu_sync_get_owner(f) == AMDGPU_FENCE_OWNER_VM) | 156 | amdgpu_sync_get_owner(f) == AMDGPU_FENCE_OWNER_VM) |
154 | amdgpu_sync_keep_later(&sync->last_vm_update, f); | 157 | amdgpu_sync_keep_later(&sync->last_vm_update, f); |
155 | 158 | ||
156 | if (amdgpu_sync_add_later(sync, f)) | 159 | if (amdgpu_sync_add_later(sync, f, explicit)) |
157 | return 0; | 160 | return 0; |
158 | 161 | ||
159 | e = kmem_cache_alloc(amdgpu_sync_slab, GFP_KERNEL); | 162 | e = kmem_cache_alloc(amdgpu_sync_slab, GFP_KERNEL); |