<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nvidia-tegra-modules.git/drivers/gpu/Makefile, branch gpu-paging</title>
<subtitle>NVIDIA's kernel modules to support tegra chips (used in Jetson boards)</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/'/>
<entry>
<title>DRM: tegra_udrm: Add tegra_udrm DRM driver</title>
<updated>2019-01-09T08:16:57+00:00</updated>
<author>
<name>yogishk</name>
<email>yogishk@nvidia.com</email>
</author>
<published>2018-11-20T14:05:53+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvidia-tegra-modules.git/commit/?id=647118deb4c0682d1205e4707c4bc6759e05c2ff'/>
<id>647118deb4c0682d1205e4707c4bc6759e05c2ff</id>
<content type='text'>
Add skeleton for tegra_udrm DRM driver. This driver adds Kernel DRM
support for user mode DRM driver on NVIDIA Tegra Soc. OSS DRM clients
(e.g. Wayland compositors) expects DRM driver node like
"/dev/dri/card0" and they do raw open()/close() on this node and
pass the obtained fd to UMD (in our case libdrm_nvdc.so). Clients
also tends to do poll()/read() and mmap(). To support this tegra_udrm
registers with DRM framework and provides following ioctls -

DRM_IOCTL_TEGRA_UDRM_DMABUF_MMAP :
To support mmap(), UMD issues this ioctl to send dmabuf fd to the
driver. Driver will return offset which user space can use in
mmap(2) on tegra_udrm device fd.

DRM_IOCTL_TEGRA_UDRM_DMABUF_DESTROY_MAPPINGS:
Clear stored dmabuf fds and offsets.

DRM_IOCTL_TEGRA_UDRM_CLOSE_NOTIFY :
In order to know when DRM client has called close() on driver fd,
UMD issues this ioctl with eventfd. This eventfd will be signaled by
the driver in .preclose method. When clear field in ioctl arg is set,
driver will no longer signal this eventfd.

DRM_IOCTL_TEGRA_UDRM_SEND_VBLANK_EVENT:
DRM clients do poll()/read() on driver fd to get vblank/pageflip
events. To dilever this events to clients, UMD issues this ioctl with
vblank event. Driver injects this event in DRM framework.

To prevent user-space from unintentionally inserting tegra_udrm.ko, we
add modeset module parameter. Driver's init will fail unless it is
inserted with modeset=1.

This driver can't be used with libdrm as UMD. It also doesn't support
ioctl() on driver fd

Bug 200473544
Bug 2158091

Change-Id: I2b463a61a968621f7ec18d788e19c218c5091f06
Signed-off-by: Yogish Kulkarni &lt;yogishk@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1954618
(cherry picked from commit 2f14a005053b32790f6fbccaa91c5a0baec4fc4d)
Reviewed-on: https://git-master.nvidia.com/r/1956232
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu &lt;bbasu@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add skeleton for tegra_udrm DRM driver. This driver adds Kernel DRM
support for user mode DRM driver on NVIDIA Tegra Soc. OSS DRM clients
(e.g. Wayland compositors) expects DRM driver node like
"/dev/dri/card0" and they do raw open()/close() on this node and
pass the obtained fd to UMD (in our case libdrm_nvdc.so). Clients
also tends to do poll()/read() and mmap(). To support this tegra_udrm
registers with DRM framework and provides following ioctls -

DRM_IOCTL_TEGRA_UDRM_DMABUF_MMAP :
To support mmap(), UMD issues this ioctl to send dmabuf fd to the
driver. Driver will return offset which user space can use in
mmap(2) on tegra_udrm device fd.

DRM_IOCTL_TEGRA_UDRM_DMABUF_DESTROY_MAPPINGS:
Clear stored dmabuf fds and offsets.

DRM_IOCTL_TEGRA_UDRM_CLOSE_NOTIFY :
In order to know when DRM client has called close() on driver fd,
UMD issues this ioctl with eventfd. This eventfd will be signaled by
the driver in .preclose method. When clear field in ioctl arg is set,
driver will no longer signal this eventfd.

DRM_IOCTL_TEGRA_UDRM_SEND_VBLANK_EVENT:
DRM clients do poll()/read() on driver fd to get vblank/pageflip
events. To dilever this events to clients, UMD issues this ioctl with
vblank event. Driver injects this event in DRM framework.

To prevent user-space from unintentionally inserting tegra_udrm.ko, we
add modeset module parameter. Driver's init will fail unless it is
inserted with modeset=1.

This driver can't be used with libdrm as UMD. It also doesn't support
ioctl() on driver fd

Bug 200473544
Bug 2158091

Change-Id: I2b463a61a968621f7ec18d788e19c218c5091f06
Signed-off-by: Yogish Kulkarni &lt;yogishk@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1954618
(cherry picked from commit 2f14a005053b32790f6fbccaa91c5a0baec4fc4d)
Reviewed-on: https://git-master.nvidia.com/r/1956232
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu &lt;bbasu@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
