diff mbox

[4/4] drm/vc4: Add parameter for syncobj support

Message ID 20180421225022.7592-5-stschake@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Stefan Schake April 21, 2018, 10:50 p.m. UTC
This allows runtime detection of syncobj submission support.

Signed-off-by: Stefan Schake <stschake@gmail.com>
---
 drivers/gpu/drm/vc4/vc4_drv.c | 1 +
 include/uapi/drm/vc4_drm.h    | 1 +
 2 files changed, 2 insertions(+)

Comments

Eric Anholt April 23, 2018, 7:05 p.m. UTC | #1
Stefan Schake <stschake@gmail.com> writes:

> This allows runtime detection of syncobj submission support.
>
> Signed-off-by: Stefan Schake <stschake@gmail.com>

I think if we move patch 1 after 2+3, then we can just drop this one and
use drmGetCap(fd, DRM_CAP_SYNCOBJ, &value) in userspace for detection.
diff mbox

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 806c8004b793..4e2ae2a9a164 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -102,6 +102,7 @@  static int vc4_get_param_ioctl(struct drm_device *dev, void *data,
 	case DRM_VC4_PARAM_SUPPORTS_FIXED_RCL_ORDER:
 	case DRM_VC4_PARAM_SUPPORTS_MADVISE:
 	case DRM_VC4_PARAM_SUPPORTS_PERFMON:
+	case DRM_VC4_PARAM_SUPPORTS_SYNCOBJ:
 		args->value = true;
 		break;
 	default:
diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h
index 3a2ef9b5b60b..6f81cf05f7a3 100644
--- a/include/uapi/drm/vc4_drm.h
+++ b/include/uapi/drm/vc4_drm.h
@@ -338,6 +338,7 @@  struct drm_vc4_get_hang_state {
 #define DRM_VC4_PARAM_SUPPORTS_FIXED_RCL_ORDER	6
 #define DRM_VC4_PARAM_SUPPORTS_MADVISE		7
 #define DRM_VC4_PARAM_SUPPORTS_PERFMON		8
+#define DRM_VC4_PARAM_SUPPORTS_SYNCOBJ		9
 
 struct drm_vc4_get_param {
 	__u32 param;