From patchwork Wed Apr 27 16:27:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 8959951 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CA5A2BF29F for ; Wed, 27 Apr 2016 16:29:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9C8E2026F for ; Wed, 27 Apr 2016 16:29:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E4EA520259 for ; Wed, 27 Apr 2016 16:29:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBE686EB90; Wed, 27 Apr 2016 16:29:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f196.google.com (mail-yw0-f196.google.com [209.85.161.196]) by gabe.freedesktop.org (Postfix) with ESMTPS id A0E996EB8D for ; Wed, 27 Apr 2016 16:28:18 +0000 (UTC) Received: by mail-yw0-f196.google.com with SMTP id v81so312503ywa.2 for ; Wed, 27 Apr 2016 09:28:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dccS1F9GTJktVPelJhJkkI4vDe8WQ9YdD5yDwKhrrH0=; b=nJ43DLFrH3quD+2IC9qgv2PkNVm1yiJPurO2EhgLXXxeHGE1IvH8+PgaA+WepVfeNh uIsP0fbhWZjJQ6aopVIVm0IrOsoHkJCkiEhFChkFZaed61TKrwTtd00M8Y/sbw61ynVp crgdDrNMMA3nbqDQACG+oJXuWaqx/cGICKZ/foo+G7vf3ssxHbmtEaFAeEU++k0olGYt SrylOrMxgdWxVJDFgebUT4xNjvimmzBLK5mYq27yZjkgTPjcsPGjFWQC0DjIIrPq1CZg THrKq/Dj1z0Q0EIzCg5ro+R5GMikmhtztv+Br/isoY0WKuU7sZQOg+juAq0dJvnXOun2 YkvQ== X-Gm-Message-State: AOPr4FXqiXTahcYYMsSEo/D49Nq5/sek83j2wPEM0KjMYiGnUAelnX+H9ssJHV/mnudO6Q== X-Received: by 10.129.82.140 with SMTP id g134mr6130359ywb.27.1461774496498; Wed, 27 Apr 2016 09:28:16 -0700 (PDT) Received: from jade.localdomain ([201.82.24.203]) by smtp.gmail.com with ESMTPSA id k80sm2308816ywe.31.2016.04.27.09.28.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Apr 2016 09:28:09 -0700 (PDT) From: Gustavo Padovan To: Greg Kroah-Hartman Subject: [PATCH 10/12] dma-buf/sync_file: de-stage sync_file Date: Wed, 27 Apr 2016 13:27:17 -0300 Message-Id: <1461774439-11512-11-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1461774439-11512-1-git-send-email-gustavo@padovan.org> References: <1461774439-11512-1-git-send-email-gustavo@padovan.org> Cc: devel@driverdev.osuosl.org, Daniel Stone , Daniel Vetter , Riley Andrews , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Gustavo Padovan , John Harrison X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan sync_file is useful to connect one or more fences to the file. The file is used by userspace to track fences between drivers that share DMA bufs. Signed-off-by: Gustavo Padovan --- drivers/Kconfig | 2 ++ drivers/dma-buf/Kconfig | 11 +++++++++++ drivers/dma-buf/Makefile | 1 + drivers/{staging/android => dma-buf}/sync_file.c | 0 drivers/staging/android/Kconfig | 1 + drivers/staging/android/Makefile | 2 +- 6 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 drivers/dma-buf/Kconfig rename drivers/{staging/android => dma-buf}/sync_file.c (100%) diff --git a/drivers/Kconfig b/drivers/Kconfig index d2ac339..430f761 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -114,6 +114,8 @@ source "drivers/rtc/Kconfig" source "drivers/dma/Kconfig" +source "drivers/dma-buf/Kconfig" + source "drivers/dca/Kconfig" source "drivers/auxdisplay/Kconfig" diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig new file mode 100644 index 0000000..9824bc4 --- /dev/null +++ b/drivers/dma-buf/Kconfig @@ -0,0 +1,11 @@ +menu "DMABUF options" + +config SYNC_FILE + bool "sync_file support for fences" + default n + select ANON_INODES + select DMA_SHARED_BUFFER + ---help--- + This option enables the fence framework synchronization to export + sync_files to userspace that can represent one or more fences. +endmenu diff --git a/drivers/dma-buf/Makefile b/drivers/dma-buf/Makefile index 57a675f..4a424ec 100644 --- a/drivers/dma-buf/Makefile +++ b/drivers/dma-buf/Makefile @@ -1 +1,2 @@ obj-y := dma-buf.o fence.o reservation.o seqno-fence.o +obj-$(CONFIG_SYNC_FILE) += sync_file.o diff --git a/drivers/staging/android/sync_file.c b/drivers/dma-buf/sync_file.c similarity index 100% rename from drivers/staging/android/sync_file.c rename to drivers/dma-buf/sync_file.c diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig index 4244821..7a3a77e 100644 --- a/drivers/staging/android/Kconfig +++ b/drivers/staging/android/Kconfig @@ -38,6 +38,7 @@ config SW_SYNC bool "Software synchronization objects" default n depends on SYNC + depends on SYNC_FILE ---help--- A sync object driver that uses a 32bit counter to coordinate synchronization. Useful when there is no hardware primitive backing diff --git a/drivers/staging/android/Makefile b/drivers/staging/android/Makefile index ebc2df1..980d6dc 100644 --- a/drivers/staging/android/Makefile +++ b/drivers/staging/android/Makefile @@ -4,5 +4,5 @@ obj-y += ion/ obj-$(CONFIG_ASHMEM) += ashmem.o obj-$(CONFIG_ANDROID_LOW_MEMORY_KILLER) += lowmemorykiller.o -obj-$(CONFIG_SYNC) += sync_file.o sync.o sync_debug.o +obj-$(CONFIG_SYNC) += sync.o sync_debug.o obj-$(CONFIG_SW_SYNC) += sw_sync.o