From patchwork Tue Dec 3 01:36:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurchetan Singh X-Patchwork-Id: 11270135 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 8788413B6 for ; Tue, 3 Dec 2019 01:36:40 +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 62D6A206E1 for ; Tue, 3 Dec 2019 01:36:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62D6A206E1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.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 022106E042; Tue, 3 Dec 2019 01:36:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by gabe.freedesktop.org (Postfix) with ESMTPS id D60E66E042 for ; Tue, 3 Dec 2019 01:36:35 +0000 (UTC) Received: by mail-pj1-x1044.google.com with SMTP id l4so747365pjt.5 for ; Mon, 02 Dec 2019 17:36:35 -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:mime-version :content-transfer-encoding; bh=eyMX2jKq1sPFGtoRJAfpFto0SNDC6mF6mb3kZ39tKjo=; b=pzogdz6Yu2Sa/j8vaPos47bQJcBZfPaiMvWxdXXzI1UwilqbMt+/6Eu80aoN3INMvT 9IeW91Hd5UC2SZ1P1b+jCUyRNPo7wSUORzLBD5nvY04/n34Iz0LuRHCrtsV0s1qjtEiz XGgIe8mynjxfZsclJjmQMgXrMaIb50KUjsrzZIQObL2EDcaCzDzBNuBRmjzGuWfhjzG8 MJK0pkFpGcrIIPILKnJ14TagqnjvlW8hkHxAiocuJNSw24WYONqIowpKC+Jf7twr3CFe +8LK/4cVhSCrqvyFPAppl16IhrsjJupSJCyhtSbQtwHB7Pl7CL2uuksUWfHtjIEPmh3D h2eg== X-Gm-Message-State: APjAAAUNyzEt8Yv3+z7wgzDVU9c6zr7mnMcUhalP27e7fEvLye4zPnTg rYwrUcCG7CGTsWHCzonMzM2QpLJmPtY= X-Google-Smtp-Source: APXvYqwaGMHA5NbDfKUFoHH4ANQHr1Y1bjq723bn9RFW476GDxLJC3uYOtkZJGlgQEd1n7JCcbNepg== X-Received: by 2002:a17:902:68:: with SMTP id 95mr2375780pla.117.1575336995095; Mon, 02 Dec 2019 17:36:35 -0800 (PST) Received: from gurchetansingh0.mtv.corp.google.com ([2620:15c:202:201:bc97:5740:52a7:6875]) by smtp.gmail.com with ESMTPSA id r4sm581916pji.11.2019.12.02.17.36.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Dec 2019 17:36:34 -0800 (PST) From: Gurchetan Singh To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/4] udmabuf: use cache_sgt_mapping option Date: Mon, 2 Dec 2019 17:36:24 -0800 Message-Id: <20191203013627.85991-1-gurchetansingh@chromium.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eyMX2jKq1sPFGtoRJAfpFto0SNDC6mF6mb3kZ39tKjo=; b=EQ0wbwx9vwY2J+uurdI+PHBch3oyfTJsCq6Dt8lSeOJYdC4cSeAjfvsCBhHGPNQ91L 1/9NpmuuASlHjrzI2PPM7o2sp05KlDnmd78lbQ9Ny/amY9uQSib1dCPmO8ZKzY5aLGHn rXnnIPLpffPYzUTiG/zNMv5sMZvIQ6Zaa3ZTw= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gurchetan Singh , kraxel@redhat.com, hch@lst.de Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The GEM prime helpers do it, so should we. It's also possible to make it optional later. Signed-off-by: Gurchetan Singh --- drivers/dma-buf/udmabuf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 9de539c1def4..be15eb6b0586 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c @@ -94,10 +94,11 @@ static void release_udmabuf(struct dma_buf *buf) } static const struct dma_buf_ops udmabuf_ops = { - .map_dma_buf = map_udmabuf, - .unmap_dma_buf = unmap_udmabuf, - .release = release_udmabuf, - .mmap = mmap_udmabuf, + .cache_sgt_mapping = true, + .map_dma_buf = map_udmabuf, + .unmap_dma_buf = unmap_udmabuf, + .release = release_udmabuf, + .mmap = mmap_udmabuf, }; #define SEALS_WANTED (F_SEAL_SHRINK)