Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3920945pxj; Mon, 21 Jun 2021 09:24:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA2ZD0xT1zbGwBaGKzOhRzShCLyTnxOROfL85AML1bmGiC47l/0u8Mc/THGXZ/Z9nu054M X-Received: by 2002:a50:9b06:: with SMTP id o6mr22981868edi.284.1624292660482; Mon, 21 Jun 2021 09:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292660; cv=none; d=google.com; s=arc-20160816; b=Nmx7O57ME2aBM6kNLLSTDJ4Twog6BvpcgqbuYLpavrPQfNDxnAGJy0DaYrYDNRT6da Ubhk1uW7opiF5wrSpdFzzKeMbsrFpyAsnE3udBaWm3LipIt21TfIejgACYgGv1jyluSx n2mZes8ipILe6Y9Lbh9h5z6F9LrS3lfrkzXJiMR3s4huM1Y+H9cZ5guaXYV7Mhuce2CN xjufA4g4jtGLlxut6n0h+VObsrZJHI1rvV8kaklNfaq4MyIqwc/UAw9GN11K5c+H7amn 8LPPURt0uIC3qc6pATPlM7L23TBDJsHM83XuRUHcURajQbXFRSUX6o9h5SZqyMMMdD+Q 69Hw== 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=00MhOi5nmROytbrIaJwwjUFgnfms9bXvTBMLMvXDKyg=; b=qU9nfVqEPsGD4W09anarEF/Aq40rpTwbACnjL4VnVSdcCtC3WqEa0CfsvaXoXvomNx qxXpbKDw+9bHtdVTM4WqcX2pdDlNQIdeQKDcWBsOHuJtJtJ4f34VO+gfH3Hg0rI1clO5 SD6DrOaLpaMKOiW6sEzrNaTEwZvxyOrujwG25pUBUxu/5w89zYaLCqLYI5g8t5Vi9VLg KMSGUX8zBXd4U7PVgNK++3k840Tu+Zbd0ezGZ5rq+tUveUzI8I0V74E4prondtckKaAO h/7D3I9V2lONzGOo/iwUq/cgjN1f/dwCdwoPRK2A1FWTxxXbTWijTvATHoxP/QfZn6D2 ABtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KubFf5Ro; 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 b24si46115ejl.477.2021.06.21.09.23.58; Mon, 21 Jun 2021 09:24:20 -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=KubFf5Ro; 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 S231196AbhFUQY7 (ORCPT + 99 others); Mon, 21 Jun 2021 12:24:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:39908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231996AbhFUQXQ (ORCPT ); Mon, 21 Jun 2021 12:23:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D138E61351; Mon, 21 Jun 2021 16:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292437; bh=8w4ZCN+M/96+9W2+BDlR/yF91gcoywfAtDqRz1IQw1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KubFf5RofFGaXFI7H8EGDiK8WgBDde2b7GcqJJq6H+ARfukBuKkDjdyQNbqFIhtTY FHV7HHeTemWsbbeTcvC0dBT9xDD4DdMfkVwy4eb00eXvC2Q8KXY2nCIrHNvH03BxR6 K5RljlQ4Ao9yV2Qr8GX9C2mOICRaUUpl2+rQNT8E= 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 73/90] drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue. Date: Mon, 21 Jun 2021 18:15:48 +0200 Message-Id: <20210621154906.623652505@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 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 @@ -3593,8 +3593,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,