[PATCH] drm/syncobj: return meaningful value to user space

Chunming Zhou david1.zhou at amd.com
Thu Jul 18 11:13:39 UTC 2019


if WAIT_FOR_SUBMIT isn't set and in the meanwhile no underlying fence on syncobj,
then return non-block error code to user sapce.

Signed-off-by: Chunming Zhou <david1.zhou at amd.com>
---
 drivers/gpu/drm/drm_syncobj.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 361a01a08c18..929f7c64f9a2 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -252,7 +252,7 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
 			return 0;
 		dma_fence_put(*fence);
 	} else {
-		ret = -EINVAL;
+		ret = -ENOTBLK;
 	}
 
 	if (!(flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT))
@@ -832,7 +832,7 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
 			if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) {
 				continue;
 			} else {
-				timeout = -EINVAL;
+				timeout = -ENOTBLK;
 				goto cleanup_entries;
 			}
 		}
-- 
2.17.1



More information about the dri-devel mailing list