[PATCH 2/2] drm/amdgpu: Expose scatter gather display to user space.
Christian König
ckoenig.leichtzumerken at gmail.com
Sat Mar 3 13:42:09 UTC 2018
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
More information about the amd-gfx
mailing list