Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3920535pxj; Mon, 21 Jun 2021 09:23:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzamSkAuXQNsGJffnUc+rihzp9Jh1/QMaDwB4YwgLyjs8p5vDr1BjRNuTaAZib2fdyMIRcN X-Received: by 2002:aa7:d955:: with SMTP id l21mr3632159eds.35.1624292626136; Mon, 21 Jun 2021 09:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292626; cv=none; d=google.com; s=arc-20160816; b=UtrsG37aAHPGJ+oneZb6golsn27ezuLRhuTXRtHMfMNKKc0RPjbWQABHQ/fv8kliqe YcxBUCbUhwxg3BTkMltuuIyPcQvmk9Lg7n7AWS5NXk8c5YCSCg+hHssB93iyFNuFAuLe eHc34m/D82xTS0hPwjG7pWkGD/VfDlw+KNbO35t+3YzAdKYh2r+QdF57MYE5cWsYZJeJ GB1CfNlcm9W1WIGPZGlb332NhefjrWCqidYdFOxf6jA9ReRkKTyBFkZVwQUn1E+WoGja sougrPSYv+OFDVR0E/lnaNtG1vRks3MHk5R8hRRhpr6BG25p3WKYOV6wdwfU28k8u4yY u/kQ== 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=YhMLNI+chtdlseg+nHA7GLrzAltgyVy/+I0xjou/rLA=; b=LUkT0stKzoJ/Wo7wNcYglFlFUMdFJphFKo5wooAryv0+hHgh3zt/pKlGCnQNGJGB+z Ctgy9xJ0/VWwt07+gzCiDmc0oy/PLqzjtH0hERRBCiYpDZ9S1bVpy4V2Rc2XMb3NKQs7 malbkivlEkm8q/IQUejCTg+H017t3EdlY93AH5t+2qZvmg0WkgOmhkdldQAp4tC4vNwC ZQF2fwkkyJwMkytAwR0nmcj/pkLjv9ZE12cRl2cB79TKRN+xMKHRUxRstSzneWOnwqTU GcSL8gM02uhI9qFI8UL6kFmfAzkb2t349JCKmYOyMJqNektnstMnbZOlbyK3g3ky8x6N YYJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ox2xdugg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si7443016edd.133.2021.06.21.09.23.24; Mon, 21 Jun 2021 09:23:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ox2xdugg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230347AbhFUQYO (ORCPT + 99 others); Mon, 21 Jun 2021 12:24:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:41468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231932AbhFUQWf (ORCPT ); Mon, 21 Jun 2021 12:22:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B69F26134F; Mon, 21 Jun 2021 16:20:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292407; bh=fEHaDeENKM+/qiBkujykmIefjGkEyJV67f0z9bVtxHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ox2xduggFh9z7VDX90ZhflPOndE8yw7GyWFZuBtgGZHmBFVszyvEqi7d+KARN5QGo lqmD4dC+SV2+TYYGafRcO8thoysFivgi3qlxoF9tsaz/AA8vsa2wwLPk6gMyd39fWs WZdTPAiMWmx1rTFUzYrV/tChB0kw/yjzWhrSDYiI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yifan Zhang , Felix Kuehling , Alex Deucher Subject: [PATCH 5.4 72/90] drm/amdgpu/gfx10: enlarge CP_MEC_DOORBELL_RANGE_UPPER to cover full doorbell. Date: Mon, 21 Jun 2021 18:15:47 +0200 Message-Id: <20210621154906.588365065@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yifan Zhang commit 1c0b0efd148d5b24c4932ddb3fa03c8edd6097b3 upstream. If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c @@ -3416,8 +3416,12 @@ static int gfx_v10_0_kiq_init_register(s if (ring->use_doorbell) { WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_LOWER, (adev->doorbell_index.kiq * 2) << 2); + /* If GC has entered CGPG, ringing doorbell > first page doesn't + * wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround + * this issue. + */ WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER, - (adev->doorbell_index.userqueue_end * 2) << 2); + (adev->doorbell.size - 4)); } WREG32_SOC15(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,