All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test
@ 2021-09-06  1:10 Pan, Xinhui
  2021-09-06  2:55 ` Wang, Kevin(Yang)
  0 siblings, 1 reply; 4+ messages in thread
From: Pan, Xinhui @ 2021-09-06  1:10 UTC (permalink / raw)
  To: amd-gfx, dri-devel; +Cc: Koenig, Christian, Deucher, Alexander, chenli

[AMD Official Use Only]

Like vce/vcn does, visible VRAM is OK for ib test.
While commit a11d9ff3ebe0 ("drm/amdgpu: use GTT for
uvd_get_create/destory_msg") says VRAM is not mapped correctly in his
platform which is likely an arm64.

So lets change back to use VRAM on x86_64 platform.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index d451c359606a..e4b75f33ccc8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -1178,7 +1178,11 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
        int r, i;

        r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
+#ifdef CONFIG_X86_64
+                                     AMDGPU_GEM_DOMAIN_VRAM,
+#else
                                      AMDGPU_GEM_DOMAIN_GTT,
+#endif
                                      &bo, NULL, (void **)&msg);
        if (r)
                return r;
@@ -1210,7 +1214,11 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
        int r, i;

        r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
+#ifdef CONFIG_X86_64
+                                     AMDGPU_GEM_DOMAIN_VRAM,
+#else
                                      AMDGPU_GEM_DOMAIN_GTT,
+#endif
                                      &bo, NULL, (void **)&msg);
        if (r)
                return r;
--
2.25.1


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

* Re: [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test
  2021-09-06  1:10 [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test Pan, Xinhui
@ 2021-09-06  2:55 ` Wang, Kevin(Yang)
  0 siblings, 0 replies; 4+ messages in thread
From: Wang, Kevin(Yang) @ 2021-09-06  2:55 UTC (permalink / raw)
  To: Pan, Xinhui, amd-gfx, dri-devel
  Cc: Koenig, Christian, Deucher, Alexander, chenli

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

[AMD Official Use Only]



________________________________
From: dri-devel <dri-devel-bounces@lists.freedesktop.org> on behalf of Pan, Xinhui <Xinhui.Pan@amd.com>
Sent: Monday, September 6, 2021 9:10 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>
Cc: Koenig, Christian <Christian.Koenig@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; chenli@uniontech.com <chenli@uniontech.com>
Subject: [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test

[AMD Official Use Only]

[AMD Official Use Only]

Like vce/vcn does, visible VRAM is OK for ib test.
While commit a11d9ff3ebe0 ("drm/amdgpu: use GTT for
uvd_get_create/destory_msg") says VRAM is not mapped correctly in his
platform which is likely an arm64.

So lets change back to use VRAM on x86_64 platform.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index d451c359606a..e4b75f33ccc8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -1178,7 +1178,11 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
        int r, i;

        r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
+#ifdef CONFIG_X86_64
[kevin]:
It's better to replace this with macro of CONFIG_64BIT to cover more cases,
do you think it is ok ?

Best Regards,
Kevin

+                                     AMDGPU_GEM_DOMAIN_VRAM,
+#else
                                      AMDGPU_GEM_DOMAIN_GTT,
+#endif
                                      &bo, NULL, (void **)&msg);
        if (r)
                return r;
@@ -1210,7 +1214,11 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
        int r, i;

        r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
+#ifdef CONFIG_X86_64
+                                     AMDGPU_GEM_DOMAIN_VRAM,
+#else
                                      AMDGPU_GEM_DOMAIN_GTT,
+#endif
                                      &bo, NULL, (void **)&msg);
        if (r)
                return r;
--
2.25.1


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

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

* Re: [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test
  2021-09-06  1:12 ` [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test xinhui pan
@ 2021-09-06  9:01   ` Christian König
  0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2021-09-06  9:01 UTC (permalink / raw)
  To: xinhui pan, amd-gfx; +Cc: alexander.deucher, chenli, dri-devel

Am 06.09.21 um 03:12 schrieb xinhui pan:
> Like vce/vcn does, visible VRAM is OK for ib test.
> While commit a11d9ff3ebe0 ("drm/amdgpu: use GTT for
> uvd_get_create/destory_msg") says VRAM is not mapped correctly in his
> platform which is likely an arm64.
>
> So lets change back to use VRAM on x86_64 platform.

That's still a rather clear NAK. This issue is not related to ARM at all 
and you are trying to fix a problem which is independent of the platform.

Christian.

>
> Signed-off-by: xinhui pan <xinhui.pan@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index d451c359606a..e4b75f33ccc8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -1178,7 +1178,11 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
>   	int r, i;
>   
>   	r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
> +#ifdef CONFIG_X86_64
> +				      AMDGPU_GEM_DOMAIN_VRAM,
> +#else
>   				      AMDGPU_GEM_DOMAIN_GTT,
> +#endif
>   				      &bo, NULL, (void **)&msg);
>   	if (r)
>   		return r;
> @@ -1210,7 +1214,11 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
>   	int r, i;
>   
>   	r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
> +#ifdef CONFIG_X86_64
> +				      AMDGPU_GEM_DOMAIN_VRAM,
> +#else
>   				      AMDGPU_GEM_DOMAIN_GTT,
> +#endif
>   				      &bo, NULL, (void **)&msg);
>   	if (r)
>   		return r;


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

* [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test
  2021-09-06  1:12 [PATCH v2 0/2] Fix a hung during memory pressure test xinhui pan
@ 2021-09-06  1:12 ` xinhui pan
  2021-09-06  9:01   ` Christian König
  0 siblings, 1 reply; 4+ messages in thread
From: xinhui pan @ 2021-09-06  1:12 UTC (permalink / raw)
  To: amd-gfx
  Cc: alexander.deucher, christian.koenig, chenli, dri-devel, xinhui pan

Like vce/vcn does, visible VRAM is OK for ib test.
While commit a11d9ff3ebe0 ("drm/amdgpu: use GTT for
uvd_get_create/destory_msg") says VRAM is not mapped correctly in his
platform which is likely an arm64.

So lets change back to use VRAM on x86_64 platform.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index d451c359606a..e4b75f33ccc8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -1178,7 +1178,11 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
 	int r, i;
 
 	r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
+#ifdef CONFIG_X86_64
+				      AMDGPU_GEM_DOMAIN_VRAM,
+#else
 				      AMDGPU_GEM_DOMAIN_GTT,
+#endif
 				      &bo, NULL, (void **)&msg);
 	if (r)
 		return r;
@@ -1210,7 +1214,11 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
 	int r, i;
 
 	r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,
+#ifdef CONFIG_X86_64
+				      AMDGPU_GEM_DOMAIN_VRAM,
+#else
 				      AMDGPU_GEM_DOMAIN_GTT,
+#endif
 				      &bo, NULL, (void **)&msg);
 	if (r)
 		return r;
-- 
2.25.1


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

end of thread, other threads:[~2021-09-06  9:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06  1:10 [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test Pan, Xinhui
2021-09-06  2:55 ` Wang, Kevin(Yang)
2021-09-06  1:12 [PATCH v2 0/2] Fix a hung during memory pressure test xinhui pan
2021-09-06  1:12 ` [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test xinhui pan
2021-09-06  9:01   ` 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.