Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3930337pxj; Mon, 21 Jun 2021 09:36:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/0Mj5JZw/QnIf5Oibcaxtp34IG13n9LpWttvt7eJQkR1NAswMZqwwKQAgwFbjA/bxqA6j X-Received: by 2002:a6b:910:: with SMTP id t16mr5116634ioi.175.1624293379102; Mon, 21 Jun 2021 09:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293379; cv=none; d=google.com; s=arc-20160816; b=j8UIPH0nUlbzO7v1xqNjzxdPy3fGn7R3WY7wmLD8Re12WClTfvchcAlu/U5DssPoz9 mbXLiiUQ70yJB4wwFbcmdw2IXPbkx6OMJY6Tvsc631w4wHNILmgD2I4jtGrJEolhWPjw 88YlndYtypzbxftwPNiEHOuuUzGwvAAwVvs7wJhnraUPwExbYhSaGJTStQ7TEHNeROdL HuzenMyAInenc/ZOhrbfZUXWmdCUGE9ZGDztW7SZJu/AB/F1/+KkpbPRAJax28pSEMdZ ogdVwDH1eY5pN8ss+XOsW97ePYcGUP9OpHgve/QEiMASCMk7N/x2cGmPu/mIKdxeEVId Oo/g== 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=TYFUNPIkMTXp6FMXzHWhQAdHAPR+VfpsCM9j6l2TjQQ=; b=du+a2ysFr8lV/yJ3eYYBoWOEIa5zh7wh2rG66wZOmeK2/LkZJBVxiXdgYIi6bAQUP7 yvopYSPxvjoSOpUUWLgis+6zL8vpydGn+BNo7YHWEIJMBf2jf8FDcq/z1CUv11X2Y/ib 4b2U+7aH8TArN7n2rBUuCpsyKuJMzQqIlwSO/gX12lRQzq3vKZYQ0BIpJFAQ0Qijwu9e dDrVudPRiu6y2apmsI4+qsNUJ2Z5zRH9dgnSclCrr9Wg89GsFhQD9gMQ31XaeiwbU2sN t2Eax1E64JcFPw4Afa4iaZvuzz/IB0blXHT/iW/lce/+LmGFUDfKDeCW/wY+le7Q4btO QDyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TImaXZSv; 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 u18si18414147iol.87.2021.06.21.09.36.07; Mon, 21 Jun 2021 09:36:19 -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=TImaXZSv; 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 S232685AbhFUQhT (ORCPT + 99 others); Mon, 21 Jun 2021 12:37:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:56052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230523AbhFUQdP (ORCPT ); Mon, 21 Jun 2021 12:33:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0AF0A613AB; Mon, 21 Jun 2021 16:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292788; bh=ZmBsgYaBDJJZ0nqR6o6ov7kMvQNR/6mp+S1VwQX1d0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TImaXZSvbgx3O1ngI7CH2GQMp7VicY7ylYgPYOShcZgpG03O/iL62Qbf/ZfbRiZo7 LMdw8SJczkoXR6GpWNN0N4WHLbj0xS0j7r7Wkgrnkc2aIAfe6cvaeFoB9o/CJbLMvt dIbDyRnbLbC8u55e06xTuTYCeCNYi2CK/2E0fm9I= 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.10 131/146] drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue. Date: Mon, 21 Jun 2021 18:16:01 +0200 Message-Id: <20210621154919.846368677@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@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 @@ -3619,8 +3619,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,