drm/amdgpu: avoid to use SOC15_REG_OFFSET in static array for navi10
authorHawking Zhang <Hawking.Zhang@amd.com>
Fri, 10 May 2019 16:05:13 +0000 (11:05 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Jun 2019 23:59:23 +0000 (18:59 -0500)
Move to the header file.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/soc15.c
drivers/gpu/drm/amd/amdgpu/soc15.h

index 70815f6626ab9fe76a1bf5d94ffa7044aa096b3b..4eb615d6dc8420e6092467d8ba93f43253e84e8b 100644 (file)
@@ -274,15 +274,6 @@ static bool soc15_read_bios_from_rom(struct amdgpu_device *adev,
        return true;
 }
 
-struct soc15_allowed_register_entry {
-       uint32_t hwip;
-       uint32_t inst;
-       uint32_t seg;
-       uint32_t reg_offset;
-       bool grbm_indexed;
-};
-
-
 static struct soc15_allowed_register_entry soc15_allowed_read_registers[] = {
        { SOC15_REG_ENTRY(GC, 0, mmGRBM_STATUS)},
        { SOC15_REG_ENTRY(GC, 0, mmGRBM_STATUS2)},
index 48e824d52ad995914db9fdeb352d85d2ead3c27b..7a6b2cc6d9f50ef58849345b47f45666b5b43223 100644 (file)
@@ -52,6 +52,14 @@ struct soc15_reg_entry {
        uint32_t instance;
 };
 
+struct soc15_allowed_register_entry {
+       uint32_t hwip;
+       uint32_t inst;
+       uint32_t seg;
+       uint32_t reg_offset;
+       bool grbm_indexed;
+};
+
 #define SOC15_REG_ENTRY(ip, inst, reg) ip##_HWIP, inst, reg##_BASE_IDX, reg
 
 #define SOC15_REG_ENTRY_OFFSET(entry)  (adev->reg_offset[entry.hwip][entry.inst][entry.seg] + entry.reg_offset)