From patchwork Mon Nov 7 21:16:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9416093 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 EAE6460585 for ; Mon, 7 Nov 2016 21:16:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE0E328B66 for ; Mon, 7 Nov 2016 21:16:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D034728B6F; Mon, 7 Nov 2016 21:16:45 +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 A722128B66 for ; Mon, 7 Nov 2016 21:16:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 929236E1C8; Mon, 7 Nov 2016 21:16:44 +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 853F86E1C8; Mon, 7 Nov 2016 21:16:43 +0000 (UTC) Received: by mail-it0-x242.google.com with SMTP id e187so11807767itc.0; Mon, 07 Nov 2016 13:16:43 -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=/6ANS9lDwyoiimASn+L4cF93T5BnJC+3nH37dFqKmYk=; b=t/yHPdIN/t2ysceZ6SacV3h8Zk869iu8izLbMvlk0YSxfSnFCYctEPyLTH0VCU3cSA IebcHoURWx617BHZlw6pLQARIO+BpnaehKPFH88j33e2unwDQm1drXAaaOLQ6OEuajr2 ZbtuYBFCc3Cx0S7Q1HybVBQw4vx5GyeQLS6yd59sxXZjnReyzaigw5dPVri2WYh3ZqXn JkS0ND7gYOjGRXsG8sxtgFbBs8SddwBIi/60EkxWJl7nXBWi0aZmRdgJ7DAjRbzbsbiS f2Aw+2SfbFHux7QGV8vJaHxGHbMc8TB81JMdGU5jugw35ffKK537SWBiQA23eRlTQKL+ 8amQ== 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=/6ANS9lDwyoiimASn+L4cF93T5BnJC+3nH37dFqKmYk=; b=lzEemIbY7YBcH9vblx2KxAbf1fP44+koAHQteJyQl9T99gQDby33pAdnbKGucAu8hj SsmsEfjXzAHvw48m17p6GzjkxkwdyZCfmNLZig3HBWWeRy35REOdXb1k18+JxcR9xVNB ooh2geR/6VbdhS7QxpOEagbFU8e7VjcqK7YxdNACinkLA19j8wYTby2ILH6BfjbHYQu0 Z599dMJbNmsfOuT7S/6WyYIss5zEMhRI/QVlaByjZZ+92xzS6YmExnT2aJBwNZN0Xzaf AxFIfLxIF5bAWXDElrqwCHBBnVhytBkeb6U8QPEg4LTAiQO6csjwxJzlu6FSCjKdTyuZ 49Jw== X-Gm-Message-State: ABUngvdVJs4LNCVIIonT81LIcDhKq6FojNfBSD1fpdghPqpK80Ff7Uxw5Vzpa8HRwrOXzA== X-Received: by 10.107.16.170 with SMTP id 42mr9115753ioq.93.1478553402975; Mon, 07 Nov 2016 13:16:42 -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.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 13:16:42 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 2/4] dma-buf/fence: revert "don't wait when specified timeout is zero" (v2) Date: Mon, 7 Nov 2016 16:16:14 -0500 Message-Id: <1478553376-18575-2-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 This reverts commit 847b19a39e4c9b5e74c40f0842c48b41664cb43c. When we don't call the wait function software signaling might never be activated. This can cause infinite polling loops with unreliable interrupt driven hardware. v2: rebase on drm-next Reviewed-by: Alex Deucher Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher --- drivers/dma-buf/dma-fence.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 6c3f6b4..dd00990 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -161,9 +161,6 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout) if (WARN_ON(timeout < 0)) return -EINVAL; - if (timeout == 0) - return dma_fence_is_signaled(fence); - trace_dma_fence_wait_start(fence); ret = fence->ops->wait(fence, intr, timeout); trace_dma_fence_wait_end(fence);