[PATCH] drm/amdgpu/vcn: fix gfxoff issue
Alex Deucher
alexdeucher at gmail.com
Tue Apr 14 14:22:42 UTC 2020
On Tue, Apr 14, 2020 at 8:05 AM James Zhu <James.Zhu at amd.com> wrote:
>
> Turn off gfxoff control when vcn is gated.
>
> Signed-off-by: James Zhu <James.Zhu at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index dab34f6..aa9a7a5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -369,9 +369,11 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
> cancel_delayed_work_sync(&adev->vcn.idle_work);
>
> mutex_lock(&adev->vcn.vcn_pg_lock);
> - amdgpu_gfx_off_ctrl(adev, false);
> - amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCN,
> - AMD_PG_STATE_UNGATE);
> + if (adev->vcn.cur_state == AMD_PG_STATE_GATE) {
> + amdgpu_gfx_off_ctrl(adev, false);
> + amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCN,
> + AMD_PG_STATE_UNGATE);
> + }
>
Why are we touching gfxoff with VCN? Was this a leftover from bring
up? Can we just drop all of this gfxoff stuff from VCN handling? I
don't see why there would be a dependency.
Alex
> if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
> struct dpg_pause_state new_state;
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list