Message ID | 20180421225022.7592-5-stschake@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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 --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;
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(+)