Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp313997qtb; Wed, 19 Oct 2022 02:38:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4WtAvtyG7XMbMWdtqKEz72pznXi2oNENGrenYVSRqCBKcinyB6xE95caAwGrtIWS1D8tSU X-Received: by 2002:a17:902:dac4:b0:186:2df3:c84 with SMTP id q4-20020a170902dac400b001862df30c84mr7495177plx.116.1666172298336; Wed, 19 Oct 2022 02:38:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172298; cv=none; d=google.com; s=arc-20160816; b=ooX1s8ucIg1+zdmS4+dI4KGyJmk8mS4lqdc4Dek7gpm5uDu9xb7Oxh+sI/lmiPNHQ/ cMiZPGPdXx+RkunY6fhoB2rXV+6x2JhAjW00W1Q/WWSZ3TkBnKTY8cD6fAeZzBZCVIW2 Zm5g/Lg3PYbUeAU+db+f1oGo7XfSvz5gABh1kbkmQmRbFTG7GEMi1OHZ1uvq5cr6x69I 89CG1wUz1lEaZ7vm1OeUW/gZILsTTHlR3t1ukiPdLQVN77+4crNJeZo3DmCndEsRYBM3 CotkMQanFs+u0cLRyfbGwP+79edOCxdAERTkVtbTAif6tAX8xy9qSDjOPdg/O9NBrRiN mq5g== 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=QDu02gvOvxxEn+OLtmIlcMSr1m12Bgyy0Pr6Tz3rExY=; b=hQAdKekAVBnVA4i2x8b0mIZN49lxrKEgDe641SbuvAjh2ztB1PihYw4v71XD+ChQTI yb+2QyCT0X3ewsWFmWkptasBRueyT76f8RWD/TlUyRDs/xeyFDximvWYpybA37WrkUSB Zhs7hb7YR4hjiy2p3siR5GxJCChl6Ye+3d8dWvHeo4oqw2AeSILuAqsmgi2HKjJx7mt2 QMG1WS0tRgpm+7y33w6ldgRaN4WfmtaM7a84jPpbEnWh/BCqs1eD1J1HpFQM9q8jXj2v viJIhdlvhQHMhiZD4gDMi0HJqdqRny5eNuqxJtKEeiD550s1WOgSlck6SpgD4/I7+QZJ ml4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t1vo3Fbk; 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 d190-20020a6336c7000000b0044fb332e9c2si20916149pga.560.2022.10.19.02.38.03; Wed, 19 Oct 2022 02:38:18 -0700 (PDT) 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=t1vo3Fbk; 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 S231772AbiJSIwN (ORCPT + 99 others); Wed, 19 Oct 2022 04:52:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231723AbiJSItI (ORCPT ); Wed, 19 Oct 2022 04:49:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58FE79185F; Wed, 19 Oct 2022 01:47:03 -0700 (PDT) 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 A9FD061831; Wed, 19 Oct 2022 08:47:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C911C433C1; Wed, 19 Oct 2022 08:47:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169222; bh=IfWrrYSMy5ZOVDZlf3ehBiPo9AMi1p4jSVtv16gPtBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t1vo3Fbkc7RGb0PJYakkmzHPRtcqXFmiAqAeNIsJgJA3tBVSOsAps8Ox/tfkKyBx0 n+4bo59DcxYoImVUpRcxQ0WPp2K0qpKriw7bHYIWdeN38rgiT4dciQMNyUs8FbcPBg JqEr1TxoD+Lo72E31BT2b4enhQDPmPtg0ZF1jY6o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ruili Ji , Yifan Zhang , Alex Deucher Subject: [PATCH 6.0 200/862] drm/amdgpu: Enable F32_WPTR_POLL_ENABLE in mqd Date: Wed, 19 Oct 2022 10:24:47 +0200 Message-Id: <20221019083258.845787699@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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 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: Ruili Ji commit 21a550de5faf9f54013334c9a6a7643b8fd80b36 upstream. This patch is to fix the SDMA user queue doorbell missing issue on SDMA 6.0. F32_WPTR_POLL_ENABLE has to be set if doorbell mode is used. Otherwise ringing SDMA user queue doorbell can't wake up system from gfxoff. Signed-off-by: Ruili Ji Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.0.x Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c @@ -910,7 +910,8 @@ static int sdma_v6_0_mqd_init(struct amd m->sdmax_rlcx_rb_cntl = order_base_2(prop->queue_size / 4) << SDMA0_QUEUE0_RB_CNTL__RB_SIZE__SHIFT | 1 << SDMA0_QUEUE0_RB_CNTL__RPTR_WRITEBACK_ENABLE__SHIFT | - 4 << SDMA0_QUEUE0_RB_CNTL__RPTR_WRITEBACK_TIMER__SHIFT; + 4 << SDMA0_QUEUE0_RB_CNTL__RPTR_WRITEBACK_TIMER__SHIFT | + 1 << SDMA0_QUEUE0_RB_CNTL__F32_WPTR_POLL_ENABLE__SHIFT; m->sdmax_rlcx_rb_base = lower_32_bits(prop->hqd_base_gpu_addr >> 8); m->sdmax_rlcx_rb_base_hi = upper_32_bits(prop->hqd_base_gpu_addr >> 8); --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c @@ -375,7 +375,8 @@ static void update_mqd_sdma(struct mqd_m << SDMA0_QUEUE0_RB_CNTL__RB_SIZE__SHIFT | q->vmid << SDMA0_QUEUE0_RB_CNTL__RB_VMID__SHIFT | 1 << SDMA0_QUEUE0_RB_CNTL__RPTR_WRITEBACK_ENABLE__SHIFT | - 6 << SDMA0_QUEUE0_RB_CNTL__RPTR_WRITEBACK_TIMER__SHIFT; + 6 << SDMA0_QUEUE0_RB_CNTL__RPTR_WRITEBACK_TIMER__SHIFT | + 1 << SDMA0_QUEUE0_RB_CNTL__F32_WPTR_POLL_ENABLE__SHIFT; m->sdmax_rlcx_rb_base = lower_32_bits(q->queue_address >> 8); m->sdmax_rlcx_rb_base_hi = upper_32_bits(q->queue_address >> 8);