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
parent 2a5878a83f
commit dad1b5f51e
2 changed files with 20 additions and 6 deletions

View File

@@ -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;

View File

@@ -643,6 +643,13 @@ int sde_plane_wait_input_fence(struct drm_plane *plane, uint32_t wait_ms)
psde->is_error = true;
ret = -EINVAL;
break;
case -EBADF:
SDE_INFO("plane%d spec fd signaled on bind failure fd %lld\n",
plane->base.id,
sde_plane_get_property(pstate, PLANE_PROP_INPUT_FENCE));
psde->is_error = true;
ret = 0;
break;
default:
SDE_DEBUG_PLANE(psde, "signaled\n");
ret = 0;