From patchwork Mon Nov 18 10:35:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11249365 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 428D213A4 for ; Mon, 18 Nov 2019 10:36:25 +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 2B22120730 for ; Mon, 18 Nov 2019 10:36:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B22120730 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 484D56E260; Mon, 18 Nov 2019 10:36:01 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id F3ACA89FDE for ; Mon, 18 Nov 2019 10:35:57 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id q70so16760428wme.1 for ; Mon, 18 Nov 2019 02:35:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3U7cLwSgbZNJZGXvMba11nZHa9be8EKkAKU9BRa/sPk=; b=PQeBhLYoi23JhCl5MkvttNnyhMV0vKcrk9gLn9J9bgqnGmOWpPas4suF4m3Xr0fr6K z+PduSwS4a/HUuAOBjSnUbnyCU3qN5Cn1y3h7pyyIm7BXy4481H3YvYBQZY7XCGWcdjw H8gJYiWgwXYZYsWviD78+CrQBFnS1xaI9Oo5EzBMaipuB0LIB8r7wNkCzRJNyndaX3Yk OgiMDvYOr/d4f76ufKflIE3Ymclo0vPMx147jRm8TAkJo4PDdQy6CWCFe0bZL0YdjpKT OvAwzxJ+qjms9J0KWso9dO17xJVSEvRr+WqZ+paB0Fz0A1Zh/dATS7UNXTA0K34TRkLv 7/LQ== X-Gm-Message-State: APjAAAUsQemQ3xEswD5JTGPZIvrFvVubkHHHFEaubqzgmeVzHQcrwtFp CsqjJHvf41lrzeaiQr95eo1eDw== X-Google-Smtp-Source: APXvYqwaoBDpOQ9gC9LV0CLvIPoV5W1A6YdWKrCV0jvN9JZ7wEmDlR4Z3b4cMrPGgKZmeHxi6+VAKA== X-Received: by 2002:a7b:ce90:: with SMTP id q16mr27877582wmj.172.1574073356634; Mon, 18 Nov 2019 02:35:56 -0800 (PST) Received: from phenom.ffwll.local (212-51-149-96.fiber7.init7.net. [212.51.149.96]) by smtp.gmail.com with ESMTPSA id j2sm22749200wrt.61.2019.11.18.02.35.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 02:35:55 -0800 (PST) From: Daniel Vetter To: DRI Development Date: Mon, 18 Nov 2019 11:35:32 +0100 Message-Id: <20191118103536.17675-12-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191118103536.17675-1-daniel.vetter@ffwll.ch> References: <20191118103536.17675-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3U7cLwSgbZNJZGXvMba11nZHa9be8EKkAKU9BRa/sPk=; b=HXs1Q/93DL/Rpcsd/IUXh17iFjWaBaIeTBBR9O3Y9WA7G3rHrZWBMuxc9CpliewefF UiWUgs27rvwtjWJxwOOZnSDS4NwU8M6fOHTuItlnv5Gix7R7i2Sd+emDeeFyfRSKSmou eWSRqHdVwJj8fmWhs3Oo95gjZKxYreyAtEsPY= Subject: [Intel-gfx] [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pawel Osciak , Daniel Vetter , Intel Graphics Development , Tomasz Figa , Kyungmin Park , Daniel Vetter , linux-media@vger.kernel.org, Marek Szyprowski Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" No in-tree users left. Signed-off-by: Daniel Vetter Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Tomasz Figa Cc: linux-media@vger.kernel.org Acked-by: Marek Szyprowski Acked-by: Hans Verkuil --- Ack for merging this through drm trees very much appreciated. -Daniel --- drivers/media/common/videobuf2/videobuf2-dma-contig.c | 8 -------- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 8 -------- drivers/media/common/videobuf2/videobuf2-vmalloc.c | 8 -------- 3 files changed, 24 deletions(-) diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c index 44cd0e530bbd..d0c9dffe49e5 100644 --- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c +++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c @@ -335,13 +335,6 @@ static void vb2_dc_dmabuf_ops_release(struct dma_buf *dbuf) vb2_dc_put(dbuf->priv); } -static void *vb2_dc_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum) -{ - struct vb2_dc_buf *buf = dbuf->priv; - - return buf->vaddr ? buf->vaddr + pgnum * PAGE_SIZE : NULL; -} - static void *vb2_dc_dmabuf_ops_vmap(struct dma_buf *dbuf) { struct vb2_dc_buf *buf = dbuf->priv; @@ -360,7 +353,6 @@ static const struct dma_buf_ops vb2_dc_dmabuf_ops = { .detach = vb2_dc_dmabuf_ops_detach, .map_dma_buf = vb2_dc_dmabuf_ops_map, .unmap_dma_buf = vb2_dc_dmabuf_ops_unmap, - .map = vb2_dc_dmabuf_ops_kmap, .vmap = vb2_dc_dmabuf_ops_vmap, .mmap = vb2_dc_dmabuf_ops_mmap, .release = vb2_dc_dmabuf_ops_release, diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c index ed706b2a263c..6db60e9d5183 100644 --- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c +++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c @@ -470,13 +470,6 @@ static void vb2_dma_sg_dmabuf_ops_release(struct dma_buf *dbuf) vb2_dma_sg_put(dbuf->priv); } -static void *vb2_dma_sg_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum) -{ - struct vb2_dma_sg_buf *buf = dbuf->priv; - - return buf->vaddr ? buf->vaddr + pgnum * PAGE_SIZE : NULL; -} - static void *vb2_dma_sg_dmabuf_ops_vmap(struct dma_buf *dbuf) { struct vb2_dma_sg_buf *buf = dbuf->priv; @@ -495,7 +488,6 @@ static const struct dma_buf_ops vb2_dma_sg_dmabuf_ops = { .detach = vb2_dma_sg_dmabuf_ops_detach, .map_dma_buf = vb2_dma_sg_dmabuf_ops_map, .unmap_dma_buf = vb2_dma_sg_dmabuf_ops_unmap, - .map = vb2_dma_sg_dmabuf_ops_kmap, .vmap = vb2_dma_sg_dmabuf_ops_vmap, .mmap = vb2_dma_sg_dmabuf_ops_mmap, .release = vb2_dma_sg_dmabuf_ops_release, diff --git a/drivers/media/common/videobuf2/videobuf2-vmalloc.c b/drivers/media/common/videobuf2/videobuf2-vmalloc.c index 04d51ca63223..4d5af352e249 100644 --- a/drivers/media/common/videobuf2/videobuf2-vmalloc.c +++ b/drivers/media/common/videobuf2/videobuf2-vmalloc.c @@ -319,13 +319,6 @@ static void vb2_vmalloc_dmabuf_ops_release(struct dma_buf *dbuf) vb2_vmalloc_put(dbuf->priv); } -static void *vb2_vmalloc_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum) -{ - struct vb2_vmalloc_buf *buf = dbuf->priv; - - return buf->vaddr + pgnum * PAGE_SIZE; -} - static void *vb2_vmalloc_dmabuf_ops_vmap(struct dma_buf *dbuf) { struct vb2_vmalloc_buf *buf = dbuf->priv; @@ -344,7 +337,6 @@ static const struct dma_buf_ops vb2_vmalloc_dmabuf_ops = { .detach = vb2_vmalloc_dmabuf_ops_detach, .map_dma_buf = vb2_vmalloc_dmabuf_ops_map, .unmap_dma_buf = vb2_vmalloc_dmabuf_ops_unmap, - .map = vb2_vmalloc_dmabuf_ops_kmap, .vmap = vb2_vmalloc_dmabuf_ops_vmap, .mmap = vb2_vmalloc_dmabuf_ops_mmap, .release = vb2_vmalloc_dmabuf_ops_release,