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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 B55F0C433E2 for ; Tue, 15 Sep 2020 10:40:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7DFED20B1F for ; Tue, 15 Sep 2020 10:40:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="ig5tEx0h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726330AbgIOKkI (ORCPT ); Tue, 15 Sep 2020 06:40:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726262AbgIOKjx (ORCPT ); Tue, 15 Sep 2020 06:39:53 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2A32C061788 for ; Tue, 15 Sep 2020 03:39:51 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id a2so2712259otr.11 for ; Tue, 15 Sep 2020 03:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ulpeSnyY5/ewevGEpTqNXhDdyzWhPxYuGEnSEK0qUFE=; b=ig5tEx0h7bfKi5EybZqA+C68o6gYUIfa+RfL190q/C/6enFMceUUZeuDygc7lBryyo Y39LD8nxmbQQ2ZpJi/7Bu1MrZHh+9AmFkAC82cd1/Ss7084QYOZc1Q6UWRtMFDibGKuJ Yhfx18xPVi60zG4gPhH/H78zP9lEy3I29XQis= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ulpeSnyY5/ewevGEpTqNXhDdyzWhPxYuGEnSEK0qUFE=; b=d1QxnP1BuGhXaXNFUqoSEkJ7IXkLLuQMR+kY5p/sRsgAems5fUClxJvxDjRPEYzAc8 7FOrCHCQ7cX3InkZXvRPyPBi7fCaQKZV6AhtmjD5ACWiZk7/tiMAA6QNVIBPPLDOnfvL KZn1A5jYQIE0E93tHZGIySpO4fqHwICgD0TNOr9ijjg9oEF9t+D4j/Z2aCqkGSUgciM/ l9gLbsTZjw7fFuZ/ptNt2j6CWmmd8IWwTUx0CG0a++Xj8YETjJOngY7vSLqykOGkEs7x cuxfiR7ZJHjgdTLR3coNQ+fR+AI4v/4GHcsPygjk2lqwNY6okJI8yTqICM5/01j6jcIg XsHQ== X-Gm-Message-State: AOAM531RHcjfJlDxtQ8s/cQRhAEftHf4ubu/542CMBe4PWX944PY/wJG G1CL9vbQu1Lo7DSssvIIZ7PcMXwT6JFkgcVPa9FJYQ== X-Google-Smtp-Source: ABdhPJzbKPKIRS8EfyunRCEi31t2CsfncQrKriVKuMZ+LvqfMKqrLvYa64Bhcsp3AhwdlFX/YDNiySv4RihZaKzNLEU= X-Received: by 2002:a05:6830:1e56:: with SMTP id e22mr11974578otj.303.1600166390649; Tue, 15 Sep 2020 03:39:50 -0700 (PDT) MIME-Version: 1.0 References: <20200914132920.59183-1-christian.koenig@amd.com> <20200914132920.59183-2-christian.koenig@amd.com> In-Reply-To: <20200914132920.59183-2-christian.koenig@amd.com> From: Daniel Vetter Date: Tue, 15 Sep 2020 12:39:39 +0200 Message-ID: Subject: Re: [PATCH 1/2] drm/shmem-helpers: revert "Redirect mmap for imported dma-buf" To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: Andrew Morton , Linux Kernel Mailing List , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Linux MM , "open list:DMA BUFFER SHARING FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 14, 2020 at 3:29 PM Christian K=C3=B6nig wrote: > > This reverts commit 26d3ac3cb04d171a861952e89324e347598a347f. > > We need to figure out if dma_buf_mmap() is valid or not first. > > Signed-off-by: Christian K=C3=B6nig The trouble is that doing dma-buf mmap by looking at the struct pages behind the sg list and just inserting those into userspace doesn't really work any better. You still won't get the unmap_mapping_range and hence pte shoot-down. So maybe dma_buf_mmap forwarding doesn't work, but this doesn't make it any better. Also commit message should probably explain a bit the context here, not a lot of people have been in our private discussion on this. -Daniel > --- > drivers/gpu/drm/drm_gem_shmem_helper.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm= _gem_shmem_helper.c > index 0a952f27c184..cd727343f72b 100644 > --- a/drivers/gpu/drm/drm_gem_shmem_helper.c > +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c > @@ -594,9 +594,6 @@ int drm_gem_shmem_mmap(struct drm_gem_object *obj, st= ruct vm_area_struct *vma) > /* Remove the fake offset */ > vma->vm_pgoff -=3D drm_vma_node_start(&obj->vma_node); > > - if (obj->import_attach) > - return dma_buf_mmap(obj->dma_buf, vma, 0); > - > shmem =3D to_drm_gem_shmem_obj(obj); > > ret =3D drm_gem_shmem_get_pages(shmem); > -- > 2.17.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel --=20 Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch