Received: by 10.213.65.68 with SMTP id h4csp473232imn; Tue, 13 Mar 2018 10:08:39 -0700 (PDT) X-Google-Smtp-Source: AG47ELvSABClbfJBI5bwmthH9OPZq6T37g9o/FCCMXDKmTrhvtis3RezTkhG9goBMT2xX1RbDvjX X-Received: by 10.98.251.5 with SMTP id x5mr1332570pfm.18.1520960919748; Tue, 13 Mar 2018 10:08:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520960919; cv=none; d=google.com; s=arc-20160816; b=XwQmnHrz8QhYUpRbSci4Oeu+vfJAivstVvy+yR+hJRK6ipCG6H9Izu+J3TbzjUiKxo n9UB62N1aaak6p/GttskEi5nX2tHSejb1GO6gGQBlJo4pxyMcMwXEPZ5f0XvyssXobq1 8hjq1dQL3gBTYp732NRArZUv0QOEcupzVQTpS0gIDivKBP8n2U2GCPt0xn/jbXQ29mpm 4Q/E3NfEWEb62gVAVcEYoe9U+DSerHt2GJTTlWQ/yUhKeOUI3FfB1S5m1k0Yrrh3RtIe 50yq5w1gW1w5kHHNY90DuguppIa0EVXAk4dNTvGw5yJOz1MP3Cpve8GcY6Gih6NYLZ85 yGoA== 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=fl5HsHLbKLAYdc/W3l+4d56kmiD7uG77cDA7IUmAzHU=; b=tYTLfKffCsBcTpizh1TcUxO8hlRckzrn9nOlFrh9NiW6xxoglqwrkqU5OY28G5dkqs peAiytZIycJ4+h2vOCTyLKwM3Hc5c7S/TKlyVzZpg3oFRlh72B0YcPnEe2Q1R+QdpUo2 4edr/LnnPR7n+pOiCSVOxo0658ujogjoUqDShkaUD+CawBBZQspLF+fM6TuTF4/X06Fg WttNya3bmbqm9rFwpMOYMZZKZOhNgIhqZ3hW9Tn0sxEPz2OgdSVr9BVemmCmtYXlgzGf VCEi5VBVJcjZ/YUi6TefTvcnikzeNda7KagdXBfzp/kHJIjM2OXFEkFqs9uVXrGxiY2a esuQ== 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 80si342316pfn.73.2018.03.13.10.08.24; Tue, 13 Mar 2018 10:08:39 -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 S932785AbeCMRGu (ORCPT + 99 others); Tue, 13 Mar 2018 13:06:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57300 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932495AbeCMP1s (ORCPT ); Tue, 13 Mar 2018 11:27:48 -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 793B710CE; Tue, 13 Mar 2018 15:27:47 +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.15 011/146] drm/i915: Fix rsvd2 mask when out-fence is returned Date: Tue, 13 Mar 2018 16:22:58 +0100 Message-Id: <20180313152321.479544833@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@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.15-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 @@ -2419,7 +2419,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 {