All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: Increase direct IB pool size
@ 2021-09-09  5:54 Pan, Xinhui
  2021-09-09  7:14 ` Christian König
  0 siblings, 1 reply; 4+ messages in thread
From: Pan, Xinhui @ 2021-09-09  5:54 UTC (permalink / raw)
  To: amd-gfx; +Cc: Deucher, Alexander, Koenig, Christian

[AMD Official Use Only]

Direct IB pool is used for vce/uvd/vcn IB extra msg too. Increase its
size to 64 pages.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index c076a6b9a5a2..cd2c7073fdd9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -308,7 +308,7 @@ int amdgpu_ib_pool_init(struct amdgpu_device *adev)

        for (i = 0; i < AMDGPU_IB_POOL_MAX; i++) {
                if (i == AMDGPU_IB_POOL_DIRECT)
-                       size = PAGE_SIZE * 6;
+                       size = PAGE_SIZE * 64;
                else
                        size = AMDGPU_IB_POOL_SIZE;

--
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: Increase direct IB pool size
  2021-09-09  5:54 [PATCH 1/2] drm/amdgpu: Increase direct IB pool size Pan, Xinhui
@ 2021-09-09  7:14 ` Christian König
  2021-09-09  7:57   ` Pan, Xinhui
  0 siblings, 1 reply; 4+ messages in thread
From: Christian König @ 2021-09-09  7:14 UTC (permalink / raw)
  To: Pan, Xinhui, amd-gfx; +Cc: Deucher, Alexander

Am 09.09.21 um 07:54 schrieb Pan, Xinhui:
> [AMD Official Use Only]
>
> Direct IB pool is used for vce/uvd/vcn IB extra msg too. Increase its
> size to 64 pages.

Do you really run into issues with that? 64 pages are 256kiB on x86 and 
the extra msg are maybe 2kiB.

Additional to that we should probably make this a constant independent 
of the CPU page size.

Christian.

>
> Signed-off-by: xinhui pan <xinhui.pan@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index c076a6b9a5a2..cd2c7073fdd9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -308,7 +308,7 @@ int amdgpu_ib_pool_init(struct amdgpu_device *adev)
>
>          for (i = 0; i < AMDGPU_IB_POOL_MAX; i++) {
>                  if (i == AMDGPU_IB_POOL_DIRECT)
> -                       size = PAGE_SIZE * 6;
> +                       size = PAGE_SIZE * 64;
>                  else
>                          size = AMDGPU_IB_POOL_SIZE;
>
> --
> 2.25.1
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: Increase direct IB pool size
  2021-09-09  7:14 ` Christian König
@ 2021-09-09  7:57   ` Pan, Xinhui
  2021-09-09  8:15     ` Christian König
  0 siblings, 1 reply; 4+ messages in thread
From: Pan, Xinhui @ 2021-09-09  7:57 UTC (permalink / raw)
  To: amd-gfx, Koenig,  Christian; +Cc: Deucher, Alexander

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

[AMD Official Use Only]

yep, vcn need 128kb extra memory.  I will make the pool size constant as 256kb.
________________________________
From: Koenig, Christian <Christian.Koenig@amd.com>
Sent: Thursday, September 9, 2021 3:14:15 PM
To: Pan, Xinhui <Xinhui.Pan@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH 1/2] drm/amdgpu: Increase direct IB pool size

Am 09.09.21 um 07:54 schrieb Pan, Xinhui:
> [AMD Official Use Only]
>
> Direct IB pool is used for vce/uvd/vcn IB extra msg too. Increase its
> size to 64 pages.

Do you really run into issues with that? 64 pages are 256kiB on x86 and
the extra msg are maybe 2kiB.

Additional to that we should probably make this a constant independent
of the CPU page size.

Christian.

>
> Signed-off-by: xinhui pan <xinhui.pan@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index c076a6b9a5a2..cd2c7073fdd9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -308,7 +308,7 @@ int amdgpu_ib_pool_init(struct amdgpu_device *adev)
>
>          for (i = 0; i < AMDGPU_IB_POOL_MAX; i++) {
>                  if (i == AMDGPU_IB_POOL_DIRECT)
> -                       size = PAGE_SIZE * 6;
> +                       size = PAGE_SIZE * 64;
>                  else
>                          size = AMDGPU_IB_POOL_SIZE;
>
> --
> 2.25.1
>


[-- Attachment #2: Type: text/html, Size: 3210 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: Increase direct IB pool size
  2021-09-09  7:57   ` Pan, Xinhui
@ 2021-09-09  8:15     ` Christian König
  0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2021-09-09  8:15 UTC (permalink / raw)
  To: Pan, Xinhui, amd-gfx, Koenig, Christian; +Cc: Deucher, Alexander

[-- Attachment #1: Type: text/plain, Size: 2152 bytes --]

Ok, good to know. That's probably the reason why we didn't push that 
stuff into the IB in the first place.

And yes, using fixed 256kiB sounds like a plan to me then, but please 
also double check the AMDGPU_IB_POOL_SIZE define.

I also won't mind if you just open code the two initialization since 
there probably will never be any more than that.

Thanks,
Christian.

Am 09.09.21 um 09:57 schrieb Pan, Xinhui:
>
> [AMD Official Use Only]
>
>
> yep, vcn need 128kb extra memory.  I will make the pool size constant 
> as 256kb.
> ------------------------------------------------------------------------
> *From:* Koenig, Christian <Christian.Koenig@amd.com>
> *Sent:* Thursday, September 9, 2021 3:14:15 PM
> *To:* Pan, Xinhui <Xinhui.Pan@amd.com>; amd-gfx@lists.freedesktop.org 
> <amd-gfx@lists.freedesktop.org>
> *Cc:* Deucher, Alexander <Alexander.Deucher@amd.com>
> *Subject:* Re: [PATCH 1/2] drm/amdgpu: Increase direct IB pool size
> Am 09.09.21 um 07:54 schrieb Pan, Xinhui:
> > [AMD Official Use Only]
> >
> > Direct IB pool is used for vce/uvd/vcn IB extra msg too. Increase its
> > size to 64 pages.
>
> Do you really run into issues with that? 64 pages are 256kiB on x86 and
> the extra msg are maybe 2kiB.
>
> Additional to that we should probably make this a constant independent
> of the CPU page size.
>
> Christian.
>
> >
> > Signed-off-by: xinhui pan <xinhui.pan@amd.com>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> > index c076a6b9a5a2..cd2c7073fdd9 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> > @@ -308,7 +308,7 @@ int amdgpu_ib_pool_init(struct amdgpu_device *adev)
> >
> >          for (i = 0; i < AMDGPU_IB_POOL_MAX; i++) {
> >                  if (i == AMDGPU_IB_POOL_DIRECT)
> > -                       size = PAGE_SIZE * 6;
> > +                       size = PAGE_SIZE * 64;
> >                  else
> >                          size = AMDGPU_IB_POOL_SIZE;
> >
> > --
> > 2.25.1
> >
>


[-- Attachment #2: Type: text/html, Size: 4859 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-09  8:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09  5:54 [PATCH 1/2] drm/amdgpu: Increase direct IB pool size Pan, Xinhui
2021-09-09  7:14 ` Christian König
2021-09-09  7:57   ` Pan, Xinhui
2021-09-09  8:15     ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.