drm/amdgpu: add nbio 6.1 register init function
Subsystems (2)
PATCH 1/2 drm/amdgpu: add nbio 6.1 register init function
Used for nbio registers that need to be initialized. Currently only used for a golden setting that got missed on some boards.
--- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h | 1 + 2 files changed, 14 insertions(+)
drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +13 -0
@@ -32,6 +32,7 @@#define smnCPM_CONTROL 0x11180460#define smnPCIE_CNTL2 0x11180070 +#define smnPCIE_CONFIG_CNTL 0x11180044u32 nbio_v6_1_get_rev_id (struct amdgpu_device *adev) {
@@ -256,3 +257,15 @@ void nbio_v6_1_detect_hw_virt(struct amdgpu_device *adev) adev->virt.caps |=AMDGPU_PASSTHROUGH_MODE ; } } + +void nbio_v6_1_init_registers (struct amdgpu_device *adev) +{ +uint32_t def, data; + + def = data =RREG32_PCIE (smnPCIE_CONFIG_CNTL); + data =REG_SET_FIELD (data,PCIE_CONFIG_CNTL ,CI_SWUS_MAX_READ_REQUEST_SIZE_MODE ,1 ); + data =REG_SET_FIELD (data,PCIE_CONFIG_CNTL ,CI_SWUS_MAX_READ_REQUEST_SIZE_PRIV ,1 ); + +if (def != data) +WREG32_PCIE (smnPCIE_CONFIG_CNTL, data); +}
drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h +1 -0
@@ -50,5 +50,6 @@ void nbio_v6_1_update_medium_grain_clock_gating(struct amdgpu_device *adev, boolvoid nbio_v6_1_update_medium_grain_light_sleep (struct amdgpu_device *adev,bool enable);void nbio_v6_1_get_clockgating_state (struct amdgpu_device *adev,u32 *flags);void nbio_v6_1_detect_hw_virt (struct amdgpu_device *adev); +void nbio_v6_1_init_registers (struct amdgpu_device *adev);#endif
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1499363167-28331-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amdgpu/soc15: init nbio registers for vega10
Call nbio init registers on hw_init to set up any nbio registers that need initialization at hw init time.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +3 -0
@@ -691,6 +691,9 @@ static int soc15_common_hw_init(void *handle)soc15_pcie_gen3_enable (adev);/* enable aspm */ soc15_program_aspm (adev); +/* setup nbio registers */ +if (!(adev->flags &AMD_IS_APU )) +nbio_v6_1_init_registers (adev);/* enable the doorbell aperture */ soc15_enable_doorbell_aperture (adev, true);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
Acked-byAm 06.07.2017 um 19:46 schrieb Alex Deucher:
Quoted 4 lines
Used for nbio registers that need to be initialized. Currently only used for a golden setting that got missed on some boards.
Signed-off-by Alex Deucher <[email protected]>
Quoted 38 lines
--- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h | 1 + 2 files changed, 14 insertions(+)drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +13
-0@@ -32,6 +32,7 @@#define smnCPM_CONTROL 0x11180460#define smnPCIE_CNTL2 0x11180070 +#define smnPCIE_CONFIG_CNTL 0x11180044u32 nbio_v6_1_get_rev_id (struct amdgpu_device *adev) {@@ -256,3 +257,15 @@ void nbio_v6_1_detect_hw_virt(struct amdgpu_device *adev) adev->virt.caps |=AMDGPU_PASSTHROUGH_MODE ; } } + +void nbio_v6_1_init_registers (struct amdgpu_device *adev) +{ +uint32_t def, data; + + def = data =RREG32_PCIE (smnPCIE_CONFIG_CNTL); + data =REG_SET_FIELD (data,PCIE_CONFIG_CNTL ,CI_SWUS_MAX_READ_REQUEST_SIZE_MODE ,1 ); + data =REG_SET_FIELD (data,PCIE_CONFIG_CNTL ,CI_SWUS_MAX_READ_REQUEST_SIZE_PRIV ,1 ); + +if (def != data) +WREG32_PCIE (smnPCIE_CONFIG_CNTL, data); +}drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h +0
-0
drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h void nbio_v6_1_update_medium_grain_clock_gating(struct amdgpu_device *adev, bool · line 55
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h +1
-0@@ -50,5 +50,6 @@ void nbio_v6_1_update_medium_grain_clock_gating(struct amdgpu_device *adev, boolvoid nbio_v6_1_update_medium_grain_light_sleep (struct amdgpu_device *adev,bool enable);void nbio_v6_1_get_clockgating_state (struct amdgpu_device *adev,u32 *flags);void nbio_v6_1_detect_hw_virt (struct amdgpu_device *adev); +void nbio_v6_1_init_registers (struct amdgpu_device *adev);#endif
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx