Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92BCCC433FE for ; Sun, 2 Oct 2022 22:50:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8493510E13B; Sun, 2 Oct 2022 22:50:02 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 37F1C10E12C; Sun, 2 Oct 2022 22:49:59 +0000 (UTC) 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 A03D460EFE; Sun, 2 Oct 2022 22:49:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96A10C433C1; Sun, 2 Oct 2022 22:49:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664750998; bh=rmXLxzGf9Iaux4QL9qj05LHuT3qVQhmty6LBfQnYxuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DdWc+jMHU4z550os7ycmizdjNEebABGMKVgfiNcMJP6K7pd16SPQwXOjzzVddNF4e xaFhxDUPXgv2fi/u4Y9I8sQpA7nL6luUvATlA1iIMxTyUVmGIT1WdCEnzppTYeHg0/ ImDYKUwn3zpHIxF6cpL0rsQ/4IXjVkREwFVTmnSs5gM3I9HELJ6bm+f27dbEV0A8p3 Cs6mRf+mQdebrL4/zBV0aoO3WQXS4PrSACt5/iO3W6DlzSd6r5pzjlTTqLZPyLr2x0 9Kb5zMk0FEZTOGYIeHplMIG1NSPJJx5XNlpld6ihbrbjmqG0RBA8CB1qJpzM3s3hyE aQZ0ZdQ3jdMlw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.19 11/29] drm/amdgpu/mes: zero the sdma_hqd_mask of 2nd SDMA engine for SDMA 6.0.1 Date: Sun, 2 Oct 2022 18:49:04 -0400 Message-Id: <20221002224922.238837-11-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221002224922.238837-1-sashal@kernel.org> References: <20221002224922.238837-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , Yifan Zhang , Jack.Xiao@amd.com, Tim Huang , dri-devel@lists.freedesktop.org, Xinhui.Pan@amd.com, mukul.joshi@amd.com, le.ma@amd.com, amd-gfx@lists.freedesktop.org, daniel@ffwll.ch, Alex Deucher , airlied@gmail.com, christian.koenig@amd.com, Hawking.Zhang@amd.com Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" From: Yifan Zhang [ Upstream commit 0af4ed0c329ebb4cef95fda4fcdbfcdea0255442 ] there is only one SDMA engine in SDMA 6.0.1, the sdma_hqd_mask has to be zeroed for the 2nd engine, otherwise MES scheduler will consider 2nd engine exists and map/unmap SDMA queues to the non-existent engine. Signed-off-by: Yifan Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c index 69a70a0aaed9..6ab062c63da1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c @@ -169,6 +169,9 @@ int amdgpu_mes_init(struct amdgpu_device *adev) for (i = 0; i < AMDGPU_MES_MAX_SDMA_PIPES; i++) { if (adev->ip_versions[SDMA0_HWIP][0] < IP_VERSION(6, 0, 0)) adev->mes.sdma_hqd_mask[i] = i ? 0 : 0x3fc; + /* zero sdma_hqd_mask for non-existent engine */ + else if (adev->sdma.num_instances == 1) + adev->mes.sdma_hqd_mask[i] = i ? 0 : 0xfc; else adev->mes.sdma_hqd_mask[i] = 0xfc; } -- 2.35.1