From: Alexandre Demers <alexandre.f.demers@gmail.com>
To: amd-gfx@lists.freedesktop.org
Subject: [PATCH 02/18] drm/amdgpu: wire up defines, shifts and masks through SI code
Date: Fri, 21 Mar 2025 21:46:44 -0400 [thread overview]
Message-ID: <20250322014700.62356-3-alexandre.f.demers@gmail.com> (raw)
In-Reply-To: <20250322014700.62356-1-alexandre.f.demers@gmail.com>
To be able to remove as much duplicated defines, the different files
containing definitions, shifts and masks must be properly included.
Once done, the code will be migrated where needed to shifts and masks and
proper defines, before removing useless defines in the end.
Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/si.c | 18 ++++++++++++++++--
drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 ++
drivers/gpu/drm/amd/amdgpu/si_ih.c | 1 +
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 20 ++++++++++++++++++--
drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 6 ++++++
5 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c
index a18b3ece635b..75d3b7471c68 100644
--- a/drivers/gpu/drm/amd/amdgpu/si.c
+++ b/drivers/gpu/drm/amd/amdgpu/si.c
@@ -35,6 +35,7 @@
#include "amdgpu_vce.h"
#include "atom.h"
#include "amd_pcie.h"
+
#include "si_dpm.h"
#include "sid.h"
#include "si_ih.h"
@@ -44,17 +45,30 @@
#include "dce_v6_0.h"
#include "si.h"
#include "uvd_v3_1.h"
-#include "amdgpu_vkms.h"
+
+#include "uvd/uvd_4_0_d.h"
+
+#include "smu/smu_6_0_d.h"
+#include "smu/smu_6_0_sh_mask.h"
+
#include "gca/gfx_6_0_d.h"
+#include "gca/gfx_6_0_sh_mask.h"
+
#include "oss/oss_1_0_d.h"
#include "oss/oss_1_0_sh_mask.h"
+
#include "gmc/gmc_6_0_d.h"
+#include"gmc/gmc_6_0_sh_mask.h"
+
#include "dce/dce_6_0_d.h"
-#include "uvd/uvd_4_0_d.h"
+#include "dce/dce_6_0_sh_mask.h"
+
#include "bif/bif_3_0_d.h"
#include "bif/bif_3_0_sh_mask.h"
+#include "si_enums.h"
#include "amdgpu_dm.h"
+#include "amdgpu_vkms.h"
static const u32 tahiti_golden_registers[] =
{
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c
index 47647a6083e8..3c9b4fb25855 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dma.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c
@@ -27,6 +27,8 @@
#include "si.h"
#include "sid.h"
+#include "oss/oss_1_0_d.h"
+#include "oss/oss_1_0_sh_mask.h"
const u32 sdma_offsets[SDMA_MAX_INSTANCE] =
{
DMA0_REGISTER_OFFSET,
diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c b/drivers/gpu/drm/amd/amdgpu/si_ih.c
index 2ec1ebe4db11..94468c87122a 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_ih.c
@@ -27,6 +27,7 @@
#include "amdgpu_ih.h"
#include "sid.h"
#include "si_ih.h"
+
#include "oss/oss_1_0_d.h"
#include "oss/oss_1_0_sh_mask.h"
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
index ee23a0f897c5..975912f285d7 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
@@ -30,16 +30,32 @@
#include "amdgpu_atombios.h"
#include "amdgpu_dpm_internal.h"
#include "amd_pcie.h"
-#include "sid.h"
+#include "atom.h"
+#include "gfx_v6_0.h"
#include "r600_dpm.h"
+#include "sid.h"
#include "si_dpm.h"
-#include "atom.h"
#include "../include/pptable.h"
#include <linux/math64.h>
#include <linux/seq_file.h>
#include <linux/firmware.h>
#include <legacy_dpm.h>
+#include "bif/bif_3_0_d.h"
+#include "bif/bif_3_0_sh_mask.h"
+
+#include "dce/dce_6_0_d.h"
+#include "dce/dce_6_0_sh_mask.h"
+
+#include "gca/gfx_6_0_d.h"
+#include "gca/gfx_6_0_sh_mask.h"
+
+#include"gmc/gmc_6_0_d.h"
+#include"gmc/gmc_6_0_sh_mask.h"
+
+#include "smu/smu_6_0_d.h"
+#include "smu/smu_6_0_sh_mask.h"
+
#define MC_CG_ARB_FREQ_F0 0x0a
#define MC_CG_ARB_FREQ_F1 0x0b
#define MC_CG_ARB_FREQ_F2 0x0c
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c
index 8f994ffa9cd1..c712899c44ca 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c
@@ -30,6 +30,12 @@
#include "amdgpu_ucode.h"
#include "sislands_smc.h"
+#include "smu/smu_6_0_d.h"
+#include "smu/smu_6_0_sh_mask.h"
+
+#include "gca/gfx_6_0_d.h"
+#include "gca/gfx_6_0_sh_mask.h"
+
static int si_set_smc_sram_address(struct amdgpu_device *adev,
u32 smc_address, u32 limit)
{
--
2.48.1
next prev parent reply other threads:[~2025-03-22 1:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-22 1:46 [PATCH 00/18] Properly wire defines, shifts and masks in SI and cleanup Alexandre Demers
2025-03-22 1:46 ` [PATCH 01/18] drm/amdgpu: move GFX6 defines into gfx_v6_0.c Alexandre Demers
2025-03-22 1:46 ` Alexandre Demers [this message]
2025-03-22 1:46 ` [PATCH 03/18] drm/amdgpu: use proper defines, shifts and masks in DCE6 code Alexandre Demers
2025-03-22 1:46 ` [PATCH 04/18] drm/amdgpu: remove PACKET3 duplicated defines from si_enums.h Alexandre Demers
2025-03-22 1:46 ` [PATCH 05/18] drm/admgpu: move si_ih.c away from sid.h defines Alexandre Demers
2025-03-22 1:46 ` [PATCH 06/18] drm/amdgpu: use GRPH_SECONDARY_SURFACE_ADDRESS_MASK with GRPH_SECONDARY_SURFACE_ADDRESS in DCE6 Alexandre Demers
2025-03-22 1:46 ` [PATCH 07/18] drm/amdgpu: move DCE6 away from sid.h and si_enums.h defines Alexandre Demers
2025-03-22 1:46 ` [PATCH 08/18] drm/amdgpu: add missing DMA defines, shifts and masks Alexandre Demers
2025-03-22 1:46 ` [PATCH 09/18] drm/amdgpu: add missing GFX6 defines Alexandre Demers
2025-03-22 1:46 ` [PATCH 10/18] drm/amdgpu: add missing SMU6 defines, shifts and masks Alexandre Demers
2025-03-24 19:03 ` Alex Deucher
2025-03-27 4:21 ` Alexandre Demers
2025-03-22 1:46 ` [PATCH 11/18] drm/pm/legacy-dpm: move SI away from sid.h and si_enums.h Alexandre Demers
2025-03-22 1:46 ` [PATCH 12/18] drm/amdgpu: make GFX6 easier to read Alexandre Demers
2025-03-22 1:46 ` [PATCH 13/18] drm/amdgpu: move si.c away from sid.h Alexandre Demers
2025-03-22 1:46 ` [PATCH 14/18] drm/amdgpu: move si_dma.c away from sid.h and si_enums.h Alexandre Demers
2025-03-22 1:46 ` [PATCH 15/18] drm/amdgpu: huge sid.h cleanup, drop substituted defines Alexandre Demers
2025-03-22 1:46 ` [PATCH 16/18] drm/amdgpu: keep removing sid.h dependency from si_dma.c Alexandre Demers
2025-03-22 1:46 ` [PATCH 17/18] drm/amdgpu: cleanup DCE6 a bit more Alexandre Demers
2025-03-22 1:47 ` [PATCH 18/18] drm/amdgpu: continue cleaning up sid.h and si_enums.h Alexandre Demers
2025-03-22 16:16 ` [PATCH v2 00/18] Properly wire defines, shifts and masks in SI and cleanup Alexandre Demers
2025-03-24 19:26 ` [PATCH " Alex Deucher
-- strict thread matches above, loose matches on Subject: below --
2025-03-17 6:06 Alexandre Demers
2025-03-17 6:06 ` [PATCH 02/18] drm/amdgpu: wire up defines, shifts and masks through SI code Alexandre Demers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250322014700.62356-3-alexandre.f.demers@gmail.com \
--to=alexandre.f.demers@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox