disp: msm: sde: handle spec fence bind failure case as non fatal

Add changes to handle speculative fence bind failure case with
invalid userfd as non fatal scenario and stage white frame in such
case.

Change-Id: I1386bfc5ecb5107ab100be220c24597f883d9bd6
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
This commit is contained in:
Jayaprakash Madisetty
2021-07-23 12:31:37 +05:30
förälder 2a5878a83f
incheckning dad1b5f51e
2 ändrade filer med 20 tillägg och 6 borttagningar

Visa fil

@@ -11,6 +11,7 @@
#include "sde_fence.h"
#define TIMELINE_VAL_LENGTH 128
#define SPEC_FENCE_FLAG_FENCE_ARRAY 0x10
void *sde_sync_get(uint64_t fd)
{
@@ -42,13 +43,19 @@ signed long sde_sync_wait(void *fnc, long timeout_ms)
fence->ops->timeline_value_str(fence,
timeline_str, TIMELINE_VAL_LENGTH);
SDE_ERROR(
"fence driver name:%s timeline name:%s seqno:0x%llx timeline:%s signaled:0x%x error:%d\n",
fence->ops->get_driver_name(fence),
fence->ops->get_timeline_name(fence),
fence->seqno, timeline_str,
fence->ops->signaled ?
if (test_bit(SPEC_FENCE_FLAG_FENCE_ARRAY, &fence->flags) &&
fence->error == -EINVAL) {
SDE_INFO("spec fence bind error :%d\n", fence->error);
rc = -EBADF;
} else {
SDE_ERROR(
"fence driver name:%s timeline name:%s seqno:0x%llx timeline:%s signaled:0x%x error:%d\n",
fence->ops->get_driver_name(fence),
fence->ops->get_timeline_name(fence),
fence->seqno, timeline_str,
fence->ops->signaled ?
fence->ops->signaled(fence) : 0xffffffff, fence->error);
}
}
return rc;