Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36900C636D3 for ; Mon, 6 Feb 2023 17:20:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229768AbjBFRU4 (ORCPT ); Mon, 6 Feb 2023 12:20:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbjBFRUy (ORCPT ); Mon, 6 Feb 2023 12:20:54 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D423527492 for ; Mon, 6 Feb 2023 09:20:51 -0800 (PST) Received: from [192.168.2.90] (unknown [109.252.117.89]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id 65EE06602D99; Mon, 6 Feb 2023 17:20:49 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675704050; bh=bUXajhXwEiwkWVZseXMgMhjWWpNFCinbZK0tN5zlI0E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=iRouOPwVTFFBPGErZ39RidCmc2XoyCy49AsxdNFCe6RbwIGG2UxxLMQk3REXIahwH LJvcWihdRomC45IeuSnGCh7MSnuP5kEp3qBIdsqrr6h+W7i0Q9rKPtDRG/V6dj69RY v5GCuZfJGHpuz8sr3nL/Yd3zfrgWk6FmVNjwtDh9cC5dDfc23hgilbiHNr7ws/2QZE RUl8EBnePY8mWeJDk83b214EM0hoDsoIegCTdPIHshCmbU47+3Zq2IwoxxWnLSZbDx nqDZ0SlgnzBoL400Ss9Ou7meywSX61Swi1TLbPTjEVOvaFrrSziN/VULMknESzG3W6 MrQVHF6WY0jTg== Message-ID: Date: Mon, 6 Feb 2023 20:20:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v2] drm/virtio: exbuf->fence_fd unmodified on interrupted wait To: Ryan Neph , David Airlie , Gerd Hoffmann , Daniel Vetter , Gurchetan Singh , Chia-I Wu , dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: Yiwei Zhang , Rob Clark , Rob Clark , Emil Velikov , Gustavo Padovan References: <20230203233345.2477767-1-ryanneph@chromium.org> Content-Language: en-US From: Dmitry Osipenko In-Reply-To: <20230203233345.2477767-1-ryanneph@chromium.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/4/23 02:33, Ryan Neph wrote: > An interrupted dma_fence_wait() becomes an -ERESTARTSYS returned > to userspace ioctl(DRM_IOCTL_VIRTGPU_EXECBUFFER) calls, prompting to > retry the ioctl(), but the passed exbuf->fence_fd has been reset to -1, > making the retry attempt fail at sync_file_get_fence(). > > The uapi for DRM_IOCTL_VIRTGPU_EXECBUFFER is changed to retain the > passed value for exbuf->fence_fd when returning anything besides a > successful result from the ioctl. > > Fixes: 2cd7b6f08bc4 ("drm/virtio: add in/out fence support for explicit synchronization") > Signed-off-by: Ryan Neph > Reviewed-by: Rob Clark > Reviewed-by: Dmitry Osipenko > > --- > > Changes in v2: > - No longer modifies exbuf->fence_fd unless DRM_IOCTL_VIRTGPU_EXECBUFFER > succeeds. > - Added r-b tags (Rob/Dmitry) from v1. Thanks! Applied to misc-fixes -- Best regards, Dmitry