On 10/19/20 5:21 AM, Dmitry Osipenko wrote:
07.10.2020 20:12, Mikko Perttunen пишет:
+int tegra_drm_ioctl_channel_map(struct drm_device *drm, void *data,
+ struct drm_file *file)
+{
Hello, Mikko!
Could you please tell what are the host1x clients that are going to be
upstreamed and will need this IOCTL?
Hi Dmitry!
It is needed for any engine/job that wants to access memory, as this
IOCTL must be used to map memory for the engine. So all of them.
Downstream doesn't have an equivalent IOCTL because it (currently) does
mapping at submit time, but that is suboptimal because
- it requires doing relocations in the kernel which isn't required for T186+
- it's a big performance penalty, due to which the downstream kernel has
the "deferred dma-buf unmapping" feature, where unmapping a dma_buf may
not immediately unmap it in case it's used later, so that the "mapping"
later is faster. A feature which we'd preferably get rid of.
- because of the above feature not being controlled by the user, it can
cause variance in submit times.
On the other hand, we cannot (at least always) do the mapping at
allocation/import time, because
- A single FD may have multiple channel_ctx's, and an allocation/import
may need to be used in any subset of them
- The import IOCTL is fixed and doesn't have the parameters we'd need to
do this at import time
- Overall it's more orthogonal to have GEM object acquirement in one
step and mapping in another.
Maybe that's not quite what you asked, but it's some background anyway :)
Cheers,
Mikko
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel