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: 128302 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp104017ljc; Tue, 13 Feb 2018 14:11:16 -0800 (PST) X-Google-Smtp-Source: AH8x224sM15paK9kYBfi2ANWSukXZ+zSdx+aTeJnfKJe6rizaKsW7y7YsvRzkaySWiX2FcbV3hag X-Received: by 2002:a17:902:8496:: with SMTP id c22-v6mr2400377plo.36.1518559876163; Tue, 13 Feb 2018 14:11:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518559876; cv=none; d=google.com; s=arc-20160816; b=OYIt0QR8qyjE0sIsOME/qWhNmEPDjnB5UMN8SAMee6my51/h317UVnxyObWIQFRnGS xeu3xL63Yn607KQIuxldgkod09K7lOkr7LjSiTixWdzSHIWN8Rot6ujGMlOFFmP5lwv3 ++RncKehlv1SIWd+ocFjCZSvcI8JyrGKodcETOA7rI6Ld++XXlnXTh0XZljKMJ5mkAu1 J0/8GHCsgWDYM7nAKm0EDp6Fir0o86daau8dqHTRnVo9gv8np18eZHF81Qy2CSnu/w9U XiM5W8CrBTUrsRhkMKxnXVcfHEADxlXStmKv/rvcj3FwQmydq8+Eq6W2R1vpk3D65W47 74Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=kJobFL7WAYt6Gl8HmF7CjJm+8P9CaALDikd4gb7+pjs=; b=WqXYNlyC42sNADEV2/Q/TehyaJvCeI17jTXyWjjXUNS1RCywGlaeTa8lvrwDZXrBdJ o6A00J1GTNGGr0NutlYSA+4TTRcm+WNPo2tKqR9yhK/GTOSpbcMlO99l3ptkCko5fQ9O xrIZcbqcoJbpriFiMAsfDvPV97b9FnGM0hWFIAymD2rLCYMZVTLtDc8RyCThooZ1mfVG KWEsvSNS54IEnbfyGQFuYfy7VvvFCCRojhaDC7N4nE/kWJaOabG/PNZHuksuHE/Y+JrE cH6dPCXa5N8mDD2Yq8seadR8xrcZ2ZR7/JN75torYkAArkX3cflVuErSWnAMJmsdapaN 3DDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id c89si1562686pfe.260.2018.02.13.14.11.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 14:11:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org 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-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" 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");