dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: "Christian König" <christian.koenig@amd.com>
Cc: Felipe Balbi <balbi@kernel.org>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	airlied@linux.ie, gregkh@linuxfoundation.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Oliver Neukum <oneukum@suse.com>, Johan Hovold <johan@kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	dri-devel@lists.freedesktop.org,
	"Ahmed S. Darwish" <a.darwish@linutronix.de>,
	stable@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH] drm/prime: Only call dma_map_sgtable() for devices with DMA support
Date: Fri, 19 Feb 2021 10:53:28 -0500	[thread overview]
Message-ID: <20210219155328.GA1111829@rowland.harvard.edu> (raw)
In-Reply-To: <02a45c11-fc73-1e5a-3839-30b080950af8@amd.com>

On Fri, Feb 19, 2021 at 02:45:54PM +0100, Christian König 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

  parent reply	other threads:[~2021-02-19 16:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 13:40 [PATCH] drm/prime: Only call dma_map_sgtable() for devices with DMA support Thomas Zimmermann
2021-02-19 13:45 ` Christian König
2021-02-19 14:34   ` Thomas Zimmermann
2021-02-19 14:43     ` Christian König
2021-02-19 14:43     ` Daniel Vetter
2021-02-19 15:53   ` Alan Stern [this message]
2021-02-19 15:56     ` Christian König
2021-02-19 16:41       ` Alan Stern
2021-02-22  7:52     ` Thomas Zimmermann
2021-02-20 13:02 ` Noralf Trønnes
2021-02-21 20:56   ` Christian König
2021-02-22  7:54   ` Thomas Zimmermann
2021-02-22 17:30     ` Noralf Trønnes
2021-02-23 10:14       ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210219155328.GA1111829@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=a.darwish@linutronix.de \
    --cc=airlied@linux.ie \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=balbi@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=johan@kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=oneukum@suse.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox