On Mon, Apr 15, 2019 at 08:48:25PM +0100, Lionel Landwerlin wrote: > 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 <[email protected]> > --- > 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;
I think the latest rage for this stuff is a module_option_unsafe. Much easier for igts to set by default (we want to keep CI'ing this ofc). And _unsafe taints the kernel when you set it, so about equally good. -Daniel > + > 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 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
