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=-3.5 required=3.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 8C10CC4742C for ; Fri, 30 Oct 2020 08:24:30 +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 D0B0A22228 for ; Fri, 30 Oct 2020 08:24:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0B0A22228 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com 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 263606ECEB; Fri, 30 Oct 2020 08:23:23 +0000 (UTC) Received: from mail3-165.sinamail.sina.com.cn (mail3-165.sinamail.sina.com.cn [202.108.3.165]) by gabe.freedesktop.org (Postfix) with SMTP id 590066E93E for ; Fri, 30 Oct 2020 02:47:55 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([103.193.190.174]) by sina.com with ESMTP id 5F9B7ED80001B06B; Fri, 30 Oct 2020 10:47:54 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 271796629001 From: Hillf Danton To: John Stultz Subject: Re: [PATCH v4 7/7] dma-buf: system_heap: Add a system-uncached heap re-using the system heap Date: Fri, 30 Oct 2020 10:47:46 +0800 Message-Id: <20201030024746.3128-1-hdanton@sina.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 30 Oct 2020 08:23:17 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: James Jones , Robin Murphy , Liam Mark , lkml , Christoph Hellwig , dri-devel , Ezequiel Garcia , linux-media Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, 29 Oct 2020 15:28:34 -0700 John Stultz wrote: > On Thu, Oct 29, 2020 at 12:10 AM Hillf Danton wrote: > > On Thu, 29 Oct 2020 00:16:24 +0000 John Stultz wrote: > > > @@ -194,6 +210,9 @@ static int system_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) > > > struct sg_page_iter piter; > > > int ret; > > > > > > + if (buffer->uncached) > > > + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); > > > + > > > > Wonder why you turn back to dma_mmap_wc() and friends? > > Sorry, can you expand on what you are proposing here instead? I'm not > sure I see how dma_alloc/mmap/*_wc() quite fits here. I just wondered if *_wc() could save you two minutes or three. Can you shed some light on your concerns about their unfitness? _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel