Re: [PATCH 1/2] drm/amdgpu/sdma4: use paging queue for buffer funcs

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

 



On Wed, Nov 7, 2018 at 9:05 PM Zhang, Jerry(Junwei) <Jerry.Zhang@xxxxxxx> wrote:
>
> On 11/8/18 1:29 AM, Alex Deucher wrote:
> > Use the paging queue for buffer functions to avoid contention
> > with the other queues.
> >
> > Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
> Reviewed-by: Junwei Zhang <Jerry.Zhang@xxxxxxx>

Can someone with a vega10 test this?

Alex

>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 12 +++++++++++-
> >   1 file changed, 11 insertions(+), 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 e39a09eb0fa1..4b5b47dd2f4c 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
> > @@ -662,6 +662,10 @@ static void sdma_v4_0_page_stop(struct amdgpu_device *adev)
> >       u32 rb_cntl, ib_cntl;
> >       int i;
> >
> > +     if ((adev->mman.buffer_funcs_ring == sdma0) ||
> > +         (adev->mman.buffer_funcs_ring == sdma1))
> > +             amdgpu_ttm_set_buffer_funcs_status(adev, false);
> > +
> >       for (i = 0; i < adev->sdma.num_instances; i++) {
> >               rb_cntl = RREG32_SDMA(i, mmSDMA0_PAGE_RB_CNTL);
> >               rb_cntl = REG_SET_FIELD(rb_cntl, SDMA0_PAGE_RB_CNTL,
> > @@ -1152,6 +1156,9 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)
> >                       r = amdgpu_ring_test_helper(page);
> >                       if (r)
> >                               return r;
> > +
> > +                     if (adev->mman.buffer_funcs_ring == page)
> > +                             amdgpu_ttm_set_buffer_funcs_status(adev, true);
> >               }
> >
> >               if (adev->mman.buffer_funcs_ring == ring)
> > @@ -2054,7 +2061,10 @@ static const struct amdgpu_buffer_funcs sdma_v4_0_buffer_funcs = {
> >   static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev)
> >   {
> >       adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;
> > -     adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring;
> > +     if (adev->sdma.has_page_queue)
> > +             adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].page;
> > +     else
> > +             adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring;
> >   }
> >
> >   static const struct amdgpu_vm_pte_funcs sdma_v4_0_vm_pte_funcs = {
>
_______________________________________________
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