From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2926EC432C3 for ; Fri, 12 Mar 2021 16:38:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BF246500F for ; Fri, 12 Mar 2021 16:38:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232613AbhCLQhv (ORCPT ); Fri, 12 Mar 2021 11:37:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231925AbhCLQhU (ORCPT ); Fri, 12 Mar 2021 11:37:20 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B274C061574; Fri, 12 Mar 2021 08:37:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8+yBt1tlguv6Ba21H17woo0c/ker/pZc6AgxTt64QlQ=; b=WKf4DfEgucV/RLoMHAkGK7aHie YUp9SDuPPEytESE+4FGx9e6ap27KibBmpCZEAdV88sGr0hYIXoYaFPtC96mRIVrlHaIwq8DP5tslh 5gm92eGlY4HQLhqLKlpPhy4th/5CiqFLP+47QTqBGec+KUGYhmQ7oTXanTBSMIcDFwytbowD4V3Or 3CYchrA//fXZsL6sOmyW81tHk3hX0i26fdLUTXzq0LMHxuy8LBKrsj3ae4PHeWccDXe/MuOwEjkHG /0eq4riyfv/s+Z1PL84AzDja2E1/SD18EchgTO/ibRmwG7tZnzSPfwx6/gmP9Gm/cDYIqmlvKNqs8 ayheNZag==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lKkm2-00B91g-JK; Fri, 12 Mar 2021 16:36:29 +0000 Date: Fri, 12 Mar 2021 16:36:26 +0000 From: Christoph Hellwig To: Paul Cercueil Cc: Christoph Hellwig , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sam Ravnborg , od@zcrc.me, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH v2 3/5] drm: Add and export function drm_gem_cma_mmap_noncoherent Message-ID: <20210312163626.GA2655841@infradead.org> References: <20210307202835.253907-1-paul@crapouillou.net> <20210307202835.253907-4-paul@crapouillou.net> <20210311122642.GB1739082@infradead.org> <3I1TPQ.E55GRWWDYVRG@crapouillou.net> <20210311123642.GA1741910@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 11, 2021 at 04:12:55PM +0000, Paul Cercueil wrote: > ret = dma_mmap_pages(cma_obj->base.dev->dev, > vma, vma->vm_end - vma->vm_start, > virt_to_page(cma_obj->vaddr)); > > It works fine. > > I think I can use remap_pfn_range() for now, and switch to your new API once > it's available in drm-misc-next. No, drivers must not use dma_to_phys, and they also must not include dma-direct.h.