From patchwork Mon Apr 15 19:48:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 10901483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B961517EF for ; Mon, 15 Apr 2019 19:48:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A293728939 for ; Mon, 15 Apr 2019 19:48:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 957EE2894E; Mon, 15 Apr 2019 19:48:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C08428939 for ; Mon, 15 Apr 2019 19:48:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 054A5898C0; Mon, 15 Apr 2019 19:48:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id A03DE898C0 for ; Mon, 15 Apr 2019 19:48:37 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 12:48:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,354,1549958400"; d="scan'208";a="142970918" Received: from maletz-mobl.ger.corp.intel.com (HELO delly.ger.corp.intel.com) ([10.252.46.6]) by orsmga003.jf.intel.com with ESMTP; 15 Apr 2019 12:48:35 -0700 From: Lionel Landwerlin To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: turn syncobj timeline support off by default Date: Mon, 15 Apr 2019 20:48:25 +0100 Message-Id: <20190415194825.3786-1-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jason@jlekstrand.net, ckoenig.leichtzumerken@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;