回复: 回复: [PATCH] drm/amd/amdgpu: disable GFXOFF around debugfs access to MMIO

Liu, Monk Monk.Liu at amd.com
Sat Feb 22 02:19:21 UTC 2020


>>>RREG32_KIQ and WREG32_KIQ

If you are using RREG32_KIQ it is always go through KIQ no matter GFX is "on" state or not 



-----邮件原件-----
发件人: Huang, Ray <Ray.Huang at amd.com> 
发送时间: 2020年2月21日 23:23
收件人: Liu, Monk <Monk.Liu at amd.com>
抄送: StDenis, Tom <Tom.StDenis at amd.com>; Alex Deucher <alexdeucher at gmail.com>; amd-gfx list <amd-gfx at lists.freedesktop.org>
主题: Re: 回复: [PATCH] drm/amd/amdgpu: disable GFXOFF around debugfs access to MMIO

On Fri, Feb 21, 2020 at 11:18:07PM +0800, Liu, Monk wrote:
> Better not use KIQ, because when you use debugfs to read register you 
> usually hit a hang, and by that case KIQ probably already die

If CP is busy, the gfx should be in "on" state at that time, we needn't use KIQ.

Thanks,
Ray

> 
> -----邮件原件-----
> 发件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Huang Rui
> 发送时间: 2020年2月21日 22:34
> 收件人: StDenis, Tom <Tom.StDenis at amd.com>
> 抄送: Alex Deucher <alexdeucher at gmail.com>; amd-gfx list 
> <amd-gfx at lists.freedesktop.org>
> 主题: Re: [PATCH] drm/amd/amdgpu: disable GFXOFF around debugfs access 
> to MMIO
> 
> On Wed, Feb 19, 2020 at 10:09:46AM -0500, Tom St Denis wrote:
> > I got some messages after a while:
> > 
> > [  741.788564] Failed to send Message 8.
> > [  746.671509] Failed to send Message 8.
> > [  748.749673] Failed to send Message 2b.
> > [  759.245414] Failed to send Message 7.
> > [  763.216902] Failed to send Message 2a.
> > 
> > Are there any additional locks that should be held?  Because some 
> > commands like --top or --waves can do a lot of distinct read 
> > operations (causing a lot of enable/disable calls).
> > 
> > I'm going to sit on this a bit since I don't think the patch is 
> > ready for pushing out.
> > 
> 
> How about use RREG32_KIQ and WREG32_KIQ?
> 
> Thanks,
> Ray
> 
> > 
> > Tom
> > 
> > On 2020-02-19 10:07 a.m., Alex Deucher wrote:
> > > On Wed, Feb 19, 2020 at 10:04 AM Tom St Denis <tom.stdenis at amd.com> wrote:
> > > > Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
> > > Please add a patch description.  With that fixed:
> > > Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> > > 
> > > > ---
> > > >   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 +++
> > > >   1 file changed, 3 insertions(+)
> > > > 
> > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> > > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> > > > index 7379910790c9..66f763300c96 100644
> > > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> > > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> > > > @@ -169,6 +169,7 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
> > > >          if (pm_pg_lock)
> > > >                  mutex_lock(&adev->pm.mutex);
> > > > 
> > > > +       amdgpu_gfx_off_ctrl(adev, false);
> > > >          while (size) {
> > > >                  uint32_t value;
> > > > 
> > > > @@ -192,6 +193,8 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct file *f,
> > > >          }
> > > > 
> > > >   end:
> > > > +       amdgpu_gfx_off_ctrl(adev, true);
> > > > +
> > > >          if (use_bank) {
> > > >                  amdgpu_gfx_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
> > > >                  mutex_unlock(&adev->grbm_idx_mutex);
> > > > --
> > > > 2.24.1
> > > > 
> > > > _______________________________________________
> > > > amd-gfx mailing list
> > > > amd-gfx at lists.freedesktop.org
> > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%
> > > > 2F
> > > > lists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02
> > > > %7
> > > > C01%7Cmonk.liu%40amd.com%7Cba45efb26c0240ed036f08d7b6db20aa%7C3d
> > > > d8 
> > > > 961fe4884e608e11a82d994e183d%7C0%7C0%7C637178924605524378&sd
> > > > at 
> > > > a=%2FyHkvYU5T%2F4iFxRexsg%2BIdm7sDzyXbjzNpHUGCO7h4k%3D&reser
> > > > ve
> > > > d=0
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx at lists.freedesktop.org
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > st 
> > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7C
> > mo
> > nk.liu%40amd.com%7Cba45efb26c0240ed036f08d7b6db20aa%7C3dd8961fe4884e
> > 60 
> > 8e11a82d994e183d%7C0%7C0%7C637178924605524378&sdata=%2FyHkvYU5T%
> > 2F
> > 4iFxRexsg%2BIdm7sDzyXbjzNpHUGCO7h4k%3D&reserved=0
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cmo
> nk.liu%40amd.com%7Cba45efb26c0240ed036f08d7b6db20aa%7C3dd8961fe4884e60
> 8e11a82d994e183d%7C0%7C0%7C637178924605524378&sdata=%2FyHkvYU5T%2F
> 4iFxRexsg%2BIdm7sDzyXbjzNpHUGCO7h4k%3D&reserved=0


More information about the amd-gfx mailing list