]> www.infradead.org Git - linux.git/commitdiff
drm/xe/ufence: ufence can be signaled right after wait_woken
authorNirmoy Das <nirmoy.das@intel.com>
Fri, 11 Oct 2024 15:10:29 +0000 (17:10 +0200)
committerNirmoy Das <nirmoy.das@intel.com>
Mon, 14 Oct 2024 08:03:54 +0000 (10:03 +0200)
do_comapre() can return success after a timedout wait_woken() which was
treated as -ETIME. The loop calling wait_woken() sets correct err so
there is no need to re-evaluate err.

v2: Remove entire check that reevaluate err at the end(Matt)

Fixes: e670f0b4ef24 ("drm/xe/uapi: Return correct error code for xe_wait_user_fence_ioctl")
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1630
Cc: stable@vger.kernel.org # v6.8+
Cc: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241011151029.4160630-1-nirmoy.das@intel.com
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
drivers/gpu/drm/xe/xe_wait_user_fence.c

index d46fa8374980cdb8bd65e0b7555780909a8c605f..f5deb81eba01eeab3ca86a3f1edb03115d0b64aa 100644 (file)
@@ -169,9 +169,6 @@ int xe_wait_user_fence_ioctl(struct drm_device *dev, void *data,
                        args->timeout = 0;
        }
 
-       if (!timeout && !(err < 0))
-               err = -ETIME;
-
        if (q)
                xe_exec_queue_put(q);