Skip to contentSkip to conversation

drm/amdgpu: Expose scatter gather display to user space.

PATCH Superseded Samuel Li 2 participants 3 messages Mar 2, 2018 – Mar 5, 2018 2 messages not in the archive

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Samuel Li

author
#0 lore raw

PATCH 2/2 drm/amdgpu: Expose scatter gather display to user space.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++
 include/uapi/drm/amdgpu_drm.h           | 1 +
 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +3 -0
index 51a4b08..2cb344f 100644
@@ -31,6 +31,7 @@
 #include "amdgpu_sched.h"
 #include "amdgpu_uvd.h"
 #include "amdgpu_vce.h"
+#include "amdgpu_display.h"
 
 #include <linux/vga_switcheroo.h>
 #include <linux/slab.h>
@@ -578,6 +579,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 			dev_info.ids_flags |= AMDGPU_IDS_FLAGS_FUSION;
 		if (amdgpu_sriov_vf(adev))
 			dev_info.ids_flags |= AMDGPU_IDS_FLAGS_PREEMPTION;
+		if (amdgpu_display_framebuffer_domains(adev) == AMDGPU_GEM_DOMAIN_GTT)
+			dev_info.ids_flags |= AMDGPU_IDS_FLAGS_SGDISPLAY;
 
 		vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
 		vm_size -= AMDGPU_VA_RESERVED_SIZE;
include/uapi/drm/amdgpu_drm.h +1 -0
index fe17b67..2f30b98 100644
@@ -584,6 +584,7 @@ struct drm_amdgpu_cs_chunk_data {
  */
 #define AMDGPU_IDS_FLAGS_FUSION         0x1
 #define AMDGPU_IDS_FLAGS_PREEMPTION     0x2
+#define AMDGPU_IDS_FLAGS_SGDISPLAY      0x4
 
 /* indicate if acceleration can be working */
 #define AMDGPU_INFO_ACCEL_WORKING		0x00
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): 1520033173-30028-1-git-send-email-Samuel.Li-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 03.03.2018 um 00:26 schrieb Samuel Li:

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++
  include/uapi/drm/amdgpu_drm.h           | 1 +
  2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -0
index 51a4b08..2cb344f 100644
@@ -31,6 +31,7 @@
  #include "amdgpu_sched.h"
  #include "amdgpu_uvd.h"
  #include "amdgpu_vce.h"
+#include "amdgpu_display.h"
 
  #include <linux/vga_switcheroo.h>
  #include <linux/slab.h>

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file · line 582

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -0
@@ -578,6 +579,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
  			dev_info.ids_flags |= AMDGPU_IDS_FLAGS_FUSION;
  		if (amdgpu_sriov_vf(adev))
  			dev_info.ids_flags |= AMDGPU_IDS_FLAGS_PREEMPTION;
+		if (amdgpu_display_framebuffer_domains(adev) == AMDGPU_GEM_DOMAIN_GTT)

This check should probably be & instead of ==.

Christian.

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -0
+			dev_info.ids_flags |= AMDGPU_IDS_FLAGS_SGDISPLAY;
 
  		vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
  		vm_size -= AMDGPU_VA_RESERVED_SIZE;
include/uapi/drm/amdgpu_drm.h +0 -0
index fe17b67..2f30b98 100644

include/uapi/drm/amdgpu_drm.h struct drm_amdgpu_cs_chunk_data { · line 590

Quoted 7 lines
include/uapi/drm/amdgpu_drm.h +1 -0
@@ -584,6 +584,7 @@ struct drm_amdgpu_cs_chunk_data {
   */
  #define AMDGPU_IDS_FLAGS_FUSION         0x1
  #define AMDGPU_IDS_FLAGS_PREEMPTION     0x2
+#define AMDGPU_IDS_FLAGS_SGDISPLAY      0x4
 
  /* indicate if acceleration can be working */
  #define AMDGPU_INFO_ACCEL_WORKING		0x00

_______________________________________________
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): 553790f7-531b-ed51-e6f3-00014c350855-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

author
#4 lore raw
Quoted 4 lines
Quoted 2 lines

+ if (amdgpu_display_framebuffer_domains(adev) == AMDGPU_GEM_DOMAIN_GTT)

This check should probably be & instead of ==.

Thought about that as well. For mixed VRAM/GTT display case, since it has some complications, I prefer to do it later.

Sam

Quoted 27 lines · Christian König

Am 03.03.2018 um 00:26 schrieb Samuel Li:

Quoted 17 lines

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++
  include/uapi/drm/amdgpu_drm.h           | 1 +

  2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -0
index 51a4b08..2cb344f 100644
@@ -31,6 +31,7 @@
   #include "amdgpu_sched.h"
   #include "amdgpu_uvd.h"
   #include "amdgpu_vce.h"
+#include "amdgpu_display.h"
     #include <linux/vga_switcheroo.h>
   #include <linux/slab.h>

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file · line 582

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -0
@@ -578,6 +579,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
               dev_info.ids_flags |= AMDGPU_IDS_FLAGS_FUSION;
           if (amdgpu_sriov_vf(adev))
               dev_info.ids_flags |= AMDGPU_IDS_FLAGS_PREEMPTION;
+        if (amdgpu_display_framebuffer_domains(adev) == AMDGPU_GEM_DOMAIN_GTT)

This check should probably be & instead of ==.

Christian.

Quoted 15 lines
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -0
+            dev_info.ids_flags |= AMDGPU_IDS_FLAGS_SGDISPLAY;
             vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
           vm_size -= AMDGPU_VA_RESERVED_SIZE;
include/uapi/drm/amdgpu_drm.h +0 -0
index fe17b67..2f30b98 100644

include/uapi/drm/amdgpu_drm.h struct drm_amdgpu_cs_chunk_data { · line 589

Quoted 6 lines
include/uapi/drm/amdgpu_drm.h +1 -0
@@ -584,6 +584,7 @@ struct drm_amdgpu_cs_chunk_data {
    */
   #define AMDGPU_IDS_FLAGS_FUSION         0x1
   #define AMDGPU_IDS_FLAGS_PREEMPTION     0x2
+#define AMDGPU_IDS_FLAGS_SGDISPLAY      0x4
     /* indicate if acceleration can be working */
   #define AMDGPU_INFO_ACCEL_WORKING        0x00

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