Received: by 10.223.176.5 with SMTP id f5csp179406wra; Tue, 30 Jan 2018 09:48:46 -0800 (PST) X-Google-Smtp-Source: AH8x227cmZ4dhiS5F8Wjfeq34fxgJAZ64qwFCsEfZnuKjVnkpOF18oJdgtLPzV+gxj75Ny7oPEGz X-Received: by 10.101.66.131 with SMTP id j3mr23840874pgp.56.1517334526067; Tue, 30 Jan 2018 09:48:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517334526; cv=none; d=google.com; s=arc-20160816; b=NVtxxjnGNQ1MZioe5g2A60fIT0h8/7/kGCiN6PRXIPR5Oo0tRHeMw+x5+sDlvvJN7L SVcYfPVh/0oEL+b0qzFccCuzBcerB1TYi4tcxCxVMIVWTjd0baSXOsmtY/UD5F/lXbH4 1MiHzFS2/Gb5aMlpbWM1hMOXx0+5JVm8o4eNSdXDEzqqmh1Q2MK4RxotJlyLBYKBBRag WZaR/Xe+v6kxqPPZC7AD6FipS3Bov06DfXorzR85CFEbQg92UA7YUjTHGuTblIOV3NKa QMqrFLPpjh7jLnLKLI5Rjxk3wSgnpMeAZSqbhtEdZb2eD3VNJBqQSiGrXA1AG/R/hamc yN8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=0szitHBkvYq63GS32YX6dNQBCCWD5FLMWBV+mzYWmsk=; b=jcGdmWOxVv0BzdlEKVhy3fYaO84vo8pGr2lgkR8cJvzsdn+JBW+FK/YsBX8M1DO0wi muVOSMvWziYQxlrKaMqC+OvysPkTs45Jlvs7OESJYZ1shxQ80I9qbl4QFII17KXyrJ1y fNrMJZZn2sYN3thAzH58rIXzvBGQvageit5TxPAvKAWvQlqK11+3OXWDaIUJzTx1dria vN6YlZKB2H20ukIoWCTB9H0yLbh3wd39QRKy51+SZm0S6HIGXXmsajcTsp/7k6S3Ufc/ SnGKOOKZjzYc1fJJqtMtZzjmhlNp1Dx4njfRSokKOfWtGBZyVt9mv/0XfsSULLqmMiJc EgqA== 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 g124si2396839pgc.114.2018.01.30.09.48.29; Tue, 30 Jan 2018 09:48:46 -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 S1753005AbeA3Prh (ORCPT + 99 others); Tue, 30 Jan 2018 10:47:37 -0500 Received: from mga03.intel.com ([134.134.136.65]:9326 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbeA3Prg (ORCPT ); Tue, 30 Jan 2018 10:47:36 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2018 07:47:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,435,1511856000"; d="scan'208";a="26659553" Received: from unknown (HELO alexey-System-Product-Name.iil.intel.com) ([10.236.193.125]) by fmsmga001.fm.intel.com with ESMTP; 30 Jan 2018 07:47:31 -0800 From: Alexey Skidanov To: devel@driverdev.osuosl.org, labbott@redhat.com Cc: linux-kernel@vger.kernel.org, Alexey Skidanov Subject: [PATCH] staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap Date: Tue, 30 Jan 2018 17:47:38 +0200 Message-Id: <1517327258-26961-1-git-send-email-alexey.skidanov@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Alexey Skidanov --- drivers/staging/android/ion/ion.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index f480885..4f1dc7f 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -327,6 +327,17 @@ static void ion_dma_buf_kunmap(struct dma_buf *dmabuf, unsigned long offset, { } +static void *ion_dma_buf_vmap(struct dma_buf *dmabuf) +{ + struct ion_buffer *buffer = dmabuf->priv; + + return buffer->vaddr; +} + +static void ion_dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) +{ +} + static int ion_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction) { @@ -388,6 +399,8 @@ static const struct dma_buf_ops dma_buf_ops = { .unmap_atomic = ion_dma_buf_kunmap, .map = ion_dma_buf_kmap, .unmap = ion_dma_buf_kunmap, + .vmap = ion_dma_buf_vmap, + .vunmap = ion_dma_buf_vunmap }; int ion_alloc(size_t len, unsigned int heap_id_mask, unsigned int flags) -- 2.7.4