From patchwork Wed Aug 22 09:29:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10572767 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 B3F66921 for ; Wed, 22 Aug 2018 09:29:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A48732A423 for ; Wed, 22 Aug 2018 09:29:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 965D72A904; Wed, 22 Aug 2018 09:29:13 +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 219292A423 for ; Wed, 22 Aug 2018 09:29:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F89189911; Wed, 22 Aug 2018 09:29:12 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8A10689911 for ; Wed, 22 Aug 2018 09:29:11 +0000 (UTC) Received: by mail-ed1-x544.google.com with SMTP id b10-v6so968638eds.4 for ; Wed, 22 Aug 2018 02:29:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=678R7l3BVyGmnVtgcIZ2TlZsEgKQuRk9nvdxvwyLld0=; b=a3KMGy75YTXQZ95p5d5zA3FSZBUByfaLb7OsEJxJ6DDsEk8EPPD7N7s9e9ntr3FY5w RFeOCpy6hGryu0GlZLOTBCccqTPX7iRF8/N6i5XluXqrxo3zQxoE69LjeiLvt/SKyypd IFCAbmSj+wNzxhz/2FVjWbAHt/nvYPPlcVV6oMaVGHEOaCkQKJHeFjpOUBDr8e7DiC/4 BbQfiAarHSkPBJWjjOSfRmLfptzsgmXVikkX6hyrLAhx/6qCyMzvyTlh1+h+fxrlNyqD e5gtsXNdzLqXO93IjosK85dWR9aVuJL8BFxWDFon+DmUbgMCAcZoBMkqxQUZRCmSfKVo krvQ== X-Gm-Message-State: AOUpUlH90XYVciKMKpQ3oNEUAPETBOYpbJ31yasMHCMIjfPG0KjqLnfG YtDEPdJ5JvEKFzPaMy8HgvJFpw== X-Google-Smtp-Source: AA+uWPyxSQ70eGIsltwWrAFxnmNi6Of+hnH/ON+mY9Gae7HCrnMyCutdHykIGBLSdo+vUeOLRoR8SQ== X-Received: by 2002:a50:c9c3:: with SMTP id c3-v6mr68118964edi.56.1534930150239; Wed, 22 Aug 2018 02:29:10 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-109.fiber7.init7.net. [212.51.149.109]) by smtp.gmail.com with ESMTPSA id p40-v6sm798034eda.53.2018.08.22.02.29.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Aug 2018 02:29:09 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Wed, 22 Aug 2018 11:29:05 +0200 Message-Id: <20180822092905.19884-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.18.0 Subject: [Intel-gfx] [PATCH] drm/syncobj: Drop add/remove_callback from driver interface X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Intel Graphics Development , Dave Airlie , Daniel Vetter MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This is used for handling future fences. Currently no driver use these, and I think given the new timeline fence proposed by KHR it would be better to have a more abstract interface for future fences. Could be something simple like a struct dma_future_fence plus a function to add a callback or wait for the fence to materialize. Then syncobj (and anything else really) could grow new functions to expose these two drivers. Normal dma_fence would then keep the nice guarantee that they will always signal (and through ordering, be deadlock free). dma_future_fence would then be the tricky one. This also fixes sphinx complaining about the kerneldoc. Cc: Jason Ekstrand Cc: Dave Airlie Cc: Chris Wilson Signed-off-by: Daniel Vetter Reviewed-by: Jason Ekstrand Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
--- drivers/gpu/drm/drm_syncobj.c | 15 --------------- include/drm/drm_syncobj.h | 5 ----- 2 files changed, 20 deletions(-) diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index adb3cb27d31e..3a8837c49639 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -120,14 +120,6 @@ static int drm_syncobj_fence_get_or_add_callback(struct drm_syncobj *syncobj, return ret; } -/** - * drm_syncobj_add_callback - adds a callback to syncobj::cb_list - * @syncobj: Sync object to which to add the callback - * @cb: Callback to add - * @func: Func to use when initializing the drm_syncobj_cb struct - * - * This adds a callback to be called next time the fence is replaced - */ void drm_syncobj_add_callback(struct drm_syncobj *syncobj, struct drm_syncobj_cb *cb, drm_syncobj_func_t func) @@ -136,13 +128,7 @@ void drm_syncobj_add_callback(struct drm_syncobj *syncobj, drm_syncobj_add_callback_locked(syncobj, cb, func); spin_unlock(&syncobj->lock); } -EXPORT_SYMBOL(drm_syncobj_add_callback); -/** - * drm_syncobj_add_callback - removes a callback to syncobj::cb_list - * @syncobj: Sync object from which to remove the callback - * @cb: Callback to remove - */ void drm_syncobj_remove_callback(struct drm_syncobj *syncobj, struct drm_syncobj_cb *cb) { @@ -150,7 +136,6 @@ void drm_syncobj_remove_callback(struct drm_syncobj *syncobj, list_del_init(&cb->node); spin_unlock(&syncobj->lock); } -EXPORT_SYMBOL(drm_syncobj_remove_callback); /** * drm_syncobj_replace_fence - replace fence in a sync object. diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h index 3980602472c0..e419c79ba94d 100644 --- a/include/drm/drm_syncobj.h +++ b/include/drm/drm_syncobj.h @@ -131,11 +131,6 @@ drm_syncobj_fence_get(struct drm_syncobj *syncobj) struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private, u32 handle); -void drm_syncobj_add_callback(struct drm_syncobj *syncobj, - struct drm_syncobj_cb *cb, - drm_syncobj_func_t func); -void drm_syncobj_remove_callback(struct drm_syncobj *syncobj, - struct drm_syncobj_cb *cb); void drm_syncobj_replace_fence(struct drm_syncobj *syncobj, struct dma_fence *fence); int drm_syncobj_find_fence(struct drm_file *file_private,