Re: [PATCH 05/11] drm/amdgpu/sdma5.2: use amdgpu_gfx_off_ctrl_immediate()

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

 



[Public]


Specifically, was talking of examples like delayed bo deletes (don't know how they could be in real world). That is an example where buffer deletion is queued up and buffer clearing jobs will start sequentially. With the new sequence, allow will be sent and could immediately be followed by a disallow. With the delayed ones that won't happen. 

Or is the gfxoff delay that long which removes considerable power saving?

Thanks,
Lijo

From: Alex Deucher <alexdeucher@xxxxxxxxx>
Sent: Thursday, February 6, 2025 8:55:13 PM
To: Lazar, Lijo <Lijo.Lazar@xxxxxxx>
Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH 05/11] drm/amdgpu/sdma5.2: use amdgpu_gfx_off_ctrl_immediate()
 
On Thu, Feb 6, 2025 at 10:17 AM Lazar, Lijo <lijo.lazar@xxxxxxx> wrote:
>
>
>
> On 2/4/2025 3:13 AM, Alex Deucher wrote:
> > In begin_use/end_use use amdgpu_gfx_off_ctrl_immediate()
> > rather than amdgpu_gfx_off_ctrl() as we don't need the
> > extra delay before we allow gfxoff again.
> >
> > Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
>
> Won't this cause unnecessary GFX allows since sdma jobs could also be
> used for clearing the buffers?

The calls are already there, this just switches to gfxoff allow
sooner, reducing the time where gfxoff is disallowed.  Should save a
bit of power.

Alex

>
> Thanks,
> Lijo
>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> > index b1818e87889a2..7f2e1962b5755 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> > @@ -1882,7 +1882,7 @@ static void sdma_v5_2_ring_begin_use(struct amdgpu_ring *ring)
> >        * doorbells when entering PG.  If you remove this, update
> >        * sdma_v5_2_ring_set_wptr() as well!
> >        */
> > -     amdgpu_gfx_off_ctrl(adev, false);
> > +     amdgpu_gfx_off_ctrl_immediate(adev, false);
> >  }
> >
> >  static void sdma_v5_2_ring_end_use(struct amdgpu_ring *ring)
> > @@ -1893,7 +1893,7 @@ static void sdma_v5_2_ring_end_use(struct amdgpu_ring *ring)
> >        * disallow GFXOFF in some cases leading to
> >        * hangs in SDMA.  Allow GFXOFF when SDMA is complete.
> >        */
> > -     amdgpu_gfx_off_ctrl(adev, true);
> > +     amdgpu_gfx_off_ctrl_immediate(adev, true);
> >  }
> >
> >  static void sdma_v5_2_print_ip_state(struct amdgpu_ip_block *ip_block, struct drm_printer *p)
>

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

  Powered by Linux