Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3936829pxb; Mon, 21 Feb 2022 08:39:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMhlcBvL7IlS0FfioSSjMKNYjlvYmW5rmK/jsXEBG8sSyvEfGQL06RC6QLZPQn8PLfmV+f X-Received: by 2002:a17:906:6a2a:b0:6cf:d228:790c with SMTP id qw42-20020a1709066a2a00b006cfd228790cmr17080431ejc.75.1645461561901; Mon, 21 Feb 2022 08:39:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645461561; cv=none; d=google.com; s=arc-20160816; b=O3ONgkDjBfXq27sF11poPcJbDtV3bLdlWxJp09hza5ixWIa9W3uaxE62lViied9Nis M9FvrcHdhX7u3JgdEjvCyeLc+oiZZUbYxhCPmSFVrS+ywtrM/LhT47hH/5NmMUpNoeEy NEsSs+EazsTi1n0AdVirKgEQyHqYCZmDpYQWIUS+32Bk/PdJILo+6/jg502ETBVg5gpO CHEm3BZBgmT3nDKoWVNJoc3lAFkIY7D8X8EmV2xFwREJAtw8Rfsf3kIiLvxGxHyUJLbj kexVLw7AJmHQTmKkpFnTUZSsywz507QXdvGHzj1FYqM3ntjrJpBxBTFSK/3BpXJdHnSy 4Iuw== 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=AT1yK335gMaVTPO+DzyBzlp9+LdUHUej6l1hiwR/nfo=; b=o9iSU1qHcZ3DbpkzzbLtwLbvFgGgcHrawfnXivT8x4ZhSXMZhaXpmKjat3w8P5frMO qLBaHqXjb5NnyyzUHl7Vu1viRCgluF1YeBrAu0COVmDWruBnQCohYvdy1pdiFpREvOZt PCvNQB7176DCQYdjQGR+7wh6EfOFkcxbrW/jUf6w25aVTqWcALtl2ezD5aFdKV3uiDK0 NGqNsKe7yN6f0Ld4m/NardtMCYUlOeg55+mg2J4Z2wXCiFeXyzG/2w+jsO5spfmQPBg2 djJ83Z8ubrUbJHix9ObVkqBujJkBHuEN07oNdt8/iMaac/GpFgjDNREY+twTnDki71/G F6AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XkPUP21T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13si14344499edf.2.2022.02.21.08.38.59; Mon, 21 Feb 2022 08:39:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XkPUP21T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348741AbiBUJLi (ORCPT + 99 others); Mon, 21 Feb 2022 04:11:38 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:48254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347523AbiBUJGr (ORCPT ); Mon, 21 Feb 2022 04:06:47 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51F6B31234; Mon, 21 Feb 2022 00:59:48 -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 E1AB461132; Mon, 21 Feb 2022 08:59:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9839C340E9; Mon, 21 Feb 2022 08:59:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645433987; bh=68TEqlEr7oRnJi0vtYWnGuAH20gM7jHIJnUnx/9lt/Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XkPUP21T1ls3EqkntP6J4VMC3kja1GSsmV6/fH5hMGU83jOkARl6VsR8+y9zTG2nL xjYssCn5XXvvQkfOcohSJehZhuc1/83E5WtbN8UH4hXmL7PWVeETSDRJvR+y6A/x9k kMuTPM0kJX4KUURLIDPF0thk1LLNcdWJw/Zd+9c4= 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.4 21/80] drm/amdgpu: fix logic inversion in check Date: Mon, 21 Feb 2022 09:49:01 +0100 Message-Id: <20220221084916.278671251@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084915.554151737@linuxfoundation.org> References: <20220221084915.554151737@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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 58e14d3040f03..870dd78d5a21a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1976,7 +1976,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