Re: [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon for kfd runtime suspend (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 2021-02-04 um 9:20 p.m. schrieb Lazar, Lijo:
>
> [AMD Official Use Only - Internal Distribution Only]
>
>
> [AMD Official Use Only - Internal Distribution Only]
>
>
> If it's part of adev, does it need an arg? Can't kfd check it directly?

We could. Actually amdgpu_amdkfd_suspend/resume are just a set of
wrapper functions before calling into KFD. That would be the perfect
place to check the adev->run_pm flag.

Either way, this patch is

Reviewed-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>

Regards,
  Felix


>
> Thanks,
> Lijo
> ------------------------------------------------------------------------
> *From:* amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of
> Alex Deucher <alexdeucher@xxxxxxxxx>
> *Sent:* Friday, February 5, 2021 1:34:50 AM
> *To:* amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
> *Cc:* Deucher, Alexander <Alexander.Deucher@xxxxxxx>
> *Subject:* [PATCH 2/3] drm/amdgpu: use runpm flag rather than fbcon
> for kfd runtime suspend (v2)
>  
> the flag used by kfd is not actually related to fbcon, it just happens
> to align.  Use the runpm flag instead so that we can decouple it from
> the fbcon flag.
>
> v2: fix resume as well
>
> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 0ee6514ee55c..b7ebd424bbc7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3734,7 +3734,7 @@ int amdgpu_device_suspend(struct drm_device
> *dev, bool fbcon)
>  
>          r = amdgpu_device_ip_suspend_phase1(adev);
>  
> -       amdgpu_amdkfd_suspend(adev, !fbcon);
> +       amdgpu_amdkfd_suspend(adev, adev->in_runpm);
>  
>          /* evict vram memory */
>          amdgpu_bo_evict_vram(adev);
> @@ -3818,7 +3818,7 @@ int amdgpu_device_resume(struct drm_device *dev,
> bool fbcon)
>                          }
>                  }
>          }
> -       r = amdgpu_amdkfd_resume(adev, !fbcon);
> +       r = amdgpu_amdkfd_resume(adev, adev->in_runpm);
>          if (r)
>                  return r;
>  
> -- 
> 2.29.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux