From: "Christian König" <christian.koenig@amd.com>
To: Alan Stern <stern@rowland.harvard.edu>
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 16:56:16 +0100 [thread overview]
Message-ID: <d2d581fb-ccba-00c9-0a22-b485870256ae@amd.com> (raw)
In-Reply-To: <20210219155328.GA1111829@rowland.harvard.edu>
Am 19.02.21 um 16:53 schrieb Alan Stern:
> 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.
Yeah, I was assuming something like that would work.
But in this case the USB device should give the host controllers device
structure to the dma_buf_attach function so that the sg_table can be
filled in with DMA addresses properly.
Regards,
Christian.
>
> Alan Stern
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: "Christian König" <christian.koenig@amd.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
daniel@ffwll.ch, airlied@linux.ie,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
sumit.semwal@linaro.org, gregkh@linuxfoundation.org,
dri-devel@lists.freedesktop.org, noralf@tronnes.org,
Christoph Hellwig <hch@lst.de>, Johan Hovold <johan@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
"Ahmed S. Darwish" <a.darwish@linutronix.de>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Oliver Neukum <oneukum@suse.com>, Felipe Balbi <balbi@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/prime: Only call dma_map_sgtable() for devices with DMA support
Date: Fri, 19 Feb 2021 16:56:16 +0100 [thread overview]
Message-ID: <d2d581fb-ccba-00c9-0a22-b485870256ae@amd.com> (raw)
In-Reply-To: <20210219155328.GA1111829@rowland.harvard.edu>
Am 19.02.21 um 16:53 schrieb Alan Stern:
> 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.
Yeah, I was assuming something like that would work.
But in this case the USB device should give the host controllers device
structure to the dma_buf_attach function so that the sg_table can be
filled in with DMA addresses properly.
Regards,
Christian.
>
> Alan Stern
next prev parent reply other threads:[~2021-02-19 15:56 UTC|newest]
Thread overview: 28+ 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:40 ` Thomas Zimmermann
2021-02-19 13:45 ` Christian König
2021-02-19 13:45 ` Christian König
2021-02-19 14:34 ` Thomas Zimmermann
2021-02-19 14:34 ` Thomas Zimmermann
2021-02-19 14:43 ` Christian König
2021-02-19 14:43 ` Christian König
2021-02-19 14:43 ` Daniel Vetter
2021-02-19 14:43 ` Daniel Vetter
2021-02-19 15:53 ` Alan Stern
2021-02-19 15:53 ` Alan Stern
2021-02-19 15:56 ` Christian König [this message]
2021-02-19 15:56 ` Christian König
2021-02-19 16:41 ` Alan Stern
2021-02-19 16:41 ` Alan Stern
2021-02-22 7:52 ` Thomas Zimmermann
2021-02-22 7:52 ` Thomas Zimmermann
2021-02-20 13:02 ` Noralf Trønnes
2021-02-20 13:02 ` Noralf Trønnes
2021-02-21 20:56 ` Christian König
2021-02-21 20:56 ` Christian König
2021-02-22 7:54 ` Thomas Zimmermann
2021-02-22 7:54 ` Thomas Zimmermann
2021-02-22 17:30 ` Noralf Trønnes
2021-02-22 17:30 ` Noralf Trønnes
2021-02-23 10:14 ` Daniel Vetter
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=d2d581fb-ccba-00c9-0a22-b485870256ae@amd.com \
--to=christian.koenig@amd.com \
--cc=a.darwish@linutronix.de \
--cc=airlied@linux.ie \
--cc=andriy.shevchenko@linux.intel.com \
--cc=balbi@kernel.org \
--cc=bigeasy@linutronix.de \
--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=stern@rowland.harvard.edu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.