From patchwork Sun Jul 11 14:05:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 12369167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 184B7C07E96 for ; Sun, 11 Jul 2021 14:06:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B681261167 for ; Sun, 11 Jul 2021 14:06:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B681261167 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E3D7689BCD; Sun, 11 Jul 2021 14:06:12 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id CEDF389598; Sun, 11 Jul 2021 14:06:11 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id A8C7161167; Sun, 11 Jul 2021 14:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626012370; bh=HLSq+Yauw46XSnh1gDxK4lm/+yT/5Pe4lHG6h8wLuEw=; h=From:To:Cc:Subject:Date:From; b=qOaetmf+BgnziXdmdC3Bz6NXwoTFT1GrJG2OYiPhLM4mekfP2IZVtA39K4LqznVUy Mvxcd9jq6j+kM2oehDuNrLydp6UTPEtQU0HiNeZ2pMuU54jjTt763Q9++bLdvrIxQ+ JACVL1ZxFfcVMAYJOgcswFUrFqz+w+89kuYJZnxX45llk6Y4bOTf2u2EHxkM9f/g55 ufSL67ZTvnT8qoxL76iYAXrt/J9TZ87nRN58MHse9ZdSML2CJDgc6pSeGIOYrV5adi EnRdL+FG1JaasWQYKT48sZJ3bp/0lbtqOd2LTkVbgFd6j7dSBSHynKknqHqNZNXbWm vLcrN3M/V0QeQ== From: Oded Gabbay To: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, jgg@ziepe.ca Subject: [PATCH v5 0/2] Add p2p via dmabuf to habanalabs Date: Sun, 11 Jul 2021 17:05:59 +0300 Message-Id: <20210711140601.7472-1-ogabbay@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rdma@vger.kernel.org, daniel.vetter@ffwll.ch, sleybo@amazon.com, galpress@amazon.com, dri-devel@lists.freedesktop.org, christian.koenig@amd.com, linaro-mm-sig@lists.linaro.org, dledford@redhat.com, hch@lst.de, amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com, leonro@nvidia.com, linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, This is v5 of this patch-set following again a long email thread. It contains fixes to the implementation according to the review that Jason did on v4. Jason, I appreciate your feedback. If you can take another look to see I didn't miss anything that would be great. The details of the fixes are in the changelog in the commit message of the second patch. There was one issue with your proposal to set the orig_nents to 0. I did that, but I also had to restore it to nents before calling sg_free_table because that function uses orig_nents to iterate. Thanks, Oded Oded Gabbay (1): habanalabs: define uAPI to export FD for DMA-BUF Tomer Tayar (1): habanalabs: add support for dma-buf exporter drivers/misc/habanalabs/Kconfig | 1 + drivers/misc/habanalabs/common/habanalabs.h | 22 + drivers/misc/habanalabs/common/memory.c | 522 +++++++++++++++++++- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/goya/goya.c | 1 + include/uapi/misc/habanalabs.h | 28 +- 6 files changed, 570 insertions(+), 5 deletions(-) Reviewed-by: Greg Kroah-Hartman