All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: add the missing AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag
@ 2020-12-08  2:50 Chen Lei
  2020-12-08  7:41 ` Christian König
  0 siblings, 1 reply; 4+ messages in thread
From: Chen Lei @ 2020-12-08  2:50 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig; +Cc: amd-gfx, Chen Lei

Add the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag in amdgpu_gem_create_ioctl.

Signed-off-by: Chen Lei <chenlei18s@ict.ac.cn>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 7e8265da9..da18aeff7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -233,6 +233,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
 		      AMDGPU_GEM_CREATE_NO_CPU_ACCESS |
 		      AMDGPU_GEM_CREATE_CPU_GTT_USWC |
 		      AMDGPU_GEM_CREATE_VRAM_CLEARED |
+		      AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
 		      AMDGPU_GEM_CREATE_VM_ALWAYS_VALID |
 		      AMDGPU_GEM_CREATE_EXPLICIT_SYNC |
 		      AMDGPU_GEM_CREATE_ENCRYPTED))
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: add the missing AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag
  2020-12-08  2:50 [PATCH] drm/amdgpu: add the missing AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag Chen Lei
@ 2020-12-08  7:41 ` Christian König
  2020-12-08 10:28   ` Chen Lei
  0 siblings, 1 reply; 4+ messages in thread
From: Christian König @ 2020-12-08  7:41 UTC (permalink / raw)
  To: Chen Lei, alexander.deucher, christian.koenig; +Cc: amd-gfx

Am 08.12.20 um 03:50 schrieb Chen Lei:
> Add the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag in amdgpu_gem_create_ioctl.
>
> Signed-off-by: Chen Lei <chenlei18s@ict.ac.cn>

NAK, that is not missing but intentionally blocked.

Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 7e8265da9..da18aeff7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -233,6 +233,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
>   		      AMDGPU_GEM_CREATE_NO_CPU_ACCESS |
>   		      AMDGPU_GEM_CREATE_CPU_GTT_USWC |
>   		      AMDGPU_GEM_CREATE_VRAM_CLEARED |
> +		      AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
>   		      AMDGPU_GEM_CREATE_VM_ALWAYS_VALID |
>   		      AMDGPU_GEM_CREATE_EXPLICIT_SYNC |
>   		      AMDGPU_GEM_CREATE_ENCRYPTED))

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: Re: [PATCH] drm/amdgpu: add the missing AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag
  2020-12-08  7:41 ` Christian König
@ 2020-12-08 10:28   ` Chen Lei
  2020-12-08 12:08     ` Christian König
  0 siblings, 1 reply; 4+ messages in thread
From: Chen Lei @ 2020-12-08 10:28 UTC (permalink / raw)
  To: christian.koenig, alexander.deucher; +Cc: amd-gfx

Hi! I am not quite familiar with it, and I was wondering why this flag is blocked. As the VM subsystem supports giant pages, it might be useful to add this flag in amdgpu_gem_create_ioctl. 


&gt; -----原始邮件-----
&gt; 发件人: "Christian König" <ckoenig.leichtzumerken@gmail.com>
&gt; 发送时间: 2020-12-08 15:41:02 (星期二)
&gt; 收件人: "Chen Lei" <chenlei18s@ict.ac.cn>, alexander.deucher@amd.com, christian.koenig@amd.com
&gt; 抄送: amd-gfx@lists.freedesktop.org
&gt; 主题: Re: [PATCH] drm/amdgpu: add the missing AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag
&gt; 
&gt; Am 08.12.20 um 03:50 schrieb Chen Lei:
&gt; &gt; Add the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag in amdgpu_gem_create_ioctl.
&gt; &gt;
&gt; &gt; Signed-off-by: Chen Lei <chenlei18s@ict.ac.cn>
&gt; 
&gt; NAK, that is not missing but intentionally blocked.
&gt; 
&gt; Christian.
&gt; 
&gt; &gt; ---
&gt; &gt;   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 +
&gt; &gt;   1 file changed, 1 insertion(+)
&gt; &gt;
&gt; &gt; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
&gt; &gt; index 7e8265da9..da18aeff7 100644
&gt; &gt; --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
&gt; &gt; +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
&gt; &gt; @@ -233,6 +233,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
&gt; &gt;   		      AMDGPU_GEM_CREATE_NO_CPU_ACCESS |
&gt; &gt;   		      AMDGPU_GEM_CREATE_CPU_GTT_USWC |
&gt; &gt;   		      AMDGPU_GEM_CREATE_VRAM_CLEARED |
&gt; &gt; +		      AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
&gt; &gt;   		      AMDGPU_GEM_CREATE_VM_ALWAYS_VALID |
&gt; &gt;   		      AMDGPU_GEM_CREATE_EXPLICIT_SYNC |
&gt; &gt;   		      AMDGPU_GEM_CREATE_ENCRYPTED))
</chenlei18s@ict.ac.cn></chenlei18s@ict.ac.cn></ckoenig.leichtzumerken@gmail.com>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: add the missing AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag
  2020-12-08 10:28   ` Chen Lei
@ 2020-12-08 12:08     ` Christian König
  0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2020-12-08 12:08 UTC (permalink / raw)
  To: Chen Lei, christian.koenig, alexander.deucher; +Cc: amd-gfx

