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.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 0CDDFC433E0 for ; Fri, 19 Feb 2021 16:00:12 +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 994DC61493 for ; Fri, 19 Feb 2021 16:00:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 994DC61493 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rowland.harvard.edu 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 DC5A36EB41; Fri, 19 Feb 2021 16:00:10 +0000 (UTC) X-Greylist: delayed 400 seconds by postgrey-1.36 at gabe; Fri, 19 Feb 2021 16:00:09 UTC Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by gabe.freedesktop.org (Postfix) with SMTP id C7E826EB41 for ; Fri, 19 Feb 2021 16:00:09 +0000 (UTC) Received: (qmail 1112983 invoked by uid 1000); 19 Feb 2021 10:53:28 -0500 Date: Fri, 19 Feb 2021 10:53:28 -0500 From: Alan Stern To: Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [PATCH] drm/prime: Only call dma_map_sgtable() for devices with DMA support Message-ID: <20210219155328.GA1111829@rowland.harvard.edu> References: <20210219134014.7775-1-tzimmermann@suse.de> <02a45c11-fc73-1e5a-3839-30b080950af8@amd.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <02a45c11-fc73-1e5a-3839-30b080950af8@amd.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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: Felipe Balbi , Mathias Nyman , Thomas Zimmermann , airlied@linux.ie, gregkh@linuxfoundation.org, Sebastian Andrzej Siewior , Oliver Neukum , Johan Hovold , Christoph Hellwig , dri-devel@lists.freedesktop.org, "Ahmed S. Darwish" , stable@vger.kernel.org, Thomas Gleixner , Andy Shevchenko Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Feb 19, 2021 at 02:45:54PM +0100, Christian K=F6nig wrote: > Well as far as I can see this is a relative clear NAK. > = > When a device can't do DMA and has no DMA mask then why it is requesting = an > sg-table in the first place? This may not be important for your discussion, but I'd like to give an = answer to the question -- at least, for the case of USB. A USB device cannot do DMA and has no DMA mask. Nevertheless, if you = want to send large amounts of bulk data to/from a USB device then using = an SG table is often a good way to do it. The reason is simple: All = communication with a USB device has to go through a USB host controller, = and many (though not all) host controllers _can_ do DMA and _do_ have a = DMA mask. The USB mass-storage and uas drivers in particular make heavy use of = this mechanism. Alan Stern _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel