Skip to contentSkip to conversation

drm/amdgpu: add kernel doc for memory domains.

PATCH In review Samuel Li 2 participants 2 messages May 24, 2018 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Samuel Li

author
#0 lore raw

PATCH 2/2 drm/amdgpu: add kernel doc for memory domains.

---
 include/uapi/drm/amdgpu_drm.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
include/uapi/drm/amdgpu_drm.h +19 -0
index 5b007fa..a2ae752 100644
@@ -75,6 +75,25 @@ extern "C" {
 #define DRM_IOCTL_AMDGPU_SCHED		DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched)
 #define DRM_IOCTL_AMDGPU_FREESYNC	DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FREESYNC, struct drm_amdgpu_freesync)
 
+/**
+ * memory domains
+ *
+ * %AMDGPU_GEM_DOMAIN_CPU	System memory
+ *
+ * %AMDGPU_GEM_DOMAIN_GTT	Gart memory linearizes non-contiguous pages of
+ * system memory, allows GPU access system memory in a linezrized fashion
+ *
+ * %AMDGPU_GEM_DOMAIN_VRAM	Local video memory. For APUs, it is memory
+ * carved out by BIOS
+ *
+ * %AMDGPU_GEM_DOMAIN_GDS	Global on-chip data storage used to share data
+ *
+ * %AMDGPU_GEM_DOMAIN_GWS	Global wave sync, used to synchronize the
+ * execution of all the waves on a device
+ *
+ * %AMDGPU_GEM_DOMAIN_OA	Ordered append, used by 3D or Compute engines
+ * for appending data
+ */
 #define AMDGPU_GEM_DOMAIN_CPU		0x1
 #define AMDGPU_GEM_DOMAIN_GTT		0x2
 #define AMDGPU_GEM_DOMAIN_VRAM		0x4
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1527194128-19529-1-git-send-email-Samuel.Li-5C7GfCeVMHo@public.gmane.org

#2 lore raw

On Thu, May 24, 2018 at 4:35 PM, Samuel Li <[email protected]> wrote:

Please add a patch description. E.g.,
Document the GEM domains exposed to userspace.

A few comments below.

Quoted 10 lines
---
 include/uapi/drm/amdgpu_drm.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
include/uapi/drm/amdgpu_drm.h +0 -0
index 5b007fa..a2ae752 100644

include/uapi/drm/amdgpu_drm.h extern "C" { · line 79

Quoted 5 lines
include/uapi/drm/amdgpu_drm.h +2 -0
@@ -75,6 +75,25 @@ extern "C" {
 #define DRM_IOCTL_AMDGPU_SCHED         DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched)
 #define DRM_IOCTL_AMDGPU_FREESYNC      DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FREESYNC, struct drm_amdgpu_freesync)
 
+/**
+ * memory domains

This should be:
* DOC: Memory Domains

include/uapi/drm/amdgpu_drm.h extern "C" { · line 81

Quoted 2 lines
include/uapi/drm/amdgpu_drm.h +2 -0
+ *
+ * %AMDGPU_GEM_DOMAIN_CPU      System memory

System memory that is not GPU accessible. Memory in this pool could be swapped out to disk if there is pressure.

include/uapi/drm/amdgpu_drm.h extern "C" { · line 84

Quoted 3 lines
include/uapi/drm/amdgpu_drm.h +3 -0
+ *
+ * %AMDGPU_GEM_DOMAIN_GTT      Gart memory linearizes non-contiguous pages of
+ * system memory, allows GPU access system memory in a linezrized fashion

GPU accessible system memory. System memory mapped into the GPU's virtual address space.

include/uapi/drm/amdgpu_drm.h extern "C" { · line 87

Quoted 3 lines
include/uapi/drm/amdgpu_drm.h +3 -0
+ *
+ * %AMDGPU_GEM_DOMAIN_VRAM     Local video memory. For APUs, it is memory
+ * carved out by BIOS

For APUs, it is system memory carved out by the BIOS.

include/uapi/drm/amdgpu_drm.h extern "C" { · line 90

Quoted 3 lines
include/uapi/drm/amdgpu_drm.h +3 -0
+ *
+ * %AMDGPU_GEM_DOMAIN_GDS      Global on-chip data storage used to share data
+ *

Global on-chip shader storage used to share data across shader threads.

Quoted 12 lines
include/uapi/drm/amdgpu_drm.h +6 -1
+ * %AMDGPU_GEM_DOMAIN_GWS      Global wave sync, used to synchronize the
+ * execution of all the waves on a device
+ *
+ * %AMDGPU_GEM_DOMAIN_OA       Ordered append, used by 3D or Compute engines
+ * for appending data
+ */
 #define AMDGPU_GEM_DOMAIN_CPU          0x1
 #define AMDGPU_GEM_DOMAIN_GTT          0x2
 #define AMDGPU_GEM_DOMAIN_VRAM         0x4
--

2.7.4

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx