All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Need to power up SDMA for #34 sdma firmware after do mode2 reset on Renoir
@ 2020-04-24 11:09 chen gong
  2020-04-24 13:53 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: chen gong @ 2020-04-24 11:09 UTC (permalink / raw)
  To: amd-gfx; +Cc: chen gong

[why]
Previously I found that powering up SDMA after mode2 reset can cause
ring-sdma0 test failed.
Perhaps the mode2 reset does not reset the SDMA PG state, so SDMA is
already powered up so there is no need to ask the SMU to power it up
again and doing so causes some other problem.
So I skipped function 'amdgpu_dpm_set_powergating_by_smu(adev,
AMD_IP_BLOCK_TYPE_SDMA, false)' with '!adev->in_gpu_reset'.

But now, for #34 sdma firmware, dmesg log show "ring-sdma0 test failed "
after the mode2 reset, and scan data show SDMA does not have power.
Then I re-enable function "amdgpu_dpm_set_powergating_by_smu(adev,
AMD_IP_BLOCK_TYPE_SDMA, false)" during mode2 reset, The result is issue
disappear.

Besides, I did more experiments base on previous sdma firmware for this
patch. Situation Normal.

[how]
Remove "!adev->in_gpu_reset"

Signed-off-by: chen gong <curry.gong@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index c0ca9a82..0ecab41 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -1914,7 +1914,7 @@ static int sdma_v4_0_hw_init(void *handle)
 
 	if ((adev->asic_type == CHIP_RAVEN && adev->powerplay.pp_funcs &&
 			adev->powerplay.pp_funcs->set_powergating_by_smu) ||
-			(adev->asic_type == CHIP_RENOIR && !adev->in_gpu_reset))
+			adev->asic_type == CHIP_RENOIR)
 		amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_SDMA, false);
 
 	if (!amdgpu_sriov_vf(adev))
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amdgpu: Need to power up SDMA for #34 sdma firmware after do mode2 reset on Renoir
  2020-04-24 11:09 [PATCH] drm/amdgpu: Need to power up SDMA for #34 sdma firmware after do mode2 reset on Renoir chen gong
@ 2020-04-24 13:53 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2020-04-24 13:53 UTC (permalink / raw)
  To: chen gong; +Cc: amd-gfx list

On Fri, Apr 24, 2020 at 7:09 AM chen gong <curry.gong@amd.com> wrote:
>
> [why]
> Previously I found that powering up SDMA after mode2 reset can cause
> ring-sdma0 test failed.
> Perhaps the mode2 reset does not reset the SDMA PG state, so SDMA is
> already powered up so there is no need to ask the SMU to power it up
> again and doing so causes some other problem.
> So I skipped function 'amdgpu_dpm_set_powergating_by_smu(adev,
> AMD_IP_BLOCK_TYPE_SDMA, false)' with '!adev->in_gpu_reset'.
>
> But now, for #34 sdma firmware, dmesg log show "ring-sdma0 test failed "
> after the mode2 reset, and scan data show SDMA does not have power.
> Then I re-enable function "amdgpu_dpm_set_powergating_by_smu(adev,
> AMD_IP_BLOCK_TYPE_SDMA, false)" during mode2 reset, The result is issue
> disappear.
>
> Besides, I did more experiments base on previous sdma firmware for this
> patch. Situation Normal.
>
> [how]
> Remove "!adev->in_gpu_reset"

Do we need a firmware version check?  How recent is the #34 firmware?
If there are older renoir SDMA firmwares out in the wild we may need
the check for them.  With that confirmed,
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

>
> Signed-off-by: chen gong <curry.gong@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> index c0ca9a82..0ecab41 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> @@ -1914,7 +1914,7 @@ static int sdma_v4_0_hw_init(void *handle)
>
>         if ((adev->asic_type == CHIP_RAVEN && adev->powerplay.pp_funcs &&
>                         adev->powerplay.pp_funcs->set_powergating_by_smu) ||
> -                       (adev->asic_type == CHIP_RENOIR && !adev->in_gpu_reset))
> +                       adev->asic_type == CHIP_RENOIR)
>                 amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_SDMA, false);
>
>         if (!amdgpu_sriov_vf(adev))
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-24 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 11:09 [PATCH] drm/amdgpu: Need to power up SDMA for #34 sdma firmware after do mode2 reset on Renoir chen gong
2020-04-24 13:53 ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.