The flag is set by the kernel when it detects that contiguous VRAM is 
necessary by because of some hardware restriction. It should never be 
set by userspace manually.

I've added giant page optimizations as a best effort handling which 
atomatically kicks in when enough VRAM is available. If VRAM is 
fragmented we fall back to huge page allocations.

Regards,
Christian.

Am 08.12.20 um 11:28 schrieb Chen Lei:
> Hi! I am not quite familiar with it, and I was wondering why this flag is blocked. As the VM subsystem supports giant pages, it might be useful to add this flag in amdgpu_gem_create_ioctl.
>
>
> &gt; -----原始邮件-----
> &gt; 发件人: "Christian König" <ckoenig.leichtzumerken@gmail.com>
> &gt; 发送时间: 2020-12-08 15:41:02 (星期二)
> &gt; 收件人: "Chen Lei" <chenlei18s@ict.ac.cn>, alexander.deucher@amd.com, christian.koenig@amd.com
> &gt; 抄送: amd-gfx@lists.freedesktop.org
> &gt; 主题: Re: [PATCH] drm/amdgpu: add the missing AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag
> &gt;
> &gt; Am 08.12.20 um 03:50 schrieb Chen Lei:
> &gt; &gt; Add the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag in amdgpu_gem_create_ioctl.
> &gt; &gt;
> &gt; &gt; Signed-off-by: Chen Lei <chenlei18s@ict.ac.cn>
> &gt;
> &gt; NAK, that is not missing but intentionally blocked.
> &gt;
> &gt; Christian.
> &gt;
> &gt; &gt; ---
> &gt; &gt;   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 1 +
> &gt; &gt;   1 file changed, 1 insertion(+)
> &gt; &gt;
> &gt; &gt; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> &gt; &gt; index 7e8265da9..da18aeff7 100644
> &gt; &gt; --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> &gt; &gt; +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> &gt; &gt; @@ -233,6 +233,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
> &gt; &gt;   		      AMDGPU_GEM_CREATE_NO_CPU_ACCESS |
> &gt; &gt;   		      AMDGPU_GEM_CREATE_CPU_GTT_USWC |
> &gt; &gt;   		      AMDGPU_GEM_CREATE_VRAM_CLEARED |
> &gt; &gt; +		      AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
> &gt; &gt;   		      AMDGPU_GEM_CREATE_VM_ALWAYS_VALID |
> &gt; &gt;   		      AMDGPU_GEM_CREATE_EXPLICIT_SYNC |
> &gt; &gt;   		      AMDGPU_GEM_CREATE_ENCRYPTED))
> </chenlei18s@ict.ac.cn></chenlei18s@ict.ac.cn></ckoenig.leichtzumerken@gmail.com>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2020-12-08 12:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08  2:50 [PATCH] drm/amdgpu: add the missing AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag Chen Lei
2020-12-08  7:41 ` Christian König
2020-12-08 10:28   ` Chen Lei
2020-12-08 12:08     ` 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.