Commit c47b41a7 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: remove nonsense const u32 cast on ARRAY_SIZE result

Not sure what that should originally been good for, but it doesn't seem
to make any sense any more.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6f16b4fb
...@@ -757,72 +757,72 @@ static void cik_init_golden_registers(struct amdgpu_device *adev) ...@@ -757,72 +757,72 @@ static void cik_init_golden_registers(struct amdgpu_device *adev)
case CHIP_BONAIRE: case CHIP_BONAIRE:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
bonaire_mgcg_cgcg_init, bonaire_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(bonaire_mgcg_cgcg_init)); ARRAY_SIZE(bonaire_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
bonaire_golden_registers, bonaire_golden_registers,
(const u32)ARRAY_SIZE(bonaire_golden_registers)); ARRAY_SIZE(bonaire_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
bonaire_golden_common_registers, bonaire_golden_common_registers,
(const u32)ARRAY_SIZE(bonaire_golden_common_registers)); ARRAY_SIZE(bonaire_golden_common_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
bonaire_golden_spm_registers, bonaire_golden_spm_registers,
(const u32)ARRAY_SIZE(bonaire_golden_spm_registers)); ARRAY_SIZE(bonaire_golden_spm_registers));
break; break;
case CHIP_KABINI: case CHIP_KABINI:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
kalindi_mgcg_cgcg_init, kalindi_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(kalindi_mgcg_cgcg_init)); ARRAY_SIZE(kalindi_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
kalindi_golden_registers, kalindi_golden_registers,
(const u32)ARRAY_SIZE(kalindi_golden_registers)); ARRAY_SIZE(kalindi_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
kalindi_golden_common_registers, kalindi_golden_common_registers,
(const u32)ARRAY_SIZE(kalindi_golden_common_registers)); ARRAY_SIZE(kalindi_golden_common_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
kalindi_golden_spm_registers, kalindi_golden_spm_registers,
(const u32)ARRAY_SIZE(kalindi_golden_spm_registers)); ARRAY_SIZE(kalindi_golden_spm_registers));
break; break;
case CHIP_MULLINS: case CHIP_MULLINS:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
kalindi_mgcg_cgcg_init, kalindi_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(kalindi_mgcg_cgcg_init)); ARRAY_SIZE(kalindi_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
godavari_golden_registers, godavari_golden_registers,
(const u32)ARRAY_SIZE(godavari_golden_registers)); ARRAY_SIZE(godavari_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
kalindi_golden_common_registers, kalindi_golden_common_registers,
(const u32)ARRAY_SIZE(kalindi_golden_common_registers)); ARRAY_SIZE(kalindi_golden_common_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
kalindi_golden_spm_registers, kalindi_golden_spm_registers,
(const u32)ARRAY_SIZE(kalindi_golden_spm_registers)); ARRAY_SIZE(kalindi_golden_spm_registers));
break; break;
case CHIP_KAVERI: case CHIP_KAVERI:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
spectre_mgcg_cgcg_init, spectre_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(spectre_mgcg_cgcg_init)); ARRAY_SIZE(spectre_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
spectre_golden_registers, spectre_golden_registers,
(const u32)ARRAY_SIZE(spectre_golden_registers)); ARRAY_SIZE(spectre_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
spectre_golden_common_registers, spectre_golden_common_registers,
(const u32)ARRAY_SIZE(spectre_golden_common_registers)); ARRAY_SIZE(spectre_golden_common_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
spectre_golden_spm_registers, spectre_golden_spm_registers,
(const u32)ARRAY_SIZE(spectre_golden_spm_registers)); ARRAY_SIZE(spectre_golden_spm_registers));
break; break;
case CHIP_HAWAII: case CHIP_HAWAII:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
hawaii_mgcg_cgcg_init, hawaii_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(hawaii_mgcg_cgcg_init)); ARRAY_SIZE(hawaii_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
hawaii_golden_registers, hawaii_golden_registers,
(const u32)ARRAY_SIZE(hawaii_golden_registers)); ARRAY_SIZE(hawaii_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
hawaii_golden_common_registers, hawaii_golden_common_registers,
(const u32)ARRAY_SIZE(hawaii_golden_common_registers)); ARRAY_SIZE(hawaii_golden_common_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
hawaii_golden_spm_registers, hawaii_golden_spm_registers,
(const u32)ARRAY_SIZE(hawaii_golden_spm_registers)); ARRAY_SIZE(hawaii_golden_spm_registers));
break; break;
default: default:
break; break;
......
...@@ -147,18 +147,18 @@ static void dce_v10_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -147,18 +147,18 @@ static void dce_v10_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_FIJI: case CHIP_FIJI:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
fiji_mgcg_cgcg_init, fiji_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(fiji_mgcg_cgcg_init)); ARRAY_SIZE(fiji_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_fiji_a10, golden_settings_fiji_a10,
(const u32)ARRAY_SIZE(golden_settings_fiji_a10)); ARRAY_SIZE(golden_settings_fiji_a10));
break; break;
case CHIP_TONGA: case CHIP_TONGA:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tonga_mgcg_cgcg_init, tonga_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(tonga_mgcg_cgcg_init)); ARRAY_SIZE(tonga_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_tonga_a11, golden_settings_tonga_a11,
(const u32)ARRAY_SIZE(golden_settings_tonga_a11)); ARRAY_SIZE(golden_settings_tonga_a11));
break; break;
default: default:
break; break;
......
...@@ -156,26 +156,26 @@ static void dce_v11_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -156,26 +156,26 @@ static void dce_v11_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_CARRIZO: case CHIP_CARRIZO:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
cz_mgcg_cgcg_init, cz_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(cz_mgcg_cgcg_init)); ARRAY_SIZE(cz_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
cz_golden_settings_a11, cz_golden_settings_a11,
(const u32)ARRAY_SIZE(cz_golden_settings_a11)); ARRAY_SIZE(cz_golden_settings_a11));
break; break;
case CHIP_STONEY: case CHIP_STONEY:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
stoney_golden_settings_a11, stoney_golden_settings_a11,
(const u32)ARRAY_SIZE(stoney_golden_settings_a11)); ARRAY_SIZE(stoney_golden_settings_a11));
break; break;
case CHIP_POLARIS11: case CHIP_POLARIS11:
case CHIP_POLARIS12: case CHIP_POLARIS12:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
polaris11_golden_settings_a11, polaris11_golden_settings_a11,
(const u32)ARRAY_SIZE(polaris11_golden_settings_a11)); ARRAY_SIZE(polaris11_golden_settings_a11));
break; break;
case CHIP_POLARIS10: case CHIP_POLARIS10:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
polaris10_golden_settings_a11, polaris10_golden_settings_a11,
(const u32)ARRAY_SIZE(polaris10_golden_settings_a11)); ARRAY_SIZE(polaris10_golden_settings_a11));
break; break;
default: default:
break; break;
......
...@@ -681,53 +681,53 @@ static void gfx_v8_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -681,53 +681,53 @@ static void gfx_v8_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_TOPAZ: case CHIP_TOPAZ:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
iceland_mgcg_cgcg_init, iceland_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(iceland_mgcg_cgcg_init)); ARRAY_SIZE(iceland_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_iceland_a11, golden_settings_iceland_a11,
(const u32)ARRAY_SIZE(golden_settings_iceland_a11)); ARRAY_SIZE(golden_settings_iceland_a11));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
iceland_golden_common_all, iceland_golden_common_all,
(const u32)ARRAY_SIZE(iceland_golden_common_all)); ARRAY_SIZE(iceland_golden_common_all));
break; break;
case CHIP_FIJI: case CHIP_FIJI:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
fiji_mgcg_cgcg_init, fiji_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(fiji_mgcg_cgcg_init)); ARRAY_SIZE(fiji_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_fiji_a10, golden_settings_fiji_a10,
(const u32)ARRAY_SIZE(golden_settings_fiji_a10)); ARRAY_SIZE(golden_settings_fiji_a10));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
fiji_golden_common_all, fiji_golden_common_all,
(const u32)ARRAY_SIZE(fiji_golden_common_all)); ARRAY_SIZE(fiji_golden_common_all));
break; break;
case CHIP_TONGA: case CHIP_TONGA:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tonga_mgcg_cgcg_init, tonga_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(tonga_mgcg_cgcg_init)); ARRAY_SIZE(tonga_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_tonga_a11, golden_settings_tonga_a11,
(const u32)ARRAY_SIZE(golden_settings_tonga_a11)); ARRAY_SIZE(golden_settings_tonga_a11));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tonga_golden_common_all, tonga_golden_common_all,
(const u32)ARRAY_SIZE(tonga_golden_common_all)); ARRAY_SIZE(tonga_golden_common_all));
break; break;
case CHIP_POLARIS11: case CHIP_POLARIS11:
case CHIP_POLARIS12: case CHIP_POLARIS12:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_polaris11_a11, golden_settings_polaris11_a11,
(const u32)ARRAY_SIZE(golden_settings_polaris11_a11)); ARRAY_SIZE(golden_settings_polaris11_a11));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
polaris11_golden_common_all, polaris11_golden_common_all,
(const u32)ARRAY_SIZE(polaris11_golden_common_all)); ARRAY_SIZE(polaris11_golden_common_all));
break; break;
case CHIP_POLARIS10: case CHIP_POLARIS10:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_polaris10_a11, golden_settings_polaris10_a11,
(const u32)ARRAY_SIZE(golden_settings_polaris10_a11)); ARRAY_SIZE(golden_settings_polaris10_a11));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
polaris10_golden_common_all, polaris10_golden_common_all,
(const u32)ARRAY_SIZE(polaris10_golden_common_all)); ARRAY_SIZE(polaris10_golden_common_all));
WREG32_SMC(ixCG_ACLK_CNTL, 0x0000001C); WREG32_SMC(ixCG_ACLK_CNTL, 0x0000001C);
if (adev->pdev->revision == 0xc7 && if (adev->pdev->revision == 0xc7 &&
((adev->pdev->subsystem_device == 0xb37 && adev->pdev->subsystem_vendor == 0x1002) || ((adev->pdev->subsystem_device == 0xb37 && adev->pdev->subsystem_vendor == 0x1002) ||
...@@ -740,24 +740,24 @@ static void gfx_v8_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -740,24 +740,24 @@ static void gfx_v8_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_CARRIZO: case CHIP_CARRIZO:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
cz_mgcg_cgcg_init, cz_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(cz_mgcg_cgcg_init)); ARRAY_SIZE(cz_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
cz_golden_settings_a11, cz_golden_settings_a11,
(const u32)ARRAY_SIZE(cz_golden_settings_a11)); ARRAY_SIZE(cz_golden_settings_a11));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
cz_golden_common_all, cz_golden_common_all,
(const u32)ARRAY_SIZE(cz_golden_common_all)); ARRAY_SIZE(cz_golden_common_all));
break; break;
case CHIP_STONEY: case CHIP_STONEY:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
stoney_mgcg_cgcg_init, stoney_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(stoney_mgcg_cgcg_init)); ARRAY_SIZE(stoney_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
stoney_golden_settings_a11, stoney_golden_settings_a11,
(const u32)ARRAY_SIZE(stoney_golden_settings_a11)); ARRAY_SIZE(stoney_golden_settings_a11));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
stoney_golden_common_all, stoney_golden_common_all,
(const u32)ARRAY_SIZE(stoney_golden_common_all)); ARRAY_SIZE(stoney_golden_common_all));
break; break;
default: default:
break; break;
......
...@@ -232,18 +232,18 @@ static void gfx_v9_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -232,18 +232,18 @@ static void gfx_v9_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_VEGA10: case CHIP_VEGA10:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_gc_9_0, golden_settings_gc_9_0,
(const u32)ARRAY_SIZE(golden_settings_gc_9_0)); ARRAY_SIZE(golden_settings_gc_9_0));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_gc_9_0_vg10, golden_settings_gc_9_0_vg10,
(const u32)ARRAY_SIZE(golden_settings_gc_9_0_vg10)); ARRAY_SIZE(golden_settings_gc_9_0_vg10));
break; break;
case CHIP_RAVEN: case CHIP_RAVEN:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_gc_9_1, golden_settings_gc_9_1,
(const u32)ARRAY_SIZE(golden_settings_gc_9_1)); ARRAY_SIZE(golden_settings_gc_9_1));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_gc_9_1_rv1, golden_settings_gc_9_1_rv1,
(const u32)ARRAY_SIZE(golden_settings_gc_9_1_rv1)); ARRAY_SIZE(golden_settings_gc_9_1_rv1));
break; break;
default: default:
break; break;
......
...@@ -69,10 +69,10 @@ static void gmc_v7_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -69,10 +69,10 @@ static void gmc_v7_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_TOPAZ: case CHIP_TOPAZ:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
iceland_mgcg_cgcg_init, iceland_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(iceland_mgcg_cgcg_init)); ARRAY_SIZE(iceland_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_iceland_a11, golden_settings_iceland_a11,
(const u32)ARRAY_SIZE(golden_settings_iceland_a11)); ARRAY_SIZE(golden_settings_iceland_a11));
break; break;
default: default:
break; break;
......
...@@ -122,42 +122,42 @@ static void gmc_v8_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -122,42 +122,42 @@ static void gmc_v8_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_FIJI: case CHIP_FIJI:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
fiji_mgcg_cgcg_init, fiji_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(fiji_mgcg_cgcg_init)); ARRAY_SIZE(fiji_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_fiji_a10, golden_settings_fiji_a10,
(const u32)ARRAY_SIZE(golden_settings_fiji_a10)); ARRAY_SIZE(golden_settings_fiji_a10));
break; break;
case CHIP_TONGA: case CHIP_TONGA:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tonga_mgcg_cgcg_init, tonga_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(tonga_mgcg_cgcg_init)); ARRAY_SIZE(tonga_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_tonga_a11, golden_settings_tonga_a11,
(const u32)ARRAY_SIZE(golden_settings_tonga_a11)); ARRAY_SIZE(golden_settings_tonga_a11));
break; break;
case CHIP_POLARIS11: case CHIP_POLARIS11:
case CHIP_POLARIS12: case CHIP_POLARIS12:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_polaris11_a11, golden_settings_polaris11_a11,
(const u32)ARRAY_SIZE(golden_settings_polaris11_a11)); ARRAY_SIZE(golden_settings_polaris11_a11));
break; break;
case CHIP_POLARIS10: case CHIP_POLARIS10:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_polaris10_a11, golden_settings_polaris10_a11,
(const u32)ARRAY_SIZE(golden_settings_polaris10_a11)); ARRAY_SIZE(golden_settings_polaris10_a11));
break; break;
case CHIP_CARRIZO: case CHIP_CARRIZO:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
cz_mgcg_cgcg_init, cz_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(cz_mgcg_cgcg_init)); ARRAY_SIZE(cz_mgcg_cgcg_init));
break; break;
case CHIP_STONEY: case CHIP_STONEY:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
stoney_mgcg_cgcg_init, stoney_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(stoney_mgcg_cgcg_init)); ARRAY_SIZE(stoney_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_stoney_common, golden_settings_stoney_common,
(const u32)ARRAY_SIZE(golden_settings_stoney_common)); ARRAY_SIZE(golden_settings_stoney_common));
break; break;
default: default:
break; break;
......
...@@ -696,15 +696,15 @@ static void gmc_v9_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -696,15 +696,15 @@ static void gmc_v9_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_VEGA10: case CHIP_VEGA10:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_mmhub_1_0_0, golden_settings_mmhub_1_0_0,
(const u32)ARRAY_SIZE(golden_settings_mmhub_1_0_0)); ARRAY_SIZE(golden_settings_mmhub_1_0_0));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_athub_1_0_0, golden_settings_athub_1_0_0,
(const u32)ARRAY_SIZE(golden_settings_athub_1_0_0)); ARRAY_SIZE(golden_settings_athub_1_0_0));
break; break;
case CHIP_RAVEN: case CHIP_RAVEN:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_athub_1_0_0, golden_settings_athub_1_0_0,
(const u32)ARRAY_SIZE(golden_settings_athub_1_0_0)); ARRAY_SIZE(golden_settings_athub_1_0_0));
break; break;
default: default:
break; break;
...@@ -724,7 +724,7 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) ...@@ -724,7 +724,7 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev)
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_vega10_hdp, golden_settings_vega10_hdp,
(const u32)ARRAY_SIZE(golden_settings_vega10_hdp)); ARRAY_SIZE(golden_settings_vega10_hdp));
if (adev->gart.robj == NULL) { if (adev->gart.robj == NULL) {
dev_err(adev->dev, "No VRAM object for PCIE GART.\n"); dev_err(adev->dev, "No VRAM object for PCIE GART.\n");
......
...@@ -281,29 +281,29 @@ void xgpu_vi_init_golden_registers(struct amdgpu_device *adev) ...@@ -281,29 +281,29 @@ void xgpu_vi_init_golden_registers(struct amdgpu_device *adev)
case CHIP_FIJI: case CHIP_FIJI:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
xgpu_fiji_mgcg_cgcg_init, xgpu_fiji_mgcg_cgcg_init,
(const u32)ARRAY_SIZE( ARRAY_SIZE(
xgpu_fiji_mgcg_cgcg_init)); xgpu_fiji_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
xgpu_fiji_golden_settings_a10, xgpu_fiji_golden_settings_a10,
(const u32)ARRAY_SIZE( ARRAY_SIZE(
xgpu_fiji_golden_settings_a10)); xgpu_fiji_golden_settings_a10));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
xgpu_fiji_golden_common_all, xgpu_fiji_golden_common_all,
(const u32)ARRAY_SIZE( ARRAY_SIZE(
xgpu_fiji_golden_common_all)); xgpu_fiji_golden_common_all));
break; break;
case CHIP_TONGA: case CHIP_TONGA:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
xgpu_tonga_mgcg_cgcg_init, xgpu_tonga_mgcg_cgcg_init,
(const u32)ARRAY_SIZE( ARRAY_SIZE(
xgpu_tonga_mgcg_cgcg_init)); xgpu_tonga_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
xgpu_tonga_golden_settings_a11, xgpu_tonga_golden_settings_a11,
(const u32)ARRAY_SIZE( ARRAY_SIZE(
xgpu_tonga_golden_settings_a11)); xgpu_tonga_golden_settings_a11));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
xgpu_tonga_golden_common_all, xgpu_tonga_golden_common_all,
(const u32)ARRAY_SIZE( ARRAY_SIZE(
xgpu_tonga_golden_common_all)); xgpu_tonga_golden_common_all));
break; break;
default: default:
......
...@@ -95,10 +95,10 @@ static void sdma_v2_4_init_golden_registers(struct amdgpu_device *adev) ...@@ -95,10 +95,10 @@ static void sdma_v2_4_init_golden_registers(struct amdgpu_device *adev)
case CHIP_TOPAZ: case CHIP_TOPAZ:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
iceland_mgcg_cgcg_init, iceland_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(iceland_mgcg_cgcg_init)); ARRAY_SIZE(iceland_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_iceland_a11, golden_settings_iceland_a11,
(const u32)ARRAY_SIZE(golden_settings_iceland_a11)); ARRAY_SIZE(golden_settings_iceland_a11));
break; break;
default: default:
break; break;
......
...@@ -194,45 +194,45 @@ static void sdma_v3_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -194,45 +194,45 @@ static void sdma_v3_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_FIJI: case CHIP_FIJI:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
fiji_mgcg_cgcg_init, fiji_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(fiji_mgcg_cgcg_init)); ARRAY_SIZE(fiji_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_fiji_a10, golden_settings_fiji_a10,
(const u32)ARRAY_SIZE(golden_settings_fiji_a10)); ARRAY_SIZE(golden_settings_fiji_a10));
break; break;
case CHIP_TONGA: case CHIP_TONGA:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tonga_mgcg_cgcg_init, tonga_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(tonga_mgcg_cgcg_init)); ARRAY_SIZE(tonga_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_tonga_a11, golden_settings_tonga_a11,
(const u32)ARRAY_SIZE(golden_settings_tonga_a11)); ARRAY_SIZE(golden_settings_tonga_a11));
break; break;
case CHIP_POLARIS11: case CHIP_POLARIS11:
case CHIP_POLARIS12: case CHIP_POLARIS12:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_polaris11_a11, golden_settings_polaris11_a11,
(const u32)ARRAY_SIZE(golden_settings_polaris11_a11)); ARRAY_SIZE(golden_settings_polaris11_a11));
break; break;
case CHIP_POLARIS10: case CHIP_POLARIS10:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_polaris10_a11, golden_settings_polaris10_a11,
(const u32)ARRAY_SIZE(golden_settings_polaris10_a11)); ARRAY_SIZE(golden_settings_polaris10_a11));
break; break;
case CHIP_CARRIZO: case CHIP_CARRIZO:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
cz_mgcg_cgcg_init, cz_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(cz_mgcg_cgcg_init)); ARRAY_SIZE(cz_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
cz_golden_settings_a11, cz_golden_settings_a11,
(const u32)ARRAY_SIZE(cz_golden_settings_a11)); ARRAY_SIZE(cz_golden_settings_a11));
break; break;
case CHIP_STONEY: case CHIP_STONEY:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
stoney_mgcg_cgcg_init, stoney_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(stoney_mgcg_cgcg_init)); ARRAY_SIZE(stoney_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
stoney_golden_settings_a11, stoney_golden_settings_a11,
(const u32)ARRAY_SIZE(stoney_golden_settings_a11)); ARRAY_SIZE(stoney_golden_settings_a11));
break; break;
default: default:
break; break;
......
...@@ -132,18 +132,18 @@ static void sdma_v4_0_init_golden_registers(struct amdgpu_device *adev) ...@@ -132,18 +132,18 @@ static void sdma_v4_0_init_golden_registers(struct amdgpu_device *adev)
case CHIP_VEGA10: case CHIP_VEGA10:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_sdma_4, golden_settings_sdma_4,
(const u32)ARRAY_SIZE(golden_settings_sdma_4)); ARRAY_SIZE(golden_settings_sdma_4));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_sdma_vg10, golden_settings_sdma_vg10,
(const u32)ARRAY_SIZE(golden_settings_sdma_vg10)); ARRAY_SIZE(golden_settings_sdma_vg10));
break; break;
case CHIP_RAVEN: case CHIP_RAVEN:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_sdma_4_1, golden_settings_sdma_4_1,
(const u32)ARRAY_SIZE(golden_settings_sdma_4_1)); ARRAY_SIZE(golden_settings_sdma_4_1));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
golden_settings_sdma_rv1, golden_settings_sdma_rv1,
(const u32)ARRAY_SIZE(golden_settings_sdma_rv1)); ARRAY_SIZE(golden_settings_sdma_rv1));
break; break;
default: default:
break; break;
......
...@@ -1392,63 +1392,63 @@ static void si_init_golden_registers(struct amdgpu_device *adev) ...@@ -1392,63 +1392,63 @@ static void si_init_golden_registers(struct amdgpu_device *adev)
case CHIP_TAHITI: case CHIP_TAHITI:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tahiti_golden_registers, tahiti_golden_registers,
(const u32)ARRAY_SIZE(tahiti_golden_registers)); ARRAY_SIZE(tahiti_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tahiti_golden_rlc_registers, tahiti_golden_rlc_registers,
(const u32)ARRAY_SIZE(tahiti_golden_rlc_registers)); ARRAY_SIZE(tahiti_golden_rlc_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tahiti_mgcg_cgcg_init, tahiti_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(tahiti_mgcg_cgcg_init)); ARRAY_SIZE(tahiti_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tahiti_golden_registers2, tahiti_golden_registers2,
(const u32)ARRAY_SIZE(tahiti_golden_registers2)); ARRAY_SIZE(tahiti_golden_registers2));
break; break;
case CHIP_PITCAIRN: case CHIP_PITCAIRN:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
pitcairn_golden_registers, pitcairn_golden_registers,
(const u32)ARRAY_SIZE(pitcairn_golden_registers)); ARRAY_SIZE(pitcairn_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
pitcairn_golden_rlc_registers, pitcairn_golden_rlc_registers,
(const u32)ARRAY_SIZE(pitcairn_golden_rlc_registers)); ARRAY_SIZE(pitcairn_golden_rlc_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
pitcairn_mgcg_cgcg_init, pitcairn_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(pitcairn_mgcg_cgcg_init)); ARRAY_SIZE(pitcairn_mgcg_cgcg_init));
break; break;
case CHIP_VERDE: case CHIP_VERDE:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
verde_golden_registers, verde_golden_registers,
(const u32)ARRAY_SIZE(verde_golden_registers)); ARRAY_SIZE(verde_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
verde_golden_rlc_registers, verde_golden_rlc_registers,
(const u32)ARRAY_SIZE(verde_golden_rlc_registers)); ARRAY_SIZE(verde_golden_rlc_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
verde_mgcg_cgcg_init, verde_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(verde_mgcg_cgcg_init)); ARRAY_SIZE(verde_mgcg_cgcg_init));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
verde_pg_init, verde_pg_init,
(const u32)ARRAY_SIZE(verde_pg_init)); ARRAY_SIZE(verde_pg_init));
break; break;
case CHIP_OLAND: case CHIP_OLAND:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
oland_golden_registers, oland_golden_registers,
(const u32)ARRAY_SIZE(oland_golden_registers)); ARRAY_SIZE(oland_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
oland_golden_rlc_registers, oland_golden_rlc_registers,
(const u32)ARRAY_SIZE(oland_golden_rlc_registers)); ARRAY_SIZE(oland_golden_rlc_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
oland_mgcg_cgcg_init, oland_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(oland_mgcg_cgcg_init)); ARRAY_SIZE(oland_mgcg_cgcg_init));
break; break;
case CHIP_HAINAN: case CHIP_HAINAN:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
hainan_golden_registers, hainan_golden_registers,
(const u32)ARRAY_SIZE(hainan_golden_registers)); ARRAY_SIZE(hainan_golden_registers));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
hainan_golden_registers2, hainan_golden_registers2,
(const u32)ARRAY_SIZE(hainan_golden_registers2)); ARRAY_SIZE(hainan_golden_registers2));
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
hainan_mgcg_cgcg_init, hainan_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(hainan_mgcg_cgcg_init)); ARRAY_SIZE(hainan_mgcg_cgcg_init));
break; break;
......
...@@ -265,12 +265,12 @@ static void soc15_init_golden_registers(struct amdgpu_device *adev) ...@@ -265,12 +265,12 @@ static void soc15_init_golden_registers(struct amdgpu_device *adev)
case CHIP_VEGA10: case CHIP_VEGA10:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
vega10_golden_init, vega10_golden_init,
(const u32)ARRAY_SIZE(vega10_golden_init)); ARRAY_SIZE(vega10_golden_init));
break; break;
case CHIP_RAVEN: case CHIP_RAVEN:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
raven_golden_init, raven_golden_init,
(const u32)ARRAY_SIZE(raven_golden_init)); ARRAY_SIZE(raven_golden_init));
break; break;
default: default:
break; break;
......
...@@ -284,27 +284,27 @@ static void vi_init_golden_registers(struct amdgpu_device *adev) ...@@ -284,27 +284,27 @@ static void vi_init_golden_registers(struct amdgpu_device *adev)
case CHIP_TOPAZ: case CHIP_TOPAZ:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
iceland_mgcg_cgcg_init, iceland_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(iceland_mgcg_cgcg_init)); ARRAY_SIZE(iceland_mgcg_cgcg_init));
break; break;
case CHIP_FIJI: case CHIP_FIJI:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
fiji_mgcg_cgcg_init, fiji_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(fiji_mgcg_cgcg_init)); ARRAY_SIZE(fiji_mgcg_cgcg_init));
break; break;
case CHIP_TONGA: case CHIP_TONGA:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
tonga_mgcg_cgcg_init, tonga_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(tonga_mgcg_cgcg_init)); ARRAY_SIZE(tonga_mgcg_cgcg_init));
break; break;
case CHIP_CARRIZO: case CHIP_CARRIZO:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
cz_mgcg_cgcg_init, cz_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(cz_mgcg_cgcg_init)); ARRAY_SIZE(cz_mgcg_cgcg_init));
break; break;
case CHIP_STONEY: case CHIP_STONEY:
amdgpu_program_register_sequence(adev, amdgpu_program_register_sequence(adev,
stoney_mgcg_cgcg_init, stoney_mgcg_cgcg_init,
(const u32)ARRAY_SIZE(stoney_mgcg_cgcg_init)); ARRAY_SIZE(stoney_mgcg_cgcg_init));
break; break;
case CHIP_POLARIS11: case CHIP_POLARIS11:
case CHIP_POLARIS10: case CHIP_POLARIS10:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment