* [PATCH 2/2] drm/amdgpu: Expose scatter gather display to user space.
@ 2018-03-02 23:26 Samuel Li
[not found] ` <1520033173-30028-1-git-send-email-Samuel.Li-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Li @ 2018-03-02 23:26 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Samuel Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++
include/uapi/drm/amdgpu_drm.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 51a4b08..2cb344f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -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;
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index fe17b67..2f30b98 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -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
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: Expose scatter gather display to user space.
[not found] ` <1520033173-30028-1-git-send-email-Samuel.Li-5C7GfCeVMHo@public.gmane.org>
@ 2018-03-03 13:42 ` Christian König
[not found] ` <553790f7-531b-ed51-e6f3-00014c350855-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2018-03-03 13:42 UTC (permalink / raw)
To: Samuel Li, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Am 03.03.2018 um 00:26 schrieb Samuel Li:
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++
> include/uapi/drm/amdgpu_drm.h | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 51a4b08..2cb344f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -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)
This check should probably be & instead of ==.
Christian.
> + 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;
> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> index fe17b67..2f30b98 100644
> --- a/include/uapi/drm/amdgpu_drm.h
> +++ b/include/uapi/drm/amdgpu_drm.h
> @@ -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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: Expose scatter gather display to user space.
[not found] ` <553790f7-531b-ed51-e6f3-00014c350855-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-03-05 15:18 ` Samuel Li
0 siblings, 0 replies; 3+ messages in thread
From: Samuel Li @ 2018-03-05 15:18 UTC (permalink / raw)
To: christian.koenig-5C7GfCeVMHo, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
>> + 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
On 2018-03-03 08:42 AM, Christian König wrote:
> Am 03.03.2018 um 00:26 schrieb Samuel Li:
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++
>> include/uapi/drm/amdgpu_drm.h | 1 +
>> 2 files changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> index 51a4b08..2cb344f 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> @@ -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)
>
> This check should probably be & instead of ==.
>
> Christian.
>
>> + 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;
>> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
>> index fe17b67..2f30b98 100644
>> --- a/include/uapi/drm/amdgpu_drm.h
>> +++ b/include/uapi/drm/amdgpu_drm.h
>> @@ -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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-05 15:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-02 23:26 [PATCH 2/2] drm/amdgpu: Expose scatter gather display to user space Samuel Li
[not found] ` <1520033173-30028-1-git-send-email-Samuel.Li-5C7GfCeVMHo@public.gmane.org>
2018-03-03 13:42 ` Christian König
[not found] ` <553790f7-531b-ed51-e6f3-00014c350855-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-05 15:18 ` Samuel Li
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.