From patchwork Mon Nov 7 21:16:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9416097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 874CD60585 for ; Mon, 7 Nov 2016 21:16:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A51228B66 for ; Mon, 7 Nov 2016 21:16:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F6E528B6F; Mon, 7 Nov 2016 21:16:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4842828B66 for ; Mon, 7 Nov 2016 21:16:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF38E6E20D; Mon, 7 Nov 2016 21:16:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 704716E213; Mon, 7 Nov 2016 21:16:48 +0000 (UTC) Received: by mail-it0-x242.google.com with SMTP id e187so11808144itc.0; Mon, 07 Nov 2016 13:16:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/LbScZVGCvKMUeVmYqFyRXdFK3FlZsX1pwFelCRtsLE=; b=rqT/05wcVJM/iLsVO7GFCGdgKYDHDFCHDomgHhpsfXNaxyGX8SH5yk7AW0TfSt3xPp io5OXT0YJh1OW/bAzsIBjE1+WBRjj8DoxncwlHwZSLemUCNZwLos7kj40EG6Xl7EOKI0 uFaVdjYR6sNCeJR9lIEHoH+pMzmTwZBCMjg7A5RkIpzHPyEm4y0NcUDKgJ4JrJZXipFt qHfNF0wPUOmtEY+gabGdkRuAB/RBIgaN5B6ptAmOl+wWBIsuk9XO4uNp0iSctW7HqjZS Pi6U3zazJ9nDmkombM6VwwEFcX09nZWjdqsa6nVHA6hPVnB0UVaUy1DBPz4uxFYrKF0h fNcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/LbScZVGCvKMUeVmYqFyRXdFK3FlZsX1pwFelCRtsLE=; b=Jd+ey0fyCklARUzLehuahOfMdiwlU1jZwpaom0EqYzV+RpR808pXJc+kuA/MNJ8eSJ mBjDsnY7Hksg8ctfzphFnnxdKJfSHWDYf//mW/lOTE34abPU1dx/TCq2cf3dFb3hywPE DZihvCWPbjL8NdfltzH4kczSbyhgS1ru/Gm4XZjPURvpd5ND8McUL9FPnE4jWpjH2nZt h+6KA2CzjdgR4IjTdJCyeBsWlCJE8flMEcDE/5uiZR9tgXcwzwukGmHvVhYYJ39ZuBXV XSDfGXLWHD2Lcqw1YBB9QAEu/ZTSrzDPjYGQJickD3WD6s/xa+Sxc1UTeEuJSC7/0Ifi i1eg== X-Gm-Message-State: ABUngvc9sDyoBcL+KfG7rohyGgFEXnz3kKt/3e7q5c44V+dK/wZtbtGbAL+alpp44aU4xg== X-Received: by 10.36.224.200 with SMTP id c191mr6883499ith.118.1478553407704; Mon, 07 Nov 2016 13:16:47 -0800 (PST) Received: from cm.amd.com ([165.204.55.251]) by smtp.gmail.com with ESMTPSA id 22sm9687772iog.28.2016.11.07.13.16.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 13:16:47 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 4/4] reservation: revert "wait only with non-zero timeout specified (v3)" v2 Date: Mon, 7 Nov 2016 16:16:16 -0500 Message-Id: <1478553376-18575-4-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1478553376-18575-1-git-send-email-alexander.deucher@amd.com> References: <1478553376-18575-1-git-send-email-alexander.deucher@amd.com> MIME-Version: 1.0 Cc: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Christian König This reverts commit fb8b7d2b9d80e1e71f379e57355936bd2b024be9. Otherwise signaling might never be activated on the fences. This can result in infinite waiting with hardware which has unreliable interrupts. v2: still return one when the timeout is zero and we don't have any fences. Reviewed-by: Alex Deucher Signed-off-by: Christian König Reviewed-by: Chunming Zhou (v1) Signed-off-by: Alex Deucher Reviewed-by: Gustavo Padovan --- drivers/dma-buf/reservation.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c index 7ed56f3..393817e 100644 --- a/drivers/dma-buf/reservation.c +++ b/drivers/dma-buf/reservation.c @@ -370,10 +370,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj, { struct dma_fence *fence; unsigned seq, shared_count, i = 0; - long ret = timeout; - - if (!timeout) - return reservation_object_test_signaled_rcu(obj, wait_all); + long ret = timeout ? timeout : 1; retry: fence = NULL;