summaryrefslogtreecommitdiffstats
path: root/include/uapi/drm
Commit message (Collapse)AuthorAge
* tegra_udrm: add SEND_CONNECTOR_STATUS_EVENT ioctlYogish Kulkarni2019-12-23
| | | | | | | | | | | | | | | | | | | Add DRM_TEGRA_UDRM_SEND_CONNECTOR_STATUS_EVENT ioctl to generate a uevent for connector status property change. user space calls this ioctl with connector id and property id related to the status change. Bug 200577678 Change-Id: I079a7ebbc2c11ad6e6c7003df6eab57817161e26 Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2266101 GVS: Gerrit_Virtual_Submit Reviewed-by: Sai Kiran K <skirank@nvidia.com> Tested-by: Sai Kiran K <skirank@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: Notify userspace about set masterYogish Kulkarni2019-02-06
| | | | | | | | | | | | | | | | | | | | | Add DRM_TEGRA_UDRM_SET_MASTER_NOTIFY ioctl. In this ioctl acquire reference to the internal eventfd context associated with eventfd passed by user space. Signal this eventfd from driver's master_set method. Bug 200479257 Bug 200473544 Bug 2158091 Change-Id: I3b3518a5f33e948e5fafb829768692a0c8379fba Reviewed-on: https://git-master.nvidia.com/r/#/c/2006490/ Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> (cherry picked from commit 22603e26d309d694184deeccb52ca52326b4d7bd) Reviewed-on: https://git-master.nvidia.com/r/2012016 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: implement DRM_TEGRA_UDRM_* ioctlsYogish Kulkarni2019-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRM_TEGRA_UDRM_DMABUF_MMAP: Allocate id using idr_alloc. Associate dmabuf fd passed by user space to this id. Return offset which user space will use in subsequent mmap() by doing id << PAGE_SHIFT. DRM_TEGRA_UDRM_DMABUF_DESTROY_MAPPINGS: Find id associated with dmabuf fd, destroy that id and pointer associated with the id. DRM_TEGRA_UDRM_CLOSE_NOTIFY: Acquire reference to the internal eventfd context associated with eventfd passed by user space. Signal this eventfd from driver's preclose method. DRM_TEGRA_UDRM_SEND_VBLANK_EVENT: Inject event sent by user-space into drm frame work using drm_send_event(). DRM_TEGRA_UDRM_DROP_MASTER_NOTIFY: Acquire reference to the internal eventfd context associated with eventfd passed by user space. Signal this eventfd from driver's master_drop method. Bug 200473544 Bug 2158091 Change-Id: Idbc54f7ede2c70249d0a997f125903101877c62c Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1962785 (cherry picked from commit e4bdca8e2f86a712bdafaab319329d90c9dc221d) Reviewed-on: https://git-master.nvidia.com/r/1991018 GVS: Gerrit_Virtual_Submit Reviewed-by: Alka Mohite <amohite@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* DRM: tegra_udrm: Add tegra_udrm DRM driveryogishk2019-01-09
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 <yogishk@nvidia.com> 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 <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>