[PATCH] drm: turn syncobj timeline support off by default

Lionel Landwerlin lionel.g.landwerlin at intel.com
Mon Apr 15 19:48:25 UTC 2019


Unfortunately userspace users of this API cannot be publicly disclosed
yet so disable this stuff by default until all is revealed.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 drivers/gpu/drm/Kconfig       | 10 ++++++++++
 drivers/gpu/drm/drm_syncobj.c | 12 ++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 5e1bc630b885..5b002793f0e4 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -423,3 +423,13 @@ config DRM_PANEL_ORIENTATION_QUIRKS
 config DRM_LIB_RANDOM
 	bool
 	default n
+
+config DRM_SYNCOBJ_TIMELINE
+	bool "Enable syncobj timeline support"
+	depends on DRM
+	default n
+	help
+	  Choose this option if you want to enable preliminary support
+	  for timeline syncobjs.
+
+	  If in doubt, say "N".
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index ea22b79a7170..dd1bdd287225 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -754,6 +754,9 @@ drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data,
 	struct drm_syncobj_transfer *args = data;
 	int ret;
 
+	if (!IS_ENABLED(CONFIG_DRM_SYNCOBJ_TIMELINE))
+		return -ENODEV;
+
 	if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
 		return -ENODEV;
 
@@ -1105,6 +1108,9 @@ drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data,
 	struct drm_syncobj **syncobjs;
 	int ret = 0;
 
+	if (!IS_ENABLED(CONFIG_DRM_SYNCOBJ_TIMELINE))
+		return -ENODEV;
+
 	if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
 		return -ENODEV;
 
@@ -1209,6 +1215,9 @@ drm_syncobj_timeline_signal_ioctl(struct drm_device *dev, void *data,
 	uint32_t i, j;
 	int ret;
 
+	if (!IS_ENABLED(CONFIG_DRM_SYNCOBJ_TIMELINE))
+		return -ENODEV;
+
 	if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
 		return -EOPNOTSUPP;
 
@@ -1280,6 +1289,9 @@ int drm_syncobj_query_ioctl(struct drm_device *dev, void *data,
 	uint32_t i;
 	int ret;
 
+	if (!IS_ENABLED(CONFIG_DRM_SYNCOBJ_TIMELINE))
+		return -ENODEV;
+
 	if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ))
 		return -ENODEV;
 
-- 
2.21.0.392.gf8f6787159e



More information about the dri-devel mailing list