From patchwork Tue Feb 13 22:11:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 10217665 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 7FB6C6055C for ; Tue, 13 Feb 2018 22:11:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6739A28F43 for ; Tue, 13 Feb 2018 22:11:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 590FF28F0C; Tue, 13 Feb 2018 22:11:16 +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 E148B28F33 for ; Tue, 13 Feb 2018 22:11:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B5C26E1D3; Tue, 13 Feb 2018 22:11:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ot0-f193.google.com (mail-ot0-f193.google.com [74.125.82.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id D5D2C6E1D3 for ; Tue, 13 Feb 2018 22:11:13 +0000 (UTC) Received: by mail-ot0-f193.google.com with SMTP id e64so18674105ote.4 for ; Tue, 13 Feb 2018 14:11:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PQNXS6IcCyING2i+12k1e2HmtvHkU7Nn4O1cYhII+P4=; b=g6hPyz+lUCKYVyeUZ+lQNMUadSs3wEQMwLCcW1/r6OzVjZm3D3e3iI2GdzkSka88Q2 GV3elgpfMgazVNo2JRkPmcnBnMwGxyiuRfCHuPbEz6uA+XrHyoDXeS9plCr7uWrMT4+O 1lTyfuaqH2s6sZxCbNYjPBIul7tY1vXYvzG4FC2xHlRk32qsWmf+uhPnKX2j+GgTB1YE oYhAmMfSz7jY0z5N1Raxfnsx8kQajhLoBzoV5WxSQccSogjZXUyNas6QLYhwG+2BKx2y 6MeWFT9/7sWmAlBesjhbrW9tYg5JuRqT6HARV6fVwZNttGcvx04AF4cdUHH1BZv3k/Vx P0jA== X-Gm-Message-State: APf1xPDJscMw/VCux0TlCVkBnq1XbdgHrEa8VK0smMnQKNdsy1eEH1tx iWuloJTVhb8cq5t7XCJlstxzlog= X-Google-Smtp-Source: AH8x2254apJsG4ROcwb6kY/bzcl+ejsmGHuodojSO+AbT496GS2EY1GmYMxAXfo0UFlGlHQW52R1PA== X-Received: by 10.157.21.39 with SMTP id u36mr1401384otf.110.1518559872775; Tue, 13 Feb 2018 14:11:12 -0800 (PST) Received: from xps15.herring.priv (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id e44sm7132081otd.63.2018.02.13.14.11.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 14:11:12 -0800 (PST) From: Rob Herring To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm_hwcomposer: fix check for valid fence fd for in fences Date: Tue, 13 Feb 2018 16:11:11 -0600 Message-Id: <20180213221111.27707-1-robh@kernel.org> X-Mailer: git-send-email 2.14.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandru-Cosmin Gheorghe MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The check for a valid fence fd is inverted, so we're failing to pass IN_FENCE_FD's to the kernel when we have a valid fence. Reported-by: Alexandru-Cosmin Gheorghe Signed-off-by: Rob Herring Reviewed-by: Robert Foss --- drmdisplaycompositor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index 3a20b31dec99..e556e8641d79 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -589,7 +589,7 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, else rotation |= DRM_MODE_ROTATE_0; - if (fence_fd < 0) { + if (fence_fd >= 0) { int prop_id = plane->in_fence_fd_property().id(); if (prop_id == 0) { ALOGE("Failed to get IN_FENCE_FD property id");