diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0414-drm-amdgpu-Move-fence-SW-fallback-warning-v3.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/0414-drm-amdgpu-Move-fence-SW-fallback-warning-v3.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0414-drm-amdgpu-Move-fence-SW-fallback-warning-v3.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0414-drm-amdgpu-Move-fence-SW-fallback-warning-v3.patch new file mode 100644 index 00000000..648df26e --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0414-drm-amdgpu-Move-fence-SW-fallback-warning-v3.patch @@ -0,0 +1,86 @@ +From b93476037a451a6cde48f8e85717cb2644bb6d24 Mon Sep 17 00:00:00 2001 +From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> +Date: Tue, 25 Sep 2018 10:24:16 -0400 +Subject: [PATCH 0414/2940] drm/amdgpu: Move fence SW fallback warning v3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Only print the warning if there was actually some fence processed +from the SW fallback timer. + +v2: Add return value to amdgpu_fence_process to let +amdgpu_fence_fallback know fences were actually +processed and then print the warning. + +v3: Always return true if seq != last_seq + +Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> +Reviewed-by: Christian König <christian.koenig@amd.com> +Signed-off-by: Kalyan Alle <kalyan.alle@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 12 ++++++++---- + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +index d27dac4595ce..1fb95a983129 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +@@ -216,8 +216,10 @@ static void amdgpu_fence_schedule_fallback(struct amdgpu_ring *ring) + * Checks the current fence value and calculates the last + * signalled fence value. Wakes the fence queue if the + * sequence number has increased. ++ * ++ * Returns true if fence was processed + */ +-void amdgpu_fence_process(struct amdgpu_ring *ring) ++bool amdgpu_fence_process(struct amdgpu_ring *ring) + { + struct amdgpu_fence_driver *drv = &ring->fence_drv; + uint32_t seq, last_seq; +@@ -234,7 +236,7 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) + amdgpu_fence_schedule_fallback(ring); + + if (unlikely(seq == last_seq)) +- return; ++ return false; + + last_seq &= drv->num_fences_mask; + seq &= drv->num_fences_mask; +@@ -261,6 +263,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) + + dma_fence_put(fence); + } while (last_seq != seq); ++ ++ return true; + } + + /** +@@ -275,8 +279,8 @@ static void amdgpu_fence_fallback(struct timer_list *t) + struct amdgpu_ring *ring = from_timer(ring, t, + fence_drv.fallback_timer); + +- DRM_WARN("Fence fallback timer expired on ring %s\n", ring->name); +- amdgpu_fence_process(ring); ++ if (amdgpu_fence_process(ring)) ++ DRM_WARN("Fence fallback timer expired on ring %s\n", ring->name); + } + + /** +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +index 9cc239968e40..4caa301ce454 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +@@ -97,7 +97,7 @@ void amdgpu_fence_driver_resume(struct amdgpu_device *adev); + int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **fence, + unsigned flags); + int amdgpu_fence_emit_polling(struct amdgpu_ring *ring, uint32_t *s); +-void amdgpu_fence_process(struct amdgpu_ring *ring); ++bool amdgpu_fence_process(struct amdgpu_ring *ring); + int amdgpu_fence_wait_empty(struct amdgpu_ring *ring); + signed long amdgpu_fence_wait_polling(struct amdgpu_ring *ring, + uint32_t wait_seq, +-- +2.17.1 + |