Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4422083pxb; Mon, 21 Feb 2022 21:06:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyI/jtCOqJGsBCM3K6FbPM2fge0dH4PaoNFfFuDMsJL6Btf9c6/+b+HYng/QWgtUpqkzc1Z X-Received: by 2002:a17:902:d507:b0:14d:76aa:fd38 with SMTP id b7-20020a170902d50700b0014d76aafd38mr21882204plg.107.1645506382498; Mon, 21 Feb 2022 21:06:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645506382; cv=none; d=google.com; s=arc-20160816; b=xFN/zC8Os08gTu3ctJMC3MJA8TQVmlaXowczY9kffYsqTphrrVdFdtMCjSP8UkYVbj uizPUwT+UoHUUbHyRwjKxSgp1irmKCSIuYPemDvXY1tFncZry+MiY5nWRneGiCB8SLbF EAVuPaO9F5YRRrsNsIsRAzrxnRHwTH4VRhonnb9e+H7KHbVl+LrOA0WEvF1FPhPOPJ+l uZIaoZNfwZD8oRPUyKcjcTIJNghJ/5lGPjxA3B54WcnTBfFGxBzHmAXwq0EOytSYnqFU hWXWYrof+A8MpRVUvN0g0+tAco8jWH4OY23Pm2UUJXHkE1J0g8LvdXk8t8nLw1XawFag TNjQ== 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=GTKM7OJt1lP2sjJvXsq5Tb7lMEHVA93cBhzWkUKJwVU=; b=OmrJatmFxjw/gpdm25LZ9qZghPw1MrNixVOrsHLLuGyD+2wcYlFwwxJUNkbQg+ZjUv jdB6gZGq8X5+pBk6zXO6COIVVqSz4IVNvQOXdSHcPTAkTeNVSvDCVA0XGuVJrDcU9a1E giWPuhhrOqHBt5iFB25n90dl1krBue4p7Hper7XrqjXqUKKERNnxpzQbVDHGVt/Zy2MZ 6l34Z+a0RSdP3EXuZ+5pOaAyw21H8sfPT8l+AGWEwmHk2FtGTelmDx8P/LcpEcc6ESyX gJEbOnTFY2LDDGcNq3kN2hK7A99jIoss/KMz/jBpfduFZZQkPapgo0ZE/rI6zyUpOO/x uwQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VYkT72Xc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q65si19508861pgq.98.2022.02.21.21.06.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:06:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VYkT72Xc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 14744BF512; Mon, 21 Feb 2022 20:39:37 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352209AbiBUJxq (ORCPT + 99 others); Mon, 21 Feb 2022 04:53:46 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352937AbiBUJsC (ORCPT ); Mon, 21 Feb 2022 04:48:02 -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 33FEAFEF; Mon, 21 Feb 2022 01:21:36 -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 BC45160F4E; Mon, 21 Feb 2022 09:21:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C996DC340EC; Mon, 21 Feb 2022 09:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645435295; bh=a3J8QM1OA1gD01iP8ymTHliU1reXk59up1EmTg4RyTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VYkT72XcLt9OI1SMuFNHDRL0bruhuIghrtowQ2oNdKLHZjkaAJuNyJ1GZudENvSU7 MxUdYI1Jg3EhBXqmrUeR9UAJGu/yyLJwIr6YBkvpv8UkOGGi8L5/qjBshxbt2mtN2k KWtIqWFgryHZEe/9tw7OjPQynBffBCOtPTOHdzs8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yifan Zhang , Aaron Liu , Huang Rui , Alex Deucher Subject: [PATCH 5.16 081/227] drm/amd/pm: correct the sequence of sending gpu reset msg Date: Mon, 21 Feb 2022 09:48:20 +0100 Message-Id: <20220221084937.563094576@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084934.836145070@linuxfoundation.org> References: <20220221084934.836145070@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: Yifan Zhang commit 9c4f59ea3f865693150edf0c91d1cc6b451360dd upstream. the 2nd parameter should be smu msg type rather than asic msg index. Fixes: 7d38d9dc4ecc ("drm/amdgpu: add mode2 reset support for yellow carp") Signed-off-by: Yifan Zhang Acked-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c @@ -282,14 +282,9 @@ static int yellow_carp_post_smu_init(str static int yellow_carp_mode_reset(struct smu_context *smu, int type) { - int ret = 0, index = 0; + int ret = 0; - index = smu_cmn_to_asic_specific_index(smu, CMN2ASIC_MAPPING_MSG, - SMU_MSG_GfxDeviceDriverReset); - if (index < 0) - return index == -EACCES ? 0 : index; - - ret = smu_cmn_send_smc_msg_with_param(smu, (uint16_t)index, type, NULL); + ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_GfxDeviceDriverReset, type, NULL); if (ret) dev_err(smu->adev->dev, "Failed to mode reset!\n");