From patchwork Tue May 22 12:34:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 8868 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 69A1223EB5 for ; Tue, 22 May 2012 12:38:50 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1B887A18B19 for ; Tue, 22 May 2012 12:38:50 +0000 (UTC) Received: by yenq6 with SMTP id q6so6492027yen.11 for ; Tue, 22 May 2012 05:38:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to :date:message-id:x-scanned-by:subject:x-beenthere:x-mailman-version :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=tPn4ezbJFB61KKEY/fjs5+z3Il+ImLcZGAYsWgGvsZw=; b=iAqMXFO1wo7A1gcZj+hwQevMVI/XhR30aamntEQ02G/HwKTWIbKOXPu9yHZJIgUhBv TEKO299OUvglRfEjociKreuRIppycw8QAeZdRTUs1XFbjipbeTlMpRWr4o8VBhA+/4YL PibmjTKPiP6ZxTGysuiXCdSbRetyWH67sVzWKiun/YfLm3df8W1trsQbaNTWa7cgvTEg 5lV9w/06/YKDcsV8+DHMmCgOfuclrLT0S9AjwHHishEQ6v3nQTWvyjTwBoJH0bqUwZjD SJD9sfzJLCJlVt5Puo8qNTHV2lTUD6ReC7JNTOGAX3Unkz9sSFijSekvJ0YqhO3emWob 9gEg== Received: by 10.50.185.233 with SMTP id ff9mr9238991igc.57.1337690329231; Tue, 22 May 2012 05:38:49 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.35.72 with SMTP id o8csp363400ibd; Tue, 22 May 2012 05:38:48 -0700 (PDT) Received: by 10.180.82.5 with SMTP id e5mr34611223wiy.0.1337690327930; Tue, 22 May 2012 05:38:47 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id c4si14851751wie.21.2012.05.22.05.38.46; Tue, 22 May 2012 05:38:47 -0700 (PDT) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SWoMO-0007wv-NS; Tue, 22 May 2012 12:38:44 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SWoMM-0007wc-Fu for linaro-mm-sig@lists.linaro.org; Tue, 22 May 2012 12:38:42 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4MCcfgP021746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 May 2012 08:38:41 -0400 Received: from optimus.redhat.com (vpn1-6-158.ams2.redhat.com [10.36.6.158]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4MCcd4V010799; Tue, 22 May 2012 08:38:40 -0400 From: Dave Airlie To: linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org Date: Tue, 22 May 2012 13:34:38 +0100 Message-Id: <1337690078-5277-1-git-send-email-airlied@gmail.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Subject: [Linaro-mm-sig] [PATCH] dma-buf: add initial vmap documentation X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQkyDrsS1IWxYSKRKoV5Ry2wpsjyz37QPwtBz6t00v3JhA5vKEC4N9e+ssqn+8Ixcgjrqqzg From: Dave Airlie Signed-off-by: Dave Airlie --- Documentation/dma-buf-sharing.txt | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt index 3bbd5c5..98e9fa0 100644 --- a/Documentation/dma-buf-sharing.txt +++ b/Documentation/dma-buf-sharing.txt @@ -300,6 +300,17 @@ Access to a dma_buf from the kernel context involves three steps: Note that these calls need to always succeed. The exporter needs to complete any preparations that might fail in begin_cpu_access. + For some circumstances the overhead of kmap can be too high, a vmap interface + is introduced. This interface shouldn't be used very carefully, as vmalloc + space is a limited resources on many architectures. + + Interfaces: + void *dma_buf_vmap(struct dma_buf *dmabuf) + void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) + + This call can fail if there is no vmap support in the exporter, or if it + runs out of vmalloc space. Fallback to kmap should be implemented. + 3. Finish access When the importer is done accessing the range specified in begin_cpu_access,