Received: by 10.213.65.68 with SMTP id h4csp425234imn; Tue, 13 Mar 2018 08:39:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELuTCIPMUQZWFdnvIQwTk3saOL8XzaRA6qfojG225ujSzv2icHx9pGsI3B31ijIiy/kpyF36 X-Received: by 2002:a17:902:6ec5:: with SMTP id l5-v6mr954350pln.113.1520955585148; Tue, 13 Mar 2018 08:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520955585; cv=none; d=google.com; s=arc-20160816; b=gABCwPbdZtJiuYXl+z8ECl/R4UYhRrOiLCR4W06571RbNics6k0/j/eCGaZbqaTQsc yv5INBktZLlo69iZAzwUys41hCCc8RsKWL6EnTFJuYrTDFpugGYu/cOQPuc/sM2Wyqr1 2p+4AwPBGoYKcADgSWQxy94by3jyhPILTQ4tDyWc38ZlnF9wPQdRY45qH7G7idF5QE+8 /fOJ85RySFr/bkqtTLhDwR7LO5j6QmJqccO37qlYFZ4UbZ68qgC7tBnJQ4EQ5RCHGRaR AtR6uAP2De0kpE/Al2pHF9/RckiTmdko6HREy9hxkNe3mYU16Jhk/AESpnNMYfIbLbFE By2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Z91kvUldMRWCDs8XJid9y2FkpZsraiyOMMzALwNIBV4=; b=DpceEgiS0yUqq3sZPm4MTfEPYl3aULO+pcejrNqg16QU2HUh9NnohdNjEF+tO+jw1I ZVm36RaeWRXdehGXnyJkUJeO2lBRpcKU9nmAYmWI7A14Ga4TZizTkZykUsIa+0j84Nq1 zxWsdOSF1ZYPdGmHfn1IgW67Q2DJER2pk5GwSIfuWERq0TV5zgEL2E1OO87Y9MCy2R5L scrx5eK1qJp+/UXBKz5zszXBn9ygdRbxU79jZA/LkmeIot1s8YV7zv9qTupS7GMDU0I7 QTcJqU7ie9zdiH5an6Cv7sPtl4XLYcOTO3VMfMw2e/yWBTpGu1Htzj3qwUS+CWDoWEw6 3sCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13-v6si309335pln.204.2018.03.13.08.38.59; Tue, 13 Mar 2018 08:39:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934401AbeCMPhb (ORCPT + 99 others); Tue, 13 Mar 2018 11:37:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33962 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932486AbeCMPhZ (ORCPT ); Tue, 13 Mar 2018 11:37:25 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9FDCD1250; Tue, 13 Mar 2018 15:37:24 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Wilson , Daniele Ceraolo Spurio , Rodrigo Vivi Subject: [PATCH 4.14 052/140] drm/i915: Fix rsvd2 mask when out-fence is returned Date: Tue, 13 Mar 2018 16:24:15 +0100 Message-Id: <20180313152501.755124343@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152458.201155692@linuxfoundation.org> References: <20180313152458.201155692@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniele Ceraolo Spurio commit b1b13780ab06ef8c770dd9cbe31dac549a11630e upstream. GENMASK_ULL wants the high bit of the mask first. The current value cancels the in-fence when an out-fence is returned. Fixes: fec0445caa273 ("drm/i915: Support explicit fencing for execbuf") Testcase: igt/gem_exec_fence/keep-in-fence* Cc: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20180214191827.8465-1-daniele.ceraolospurio@intel.com Cc: # v4.12+ (cherry picked from commit b6a88e4a804cf5a71159906e16df2c1fc7196f92) Signed-off-by: Rodrigo Vivi Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -2408,7 +2408,7 @@ err_request: if (out_fence) { if (err == 0) { fd_install(out_fence_fd, out_fence->file); - args->rsvd2 &= GENMASK_ULL(0, 31); /* keep in-fence */ + args->rsvd2 &= GENMASK_ULL(31, 0); /* keep in-fence */ args->rsvd2 |= (u64)out_fence_fd << 32; out_fence_fd = -1; } else {