drm/amdgpu: set ih chicken bit for IH 4.4.2
Subsystems (2)
Alex Deucher
maintainerPATCH 1/3 drm/amdgpu: set ih chicken bit for IH 4.4.2
From: Le Ma <[email protected]>
Share same register address with IH 4.4.0.
Signed-off-by Le Ma <[email protected]>
Reviewed-by Hawking Zhang <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vega20_ih.c +2 -1
@@ -321,7 +321,8 @@ static int vega20_ih_irq_init(struct amdgpu_device *adev)/* psp firmware won't program IH_CHICKEN for aldebaran * driver needs to program it properly according to * MC_SPACE type in IH_RB_CNTL */ -if (adev->ip_versions[OSSSYS_HWIP ][0 ] ==IP_VERSION (4 ,4 ,0 )) { +if ((adev->ip_versions[OSSSYS_HWIP ][0 ] ==IP_VERSION (4 ,4 ,0 )) || + (adev->ip_versions[OSSSYS_HWIP ][0 ] ==IP_VERSION (4 ,4 ,2 ))) { ih_chicken =RREG32_SOC15 (OSSSYS ,0 , mmIH_CHICKEN_ALDEBARAN);if (adev->irq.ih.use_bus_addr) { ih_chicken = REG_SET_FIELD(ih_chicken, IH_CHICKEN,
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 2/3 drm/amdgpu: skip ih2 rb allocation for IH 4.4.2
From: Le Ma <[email protected]>
No ih2 hardware on IH 4.4.2.
Signed-off-by Le Ma <[email protected]>
Reviewed-by Hawking Zhang <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/vega20_ih.c +7 -5
@@ -552,12 +552,14 @@ static int vega20_ih_sw_init(void *handle) adev->irq.ih1.use_doorbell = true; adev->irq.ih1.doorbell_index = (adev->doorbell_index.ih +1 ) <<1 ; - r =amdgpu_ih_ring_init (adev, &adev->irq.ih2,PAGE_SIZE , true); -if (r) -return r; +if (adev->ip_versions[OSSSYS_HWIP ][0 ] !=IP_VERSION (4 ,4 ,2 )) { + r =amdgpu_ih_ring_init (adev, &adev->irq.ih2,PAGE_SIZE , true); +if (r) +return r; - adev->irq.ih2.use_doorbell = true; - adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih +2 ) <<1 ; + adev->irq.ih2.use_doorbell = true; + adev->irq.ih2.doorbell_index = (adev->doorbell_index.ih +2 ) <<1 ; + }/* initialize ih control registers offset */ vega20_ih_init_register_offset (adev);
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 3/3 drm/amdgpu: add IH ip block for IH 4.4.2
In reply to Alex DeucherFrom: Hawking Zhang <[email protected]>
Add IH IP handling for IH 4.4.2
Signed-off-by Hawking Zhang <[email protected]>
Reviewed-by Le Ma <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
@@ -1583,6 +1583,7 @@ static int amdgpu_discovery_set_ih_ip_blocks(struct amdgpu_device *adev)case IP_VERSION (4 ,2 ,0 ):case IP_VERSION (4 ,2 ,1 ):case IP_VERSION (4 ,4 ,0 ): +case IP_VERSION (4 ,4 ,2 ):amdgpu_device_ip_block_add (adev, &vega20_ih_ip_block);break ;case IP_VERSION (5 ,0 ,0 ):
Signature · 1 line
2.39.2