Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3942706pxj; Mon, 21 Jun 2021 09:52:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4h2WzQPP8SNI1UWvFURf0fJYlYmKKFIPTox+8k4nPeNZvAvasCEklaJCaoNGtvhw0VZL1 X-Received: by 2002:a05:6e02:4b0:: with SMTP id e16mr822353ils.297.1624294370047; Mon, 21 Jun 2021 09:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294370; cv=none; d=google.com; s=arc-20160816; b=QLR/kBOuomc54mZjpsy5EFEuEKBZvIdxCEvgc3qDzV/Ul0W7yqa9+lBn/KlJjLeTzh XVCCfM5lm1gUeObIWHzTF/mQnocYyV0fjYm0oNYAZ4Cj+VnVxX6QJnSRtpRfZco8iQyL LR0qmBbhFdAuLPB5TrYt/iUevyPjvhNm45+6yX32V1Q+6WaglpNea8uUUX9BSslsEv99 iW3336Wds98GeB6p0pa9BFBxwCbge5wWIyvYW5oce8LKLDyoc62Xfenc2Y32xgEzTM00 iBZUfhP0pZOSXLpiYYcKpQrKgPdfYKPyBWWVHzGT5v+lyaEVf9YGocEGdRuKJg8WROuD 6Y0w== 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=AX1HpTb5ZhBMPWmhd2AmOoiDJqa2T4bPqgR3LoQZWI8=; b=JJ9azvryZJBM60H5boW7eSzL3/bzRwT4PXQpWd11ETxMed3Jj3/i+22AEDsgH99LHM Oy+hFRTa0caHTbbm7i8NoPTlPIv7gjeqClMXvqt/I3OCM8DwL5548pevgVRGDGRMXsOt wGS4Sry2OncANhn9r3b9UxTVAp5ckYeD8ss+PN5ptM3LoDYWWLaqqYHrMk9a1DulzT7h 8HxU660Yj/hsirbncXtwkSvjYq7lkRvrWZ8wxbtP9fWBOEsdWeHV4KPOYMyWZiGW8h88 DD4p7Qbqv9tg7MooAZZHngbHiOrMJMU+WfXm34s7RKlXUwYVJIB0pQcY5mVUnc2MeH0I lqbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lIokVvL7; 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 n1si447546ilt.140.2021.06.21.09.52.34; Mon, 21 Jun 2021 09:52:50 -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=lIokVvL7; 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 S232493AbhFUQxZ (ORCPT + 99 others); Mon, 21 Jun 2021 12:53:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:38068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233240AbhFUQt1 (ORCPT ); Mon, 21 Jun 2021 12:49:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1709E6145D; Mon, 21 Jun 2021 16:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293272; bh=rThdMEtFDRM1YhoSDnD0/Y6nRSxmSvuUpsszqvht818=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lIokVvL7ajGb2Xb+W7aZElZnF2FlLSk8TMpmKAZNnoJ35ND/ShMf24ULJV9hEQe0y lVlOJcGav6u89mpCUQ99sciBFGjUdJZYqfdDVTDKmmlT0cfs39U+Lmk9nsFqTrugUE E+viDqVkEdxHgGOwjL6xTt7kSAMfOS0RluIi3lwY= 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.12 161/178] drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue. Date: Mon, 21 Jun 2021 18:16:15 +0200 Message-Id: <20210621154928.230954855@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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 4cbbe34807938e6e494e535a68d5ff64edac3f20 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_v9_0.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -3623,8 +3623,12 @@ static int gfx_v9_0_kiq_init_register(st 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_RLC(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,