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.9 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 89225C47095 for ; Wed, 7 Oct 2020 13:42:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39E6621548 for ; Wed, 7 Oct 2020 13:42:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="oRN0ouP+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728480AbgJGNmh (ORCPT ); Wed, 7 Oct 2020 09:42:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728441AbgJGNmg (ORCPT ); Wed, 7 Oct 2020 09:42:36 -0400 Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92AACC0613D3 for ; Wed, 7 Oct 2020 06:42:36 -0700 (PDT) Received: by mail-qv1-xf41.google.com with SMTP id w5so1117877qvn.12 for ; Wed, 07 Oct 2020 06:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bm7Nux/xb6SXj9ZR29eQsCeZolUUGIlGA/3pCXOWnqY=; b=oRN0ouP+3GVYiwbPUcOxPk+cVTMSfi6e6xB/kp+ZpPLA+3QEn3FltuYnLYp3IbMyT4 XLTyLwYzH3ifqaZnXaU/ZWFyM48epTsFUjsHkhU0idcCtjI43xlPcUDIQI5i97qJQ1Z/ hmWU0XhKPvhi2J7X6OI+NOkn5m1fjar7B+5a/IGgH6kfN1aHK788jThYwphFUhnE71h5 QymuBRmevVtIbPPsb8/x5Mk95uTwIXwCIbZATz13huzt0//nPIRFE0pqbC5dvTfYdelP 5WCCE51W2P5JcKqcJp27ijUk9DzYAmgp+0NhYYdt4Crdv5HPqfR+eWr9bpKdWw5SdwKY eKWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bm7Nux/xb6SXj9ZR29eQsCeZolUUGIlGA/3pCXOWnqY=; b=IYGvudGKt/CpnMDBe8kvjyRdD0S1aJ44FLmg1ZHToSkldlupkH6kSqObtRPjAJUlgJ UEXaMgQgvZ6b+DkW1Q5SUuUOmZ9gYrJ7rPY8YqohT0fQUv2qdlbJjOuf+rdjxAoV4TBb Qhe5eaLGEdIRaYJgR4hGxw51QmfJuVfnhGS1mZJsY9/oq/ylEDpfEyYjQdQ0Uhj2HYy8 PgoTrDbv7g9IZarflhKEDKKReYsybgDOINPJoKBy9uz6trOzf1EVfWqWs0T9PZAilMx3 rrca0sYIYaVrBzOiwNmNxAtbowksI97XwQACkNwOECXhWDsKOzkcJYMty5YTUioCWnr3 s5Pg== X-Gm-Message-State: AOAM530Ji92A1QxuFLiEJfJK5M4wVDRpYOv2iF7bXMS9WSKnqxrTwBFy vLGtjgttP/YyA0xeACzUa/CQWg== X-Google-Smtp-Source: ABdhPJwsa8h0AE9bNg84UqMhO3s2DHUlgwedfs5Hzzp4d+UxHAd3U8iQNwNgaZByIN+Ca7e6aXxfNA== X-Received: by 2002:a0c:e2c1:: with SMTP id t1mr3148068qvl.35.1602078155592; Wed, 07 Oct 2020 06:42:35 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id b9sm1325969qka.86.2020.10.07.06.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 06:42:34 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kQ9iE-000uYh-A3; Wed, 07 Oct 2020 10:42:34 -0300 Date: Wed, 7 Oct 2020 10:42:34 -0300 From: Jason Gunthorpe To: Tomasz Figa Cc: Daniel Vetter , Marek Szyprowski , DRI Development , LKML , Daniel Vetter , Andrew Morton , John Hubbard , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Jan Kara , Dan Williams , Linux MM , Linux ARM , Pawel Osciak , Kyungmin Park , Inki Dae , Joonyoung Shim , Seung-Woo Kim , linux-samsung-soc , "open list:DMA BUFFER SHARING FRAMEWORK" , Oded Gabbay Subject: Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM Message-ID: <20201007134234.GR5177@ziepe.ca> References: <725819e9-4f07-3f04-08f8-b6180406b339@samsung.com> <20201007124409.GN5177@ziepe.ca> <20201007130610.GP5177@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 07, 2020 at 03:34:01PM +0200, Tomasz Figa wrote: > I think the userptr zero-copy hack should be able to go away indeed, > given that we now have CMA that allows having carveouts backed by > struct pages and having the memory represented as DMA-buf normally. This also needs to figure out how to get references to CMA pages out of a VMA. IIRC Daniel said these are not pinnable? > How about the regular userptr use case, though? Just call pin_user_pages(), that is the easy case. > Is your intention to drop get_vaddr_frames() or we could still keep > using it and if vec->is_pfns is true: get_vaddr_frames() is dangerous, I would like it to go away. > a) if CONFIG_VIDEO_LEGACY_PFN_USERPTR is set, taint the kernel > b) otherwise just undo and fail? For the CONFIG_VIDEO_LEGACY_PFN_USERPTR case all the follow_pfn related code in get_vaddr_frames() shold move back into media and be hidden under this config. Jason 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=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 57B3AC4363D for ; Wed, 7 Oct 2020 13:44:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 D1D332087D for ; Wed, 7 Oct 2020 13:44:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lwfaMrBz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="oRN0ouP+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1D332087D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K9d0SydTvDP+ozIf7LV0xSlGvg5shQH/Bp9EisYKmU4=; b=lwfaMrBzgbfJwW0bie3ILIfAh 2Kqn94TgBru/2n8lM34YQ8RsU1ElEGVSr+16u4tlMFprUftSxjIwgLpPjq6SNQBRN3+519f2i1Q/J rwUCZaEmXslAXDy8RPxEqDm9EpGL5wmutpiEF3kfAbqtxiShONuWiHR1gEtpXntPEUXkEBl4jQqu4 v26oOWFEhfxPKm+M+f9paoDVDDKXg+5n5ax8ihcSHMJpEaOgRHmAJRG/UDTOLq5cXwFgSwyp1UEpQ GH1zkF1nZGy8kjT1ndutN/O9Gg46E9iQopW9UHUW2cknVNORg8RTn1egLoxhN0Xw2wMoNk5k5RpVt /0QyfHO4Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQ9iK-0006AE-HH; Wed, 07 Oct 2020 13:42:40 +0000 Received: from mail-qv1-xf41.google.com ([2607:f8b0:4864:20::f41]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQ9iH-00069B-SA for linux-arm-kernel@lists.infradead.org; Wed, 07 Oct 2020 13:42:38 +0000 Received: by mail-qv1-xf41.google.com with SMTP id j3so1125785qvi.7 for ; Wed, 07 Oct 2020 06:42:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bm7Nux/xb6SXj9ZR29eQsCeZolUUGIlGA/3pCXOWnqY=; b=oRN0ouP+3GVYiwbPUcOxPk+cVTMSfi6e6xB/kp+ZpPLA+3QEn3FltuYnLYp3IbMyT4 XLTyLwYzH3ifqaZnXaU/ZWFyM48epTsFUjsHkhU0idcCtjI43xlPcUDIQI5i97qJQ1Z/ hmWU0XhKPvhi2J7X6OI+NOkn5m1fjar7B+5a/IGgH6kfN1aHK788jThYwphFUhnE71h5 QymuBRmevVtIbPPsb8/x5Mk95uTwIXwCIbZATz13huzt0//nPIRFE0pqbC5dvTfYdelP 5WCCE51W2P5JcKqcJp27ijUk9DzYAmgp+0NhYYdt4Crdv5HPqfR+eWr9bpKdWw5SdwKY eKWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bm7Nux/xb6SXj9ZR29eQsCeZolUUGIlGA/3pCXOWnqY=; b=IAWjGTKjZtJ3rjeYTqpo9SlEfpOtgIRJ4OMWXquUB2lkKhxuPHDqIFXke/5DMlGkFC GkInUeOAjifhVVC3vRulvLHES4nGk40Zt2m0Bzk6AT4MD7HUBP+jRc06ZmPbZ3iD0dEc m5D1u3koTQ9igBY1XVsi3t5CXVCqjXoxkumtgFR7v/xFDcRzjdk7MVEU5+0YOqZXwqm/ m9wjq56i1L7wRKkJYCemljb5M5K0fOsZ0gBAPpzpB0a0iZvrt+D35BplaZz2w41OHxOK V0SqxaGLfXEtmQZ1Nw8VA9NJ8TQpMFPldw7EwWYV4qFRDvi6sqeOftddy+Qyp0C3Yq2S VEWw== X-Gm-Message-State: AOAM530XvqLsNtU3MgaY8WblZoXzJkNY42r2A706nxRk28bJ17ooycTQ XM0brVQkipjIrjfzleQcs6QS+A== X-Google-Smtp-Source: ABdhPJwsa8h0AE9bNg84UqMhO3s2DHUlgwedfs5Hzzp4d+UxHAd3U8iQNwNgaZByIN+Ca7e6aXxfNA== X-Received: by 2002:a0c:e2c1:: with SMTP id t1mr3148068qvl.35.1602078155592; Wed, 07 Oct 2020 06:42:35 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id b9sm1325969qka.86.2020.10.07.06.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 06:42:34 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kQ9iE-000uYh-A3; Wed, 07 Oct 2020 10:42:34 -0300 Date: Wed, 7 Oct 2020 10:42:34 -0300 From: Jason Gunthorpe To: Tomasz Figa Subject: Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM Message-ID: <20201007134234.GR5177@ziepe.ca> References: <725819e9-4f07-3f04-08f8-b6180406b339@samsung.com> <20201007124409.GN5177@ziepe.ca> <20201007130610.GP5177@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201007_094237_936504_EC0EBC7F X-CRM114-Status: GOOD ( 14.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oded Gabbay , Inki Dae , linux-samsung-soc , Jan Kara , Joonyoung Shim , Pawel Osciak , Daniel Vetter , Seung-Woo Kim , LKML , DRI Development , Kyungmin Park , Linux MM , =?utf-8?B?SsOpcsO0bWU=?= Glisse , John Hubbard , Daniel Vetter , Andrew Morton , "open list:DMA BUFFER SHARING FRAMEWORK" , Dan Williams , Linux ARM , Marek Szyprowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 07, 2020 at 03:34:01PM +0200, Tomasz Figa wrote: > I think the userptr zero-copy hack should be able to go away indeed, > given that we now have CMA that allows having carveouts backed by > struct pages and having the memory represented as DMA-buf normally. This also needs to figure out how to get references to CMA pages out of a VMA. IIRC Daniel said these are not pinnable? > How about the regular userptr use case, though? Just call pin_user_pages(), that is the easy case. > Is your intention to drop get_vaddr_frames() or we could still keep > using it and if vec->is_pfns is true: get_vaddr_frames() is dangerous, I would like it to go away. > a) if CONFIG_VIDEO_LEGACY_PFN_USERPTR is set, taint the kernel > b) otherwise just undo and fail? For the CONFIG_VIDEO_LEGACY_PFN_USERPTR case all the follow_pfn related code in get_vaddr_frames() shold move back into media and be hidden under this config. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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,DKIM_INVALID, DKIM_SIGNED,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 D8ED2C4727E for ; Wed, 7 Oct 2020 15:39:56 +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 6FBA6216C4 for ; Wed, 7 Oct 2020 15:39:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="oRN0ouP+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FBA6216C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca 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 8518D6E926; Wed, 7 Oct 2020 15:39:42 +0000 (UTC) Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 882CE6E8EE for ; Wed, 7 Oct 2020 13:42:37 +0000 (UTC) Received: by mail-qv1-xf43.google.com with SMTP id t20so1126258qvv.8 for ; Wed, 07 Oct 2020 06:42:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bm7Nux/xb6SXj9ZR29eQsCeZolUUGIlGA/3pCXOWnqY=; b=oRN0ouP+3GVYiwbPUcOxPk+cVTMSfi6e6xB/kp+ZpPLA+3QEn3FltuYnLYp3IbMyT4 XLTyLwYzH3ifqaZnXaU/ZWFyM48epTsFUjsHkhU0idcCtjI43xlPcUDIQI5i97qJQ1Z/ hmWU0XhKPvhi2J7X6OI+NOkn5m1fjar7B+5a/IGgH6kfN1aHK788jThYwphFUhnE71h5 QymuBRmevVtIbPPsb8/x5Mk95uTwIXwCIbZATz13huzt0//nPIRFE0pqbC5dvTfYdelP 5WCCE51W2P5JcKqcJp27ijUk9DzYAmgp+0NhYYdt4Crdv5HPqfR+eWr9bpKdWw5SdwKY eKWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bm7Nux/xb6SXj9ZR29eQsCeZolUUGIlGA/3pCXOWnqY=; b=ogY8ClFHXjvwZ50JmYlAm4wR4Ee+8i8eBfV4t6D3ljd9zG/J+/d9hlax8aVYAAF83Y /KEineE+1gC2TJuDRaJ0ufF/rU6gO4y5pORtM7QzgwWKiJwc23iPwr6wyajeG926D2xM LGZjUincoQF7mGL/UtHSVt+8fUXJbaa56fPNBpK/GuHrq9NoTAAe/tFkpQC4/NVaK6js Ni9XcghiUbqxNTGlivL/wS5Xq499qZ+nyDpmE7MCZVlahiRHT2CPjRcT4AdYa/OEO8tY e9jVf/LU2zDf+CTAqT3aq9jjyrcFkr13RigoOT9Fd4hUO+BjNzz+lS2pWlQkTOJumVel gKZQ== X-Gm-Message-State: AOAM533kKvC1hZESED2jMJXx1hlUG7Lw2kpXOjFYuhUV7yCFJBZ33nbd MjiMs6dN7tm/fn9m5CI0ZEJSKg== X-Google-Smtp-Source: ABdhPJwsa8h0AE9bNg84UqMhO3s2DHUlgwedfs5Hzzp4d+UxHAd3U8iQNwNgaZByIN+Ca7e6aXxfNA== X-Received: by 2002:a0c:e2c1:: with SMTP id t1mr3148068qvl.35.1602078155592; Wed, 07 Oct 2020 06:42:35 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id b9sm1325969qka.86.2020.10.07.06.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 06:42:34 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kQ9iE-000uYh-A3; Wed, 07 Oct 2020 10:42:34 -0300 Date: Wed, 7 Oct 2020 10:42:34 -0300 From: Jason Gunthorpe To: Tomasz Figa Subject: Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM Message-ID: <20201007134234.GR5177@ziepe.ca> References: <725819e9-4f07-3f04-08f8-b6180406b339@samsung.com> <20201007124409.GN5177@ziepe.ca> <20201007130610.GP5177@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Wed, 07 Oct 2020 15:39:39 +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: linux-samsung-soc , Jan Kara , Joonyoung Shim , Pawel Osciak , Daniel Vetter , Seung-Woo Kim , LKML , DRI Development , Kyungmin Park , Linux MM , =?utf-8?B?SsOpcsO0bWU=?= Glisse , John Hubbard , Daniel Vetter , Andrew Morton , "open list:DMA BUFFER SHARING FRAMEWORK" , Dan Williams , Linux ARM , Marek Szyprowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Oct 07, 2020 at 03:34:01PM +0200, Tomasz Figa wrote: > I think the userptr zero-copy hack should be able to go away indeed, > given that we now have CMA that allows having carveouts backed by > struct pages and having the memory represented as DMA-buf normally. This also needs to figure out how to get references to CMA pages out of a VMA. IIRC Daniel said these are not pinnable? > How about the regular userptr use case, though? Just call pin_user_pages(), that is the easy case. > Is your intention to drop get_vaddr_frames() or we could still keep > using it and if vec->is_pfns is true: get_vaddr_frames() is dangerous, I would like it to go away. > a) if CONFIG_VIDEO_LEGACY_PFN_USERPTR is set, taint the kernel > b) otherwise just undo and fail? For the CONFIG_VIDEO_LEGACY_PFN_USERPTR case all the follow_pfn related code in get_vaddr_frames() shold move back into media and be hidden under this config. Jason _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel