Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4432373pxb; Mon, 21 Feb 2022 21:26:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwA4IMYIhGAfga3Q9/XT8EjXv+gbPCSWS6N+tInP5kGBr/fDXrEIS5HSFyIAlyj0SOjN26W X-Received: by 2002:a63:eb0c:0:b0:373:334d:c32f with SMTP id t12-20020a63eb0c000000b00373334dc32fmr18786374pgh.358.1645507605532; Mon, 21 Feb 2022 21:26:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645507605; cv=none; d=google.com; s=arc-20160816; b=nGx8VPRsyh3Qfn+mwFjioLZMNA9rK5WwR22N2LZlDI7KR9er0tM6W/xAstb131mB4R R00B0nJNJ3yjhAQg5cNiZkAJpZooaWrg2jZjD3SiJFiEADM1CxQ3TNnsdFRTYdG+sG2a j8YeqeR7ZqxUbDb3f0EbMai3MiS6CHJxOLoDCb30mYUzKGyIMgZMN0FvU2Hm64IThO75 e8Rjl8UxN0o8dmIT/PCeC6svopf/iCAq/d3ROkODlM1H+G/qS+2pn5L+g71KahUsJce6 L2hyV/DoGotqQ1ZMdxHupkTRFibxg0SvPm60mROmadaH2yNBZZSA8Tr5HJefqUnddfKX mGXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IHqwpSDCr7rvywIFSRtVR1G4TSvb0uyD++UDSn+JukU=; b=qHeDwY3FzHV83Uh2sFWgModzF+n7Xrbu0inmIeZDu2sazaptp+MZh7rdz55yflrAPK 2VHfYbudOF9YheT5y3/UPtwW92AJm+MbSTMxsWJfakhjoqaIuueegLQOKZatDbupAfAy lWy4izz+HPw1oD6HC5CJrtlcZbw/pbEvHoqNkHms8nDs44w/lumd0LbDuMizfkdBVc1e ZR6MTLTy0wNsbFa7ygt0jOvzFjqsoT9Lw5PNNMvvS3gTSNDqetfmZY8o+Ts4fA1PdHiI BsXhzGIkGLKafgvD0CWcpQ1o2EVvYpJP7vQ0qnwm3fRoV8Mcp87oH1/WTgzIsKjtdSTl 2fTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eqi+Cy8u; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m1si31206583plg.238.2022.02.21.21.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:26:45 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Eqi+Cy8u; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 71354DA9; Mon, 21 Feb 2022 20:56:41 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345846AbiBUJeF (ORCPT + 99 others); Mon, 21 Feb 2022 04:34:05 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:51842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349854AbiBUJ0o (ORCPT ); Mon, 21 Feb 2022 04:26:44 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0398A1EC54; Mon, 21 Feb 2022 01:10:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D9D186097C; Mon, 21 Feb 2022 09:10:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF74CC340E9; Mon, 21 Feb 2022 09:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645434651; bh=su5tWGjpZ4inHUxdAgviiH1QYt3xfVvRJgHlrKb+6GE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eqi+Cy8uEN/hQgE+z7XN01yy8gA/FA7bn6e5hffgQ/1MWL0TNyIONEZZ3yw36+mqs w9JqZJ1926AcyD3Cl6tkGUSzx6c2JxVS4/WMJ/icyKnBkjI1zwh9EurUt+50pMz8PV Aza1S5Zos4yWhHPGWf5ZUY1dJNA/hlnV3nqvAcsU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Felix Kuehling , Alex Deucher , Sasha Levin Subject: [PATCH 5.15 050/196] drm/amdgpu: fix logic inversion in check Date: Mon, 21 Feb 2022 09:48:02 +0100 Message-Id: <20220221084932.609854983@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084930.872957717@linuxfoundation.org> References: <20220221084930.872957717@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian König [ Upstream commit e8ae38720e1a685fd98cfa5ae118c9d07b45ca79 ] We probably never trigger this, but the logic inside the check is inverted. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 94126dc396888..8132f66177c27 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1892,7 +1892,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset, unsigned i; int r; - if (direct_submit && !ring->sched.ready) { + if (!direct_submit && !ring->sched.ready) { DRM_ERROR("Trying to move memory with ring turned off.\n"); return -EINVAL; } -- 2.34.1