From nobody Tue Dec 16 04:37:56 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD7FBC07E9D for ; Mon, 26 Sep 2022 12:02:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239108AbiIZMCB (ORCPT ); Mon, 26 Sep 2022 08:02:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239254AbiIZL6h (ORCPT ); Mon, 26 Sep 2022 07:58:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E587B7B286; Mon, 26 Sep 2022 03:52:07 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 2E084B80185; Mon, 26 Sep 2022 10:50:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7EC71C433D6; Mon, 26 Sep 2022 10:50:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664189410; bh=OJR+Kvk3y51iZ6Yjl4qfoMm5F58M8vlAqHec4fKuqLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tqFQlgzWbdv/AIYtolb0yAr8OafU+29c7LC4g0JUyYFRky1gku9GtK9mT4KaYA0nf voM8Yh+V8VQ3asvp92yxIittY9Z9FDTfxUhGsRtI3wbJ94EHIGp1h6dmmdS+e6c4V/ 3OoJQyb2xFsdFQIFgqfnFrebddWpZkNVeSpLeLwA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lijo Lazar , Alex Deucher , Sasha Levin Subject: [PATCH 5.19 179/207] drm/amdgpu: add HDP remap functionality to nbio 7.7 Date: Mon, 26 Sep 2022 12:12:48 +0200 Message-Id: <20220926100814.634068640@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100806.522017616@linuxfoundation.org> References: <20220926100806.522017616@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alex Deucher [ Upstream commit 8c5708d3da37b8c7c3c22c7e945b9a76a7c9539b ] Was missing before and would have resulted in a write to a non-existant register. Normally APUs don't use HDP, but other asics could use this code and APUs do use the HDP when used in passthrough. Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c b/drivers/gpu/drm/amd/a= mdgpu/nbio_v7_7.c index cdc0c9779848..6c1fd471a4c7 100644 --- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c @@ -28,6 +28,14 @@ #include "nbio/nbio_7_7_0_sh_mask.h" #include =20 +static void nbio_v7_7_remap_hdp_registers(struct amdgpu_device *adev) +{ + WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_MEM_FLUSH_CNTL, + adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL); + WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_REG_FLUSH_CNTL, + adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_REG_FLUSH_CNTL); +} + static u32 nbio_v7_7_get_rev_id(struct amdgpu_device *adev) { u32 tmp; @@ -237,4 +245,5 @@ const struct amdgpu_nbio_funcs nbio_v7_7_funcs =3D { .ih_doorbell_range =3D nbio_v7_7_ih_doorbell_range, .ih_control =3D nbio_v7_7_ih_control, .init_registers =3D nbio_v7_7_init_registers, + .remap_hdp_registers =3D nbio_v7_7_remap_hdp_registers, }; --=20 2.35.1