Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1436701 > unrolled thread

[PATCH 5/7] drm/vc4: Add a getparam to signal support for branches.

Started byEric Anholt <eric@anholt.net>
First post2016-07-05 03:20 +0200
Last post2016-07-05 03:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 5/7] drm/vc4: Add a getparam to signal support for branches. Eric Anholt <eric@anholt.net> - 2016-07-05 03:20 +0200

#1436701 — [PATCH 5/7] drm/vc4: Add a getparam to signal support for branches.

FromEric Anholt <eric@anholt.net>
Date2016-07-05 03:20 +0200
Subject[PATCH 5/7] drm/vc4: Add a getparam to signal support for branches.
Message-ID<rRnbP-4xL-3@gated-at.bofh.it>
Userspace needs to know if it can create shaders that do branching.
Otherwise, for backwards compatibility with old kernels it needs to
lower if statements to conditional assignments.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/vc4/vc4_drv.c | 3 +++
 include/uapi/drm/vc4_drm.h    | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 8a2f2b5a8f32..fd6e34600d50 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -59,6 +59,9 @@ static int vc4_get_param_ioctl(struct drm_device *dev, void *data,
 	case DRM_VC4_PARAM_V3D_IDENT2:
 		args->value = V3D_READ(V3D_IDENT2);
 		break;
+	case DRM_VC4_PARAM_SUPPORTS_BRANCHES:
+		args->value = true;
+		break;
 	default:
 		DRM_DEBUG("Unknown parameter %d\n", args->param);
 		return -EINVAL;
diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h
index c4427d31b346..86cc0cd0d125 100644
--- a/include/uapi/drm/vc4_drm.h
+++ b/include/uapi/drm/vc4_drm.h
@@ -285,6 +285,7 @@ struct drm_vc4_get_hang_state {
 #define DRM_VC4_PARAM_V3D_IDENT0		0
 #define DRM_VC4_PARAM_V3D_IDENT1		1
 #define DRM_VC4_PARAM_V3D_IDENT2		2
+#define DRM_VC4_PARAM_SUPPORTS_BRANCHES		3
 
 struct drm_vc4_get_param {
 	__u32 param;
-- 
2.8.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web