Received: by 10.223.176.5 with SMTP id f5csp238910wra; Tue, 6 Feb 2018 21:28:18 -0800 (PST) X-Google-Smtp-Source: AH8x2267vaPQ/heNVphHGgyIqzTixl5MKlHKZPLiZTR6u+hQqmjoZQjmByecqteGT9z8LyqLz5T6 X-Received: by 10.98.49.199 with SMTP id x190mr4807654pfx.1.1517981298619; Tue, 06 Feb 2018 21:28:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517981298; cv=none; d=google.com; s=arc-20160816; b=z7I/Fw/If/aS1MCNpY2EC7LaHJWYrc4HMOlpIaEn2TI9wHIxT5u/nby5GVkAY8h5gX KeOjlqQ53AFPzLsnu+Tbp+OlDx23xipoGsH1MOYxt9y7ypy5bZagHdn1bda58OJ/ANnt HosXboi2LuAOHexJqUSpN+9Ki4mjZ9aDZBhpR4ye9DhUXYDBeb0SOe8fH/n2Oc13KsK+ dPrJoYxNICdHrKK8DncWPs+WSqqBEpLvAhsCQPuiqDT9f7aRRD06soQOaNoeWIQMsTyo JQQTDpnt9pRtxlA6U/5NAo3iotj6+uZkGbjhs1LknCkS/a9hCj9fdEeh0rPnZyC6cedS l6aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=C3w+f3ep43K/Mng8aZd+COOgiFQ3O632obH8mqAo0Z0=; b=AzcIJIsepRHeT31k1KL3q+W43pYn7jVm/iVcsOy1ogM5g+mvvIA9vESmYWWJ3jPK/E J/K/C85mMYnyPBgtPjIL99j8/aUNHoQ9k/oK5Q96GuIdGOlR6uEtpNp444FcIoCu8j/e Rnto0j91riwedHaFd1DdaWezoEjEb3bua3T98JIE+o0Nndki6fu2zULu9q9xA4IUAnQH u7uVaW5hh2PAN1Q7jIBYUs1l7C1E5kxIA45d6Tukkehmw1kOo+9cKVAT1jC68cnPmwyc tbTZtfhGF24ps3aQqotiIfxzYBEkFzElwCo4GsCrE8zTw04FNDtmV3J8x91cTG652itg knGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si460184pgr.821.2018.02.06.21.27.29; Tue, 06 Feb 2018 21:28:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750922AbeBGFZu (ORCPT + 99 others); Wed, 7 Feb 2018 00:25:50 -0500 Received: from mga04.intel.com ([192.55.52.120]:38125 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750720AbeBGFZt (ORCPT ); Wed, 7 Feb 2018 00:25:49 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2018 21:25:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,471,1511856000"; d="scan'208";a="17849599" Received: from alexey-system-product-name.iil.intel.com (HELO [10.236.193.131]) ([10.236.193.131]) by fmsmga002.fm.intel.com with ESMTP; 06 Feb 2018 21:25:31 -0800 Subject: Re: [PATCH v3] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap To: Laura Abbott , Greg KH Cc: devel@driverdev.osuosl.org, tkjos@android.com, rve@android.com, linux-kernel@vger.kernel.org, maco@android.com, sumit.semwal@linaro.org References: <1517400222-2854-1-git-send-email-alexey.skidanov@intel.com> <20180131130047.GA22917@kroah.com> <89be45dd-ac0e-4efb-2b21-e6c07b0cd66e@intel.com> From: Alexey Skidanov Message-ID: <7d836085-cd8d-300b-56be-e8db4ff37afc@intel.com> Date: Wed, 7 Feb 2018 07:25:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/07/2018 01:56 AM, Laura Abbott wrote: > On 01/31/2018 10:10 PM, Alexey Skidanov wrote: >> >> On 01/31/2018 03:00 PM, Greg KH wrote: >>> On Wed, Jan 31, 2018 at 02:03:42PM +0200, Alexey Skidanov wrote: >>>> Any driver may access shared buffers, created by ion, using >>>> dma_buf_vmap and >>>> dma_buf_vunmap dma-buf API that maps/unmaps previosuly allocated >>>> buffers into >>>> the kernel virtual address space. The implementation of these API is >>>> missing in >>>> the current ion implementation. >>>> >>>> Signed-off-by: Alexey Skidanov >>>> --- >>> >>> No review from any other Intel developers? :( >> Will add. >>> >>> Anyway, what in-tree driver needs access to these functions? >> I'm not sure that there are the in-tree drivers using these functions >> and ion as> buffer exporter because they are not implemented in ion :) >> But there are some in-tre> drivers using these APIs (gpu drivers) with >> other buffer exporters. > > It's still not clear why you need to implement these APIs. How the importing kernel module may access the content of the buffer? :) With the current ion implementation it's only possible by dma_buf_kmap, mapping one page at a time. For pretty large buffers, it might have some performance impact. (Probably, the page by page mapping is the only way to access large buffers on 32 bit systems, where the vmalloc range is very small. By the way, the current ion dma_map_kmap doesn't really map only 1 page at a time - it uses the result of vmap() that might fail on 32 bit systems.) > Are you planning to use Ion with GPU drivers? I'm especially > interested in this if you have a non-Android use case. Yes, my use case is the non-Android one. But not with GPU drivers. > > Thanks, > Laura Thanks, Alexey