From patchwork Thu Apr 28 13:46:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 8971021 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 565CB9F1C1 for ; Thu, 28 Apr 2016 13:48:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8176520220 for ; Thu, 28 Apr 2016 13:48:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7B1CB201CE for ; Thu, 28 Apr 2016 13:48:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B5716ED22; Thu, 28 Apr 2016 13:48:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f193.google.com (mail-yw0-f193.google.com [209.85.161.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id 022D46ED22 for ; Thu, 28 Apr 2016 13:48:08 +0000 (UTC) Received: by mail-yw0-f193.google.com with SMTP id i22so5083615ywc.1 for ; Thu, 28 Apr 2016 06:48:07 -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=l2tSqDkutir2XnV2si7hcp0iLNfSYGW+8gSFhPedPHM=; b=UFtHO5MXLi7lUezST3PvxNubqDiApLWoF2hCrnh9pgUSFsH7Qi4fcIq3QOWDQ0iLld kB8eO/9jCV+q4TptGWsuhvu94H1jG1Pm00QtQScH6MgOvt9qIvipy8pB5ZGiFwylL2OV 7jTByX7mCM5LDGruB4RMyhnGblLcnjBksELaC+vkgWRG/StkguJjWE0lNw3AN+WoRifx P+ixgfSnBSjxjujGRgaTDcAHtbEQoEOVphS5rVi9sqEzoJtai0ye33BW1bmxiB9HsNsy uxEEJJ0LjK6o5r5qqqQ/jzxoYsT0XRcE6UFWc0NFWlL0RF1+PCL7G1TosYotS4I2Hd3U kjqQ== X-Gm-Message-State: AOPr4FWLM0xARbYf/n+C1KnN0qtn16yKkOu5q53c0c1LKcXs6WZCW12WpWoBPBlUZSW6vw== X-Received: by 10.37.15.85 with SMTP id 82mr8087778ybp.75.1461851286232; Thu, 28 Apr 2016 06:48:06 -0700 (PDT) Received: from jade.localdomain ([201.82.24.203]) by smtp.gmail.com with ESMTPSA id u22sm4722639ywe.28.2016.04.28.06.47.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Apr 2016 06:48:05 -0700 (PDT) From: Gustavo Padovan To: Greg Kroah-Hartman Subject: [PATCH v2 11/13] dma-buf/sync_file: de-stage sync_file Date: Thu, 28 Apr 2016 10:46:58 -0300 Message-Id: <1461851220-1583-12-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1461851220-1583-1-git-send-email-gustavo@padovan.org> References: <1461851220-1583-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 Reviewed-by: Daniel Vetter --- 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