From patchwork Fri Nov 18 08:26:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9435941 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 0EC9560238 for ; Fri, 18 Nov 2016 08:26:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 010D12982A for ; Fri, 18 Nov 2016 08:26:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9FA8297ED; Fri, 18 Nov 2016 08:26:57 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham 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 8FEB5297ED for ; Fri, 18 Nov 2016 08:26:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 769366E0B4; Fri, 18 Nov 2016 08:26:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id E8C386E0B4 for ; Fri, 18 Nov 2016 08:26:53 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id c4so10586674pfb.3 for ; Fri, 18 Nov 2016 00:26:53 -0800 (PST) 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; bh=+sSn//J3yueUd/ZsR9gzzCJDWp1zmGmQILYGbNuUgeg=; b=RjZqZ6HfG86W9+Fo1tGodYO7hTRmZ8Rkp8EjT1NhJwOcoaTh9rmSTiCrkcWt5dDs14 O9pxmAj62gJ/q8Akh48+Rn0hw1Uto2lJruyeRSS94aeYDnNa3WjGml7RJoHB4Joqb6Vb /oGhv5DZEjcvQkG63ARQX5SmxYWAlHDB3xKaqvAPfficCkJrT675AqVqMw7dXVlxkT9r en4OictHLr5nV4bU1nD0ibuKeQpHY3P/MVbcqzP+XPmPgGDLW/KWYUnwghpiYDtSwIfn 75T4a6xWT3351mh7GprxoTiKatGNZqHFmgGzIuyEZay2kb/kSx/aiTkB5vMWJf0fIoIA ONgg== X-Gm-Message-State: ABUngvcIXxWtsZyBWKrOsOlEtcXW3kGUmBzWcMCYmah8Zn0rOX1YHZwEVGZhgc+Pd7NEeg== X-Received: by 10.99.176.78 with SMTP id z14mr16614835pgo.3.1479457613308; Fri, 18 Nov 2016 00:26:53 -0800 (PST) Received: from jade.nodan1.kt.home.ne.jp (202-72-64-164.koalanet.ne.jp. [202.72.64.164]) by smtp.gmail.com with ESMTPSA id v76sm14947681pfk.77.2016.11.18.00.26.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Nov 2016 00:26:52 -0800 (PST) From: Gustavo Padovan To: dri-devel@lists.freedesktop.org Subject: [PATCH v2] Revert "dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)" Date: Fri, 18 Nov 2016 17:26:43 +0900 Message-Id: <1479457603-30758-1-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 Cc: Gustavo Padovan 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan This reverts commit ecebca79f6976ddaddfd054d699272515869ea28. Do not enable fence callback on poll() when using fence_array causes the fence_array to not signal. For now we will revert the change and enable signaling everytime time poll is called with timeout=0 as well. Cc: Chris Wilson Signed-off-by: Gustavo Padovan Acked-by: Chris Wilson --- drivers/dma-buf/sync_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c index 69d8ef9..6d802f2 100644 --- a/drivers/dma-buf/sync_file.c +++ b/drivers/dma-buf/sync_file.c @@ -308,8 +308,7 @@ static unsigned int sync_file_poll(struct file *file, poll_table *wait) poll_wait(file, &sync_file->wq, wait); - if (!poll_does_not_wait(wait) && - !test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) { + if (!test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) { if (dma_fence_add_callback(sync_file->fence, &sync_file->cb, fence_check_cb_func) < 0) wake_up_all(&sync_file->wq);