@@ -713,7 +713,8 @@ struct drm_gem_open {
713
713
/**
714
714
* DRM_CAP_ASYNC_PAGE_FLIP
715
715
*
716
- * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC.
716
+ * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC for legacy
717
+ * page-flips.
717
718
*/
718
719
#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
719
720
/**
@@ -773,6 +774,13 @@ struct drm_gem_open {
773
774
* :ref:`drm_sync_objects`.
774
775
*/
775
776
#define DRM_CAP_SYNCOBJ_TIMELINE 0x14
777
+ /**
778
+ * DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
779
+ *
780
+ * If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC for atomic
781
+ * commits.
782
+ */
783
+ #define DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP 0x15
776
784
777
785
/* DRM_IOCTL_GET_CAP ioctl argument type */
778
786
struct drm_get_cap {
@@ -842,6 +850,31 @@ struct drm_get_cap {
842
850
*/
843
851
#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5
844
852
853
+ /**
854
+ * DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT
855
+ *
856
+ * Drivers for para-virtualized hardware (e.g. vmwgfx, qxl, virtio and
857
+ * virtualbox) have additional restrictions for cursor planes (thus
858
+ * making cursor planes on those drivers not truly universal,) e.g.
859
+ * they need cursor planes to act like one would expect from a mouse
860
+ * cursor and have correctly set hotspot properties.
861
+ * If this client cap is not set the DRM core will hide cursor plane on
862
+ * those virtualized drivers because not setting it implies that the
863
+ * client is not capable of dealing with those extra restictions.
864
+ * Clients which do set cursor hotspot and treat the cursor plane
865
+ * like a mouse cursor should set this property.
866
+ * The client must enable &DRM_CLIENT_CAP_ATOMIC first.
867
+ *
868
+ * Setting this property on drivers which do not special case
869
+ * cursor planes (i.e. non-virtualized drivers) will return
870
+ * EOPNOTSUPP, which can be used by userspace to gauge
871
+ * requirements of the hardware/drivers they're running on.
872
+ *
873
+ * This capability is always supported for atomic-capable virtualized
874
+ * drivers starting from kernel version 6.6.
875
+ */
876
+ #define DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT 6
877
+
845
878
/* DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
846
879
struct drm_set_client_cap {
847
880
__u64 capability ;
@@ -893,6 +926,7 @@ struct drm_syncobj_transfer {
893
926
#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0)
894
927
#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1)
895
928
#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */
929
+ #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_DEADLINE (1 << 3) /* set fence deadline to deadline_nsec */
896
930
struct drm_syncobj_wait {
897
931
__u64 handles ;
898
932
/* absolute timeout */
@@ -901,6 +935,14 @@ struct drm_syncobj_wait {
901
935
__u32 flags ;
902
936
__u32 first_signaled ; /* only valid when not waiting all */
903
937
__u32 pad ;
938
+ /**
939
+ * @deadline_nsec - fence deadline hint
940
+ *
941
+ * Deadline hint, in absolute CLOCK_MONOTONIC, to set on backing
942
+ * fence(s) if the DRM_SYNCOBJ_WAIT_FLAGS_WAIT_DEADLINE flag is
943
+ * set.
944
+ */
945
+ __u64 deadline_nsec ;
904
946
};
905
947
906
948
struct drm_syncobj_timeline_wait {
@@ -913,6 +955,14 @@ struct drm_syncobj_timeline_wait {
913
955
__u32 flags ;
914
956
__u32 first_signaled ; /* only valid when not waiting all */
915
957
__u32 pad ;
958
+ /**
959
+ * @deadline_nsec - fence deadline hint
960
+ *
961
+ * Deadline hint, in absolute CLOCK_MONOTONIC, to set on backing
962
+ * fence(s) if the DRM_SYNCOBJ_WAIT_FLAGS_WAIT_DEADLINE flag is
963
+ * set.
964
+ */
965
+ __u64 deadline_nsec ;
916
966
};
917
967
918
968
/**
@@ -1218,6 +1268,26 @@ extern "C" {
1218
1268
1219
1269
#define DRM_IOCTL_SYNCOBJ_EVENTFD DRM_IOWR(0xCF, struct drm_syncobj_eventfd)
1220
1270
1271
+ /**
1272
+ * DRM_IOCTL_MODE_CLOSEFB - Close a framebuffer.
1273
+ *
1274
+ * This closes a framebuffer previously added via ADDFB/ADDFB2. The IOCTL
1275
+ * argument is a framebuffer object ID.
1276
+ *
1277
+ * This IOCTL is similar to &DRM_IOCTL_MODE_RMFB, except it doesn't disable
1278
+ * planes and CRTCs. As long as the framebuffer is used by a plane, it's kept
1279
+ * alive. When the plane no longer uses the framebuffer (because the
1280
+ * framebuffer is replaced with another one, or the plane is disabled), the
1281
+ * framebuffer is cleaned up.
1282
+ *
1283
+ * This is useful to implement flicker-free transitions between two processes.
1284
+ *
1285
+ * Depending on the threat model, user-space may want to ensure that the
1286
+ * framebuffer doesn't expose any sensitive user information: closed
1287
+ * framebuffers attached to a plane can be read back by the next DRM master.
1288
+ */
1289
+ #define DRM_IOCTL_MODE_CLOSEFB DRM_IOWR(0xD0, struct drm_mode_closefb)
1290
+
1221
1291
/*
1222
1292
* Device specific ioctls should only be in their respective headers
1223
1293
* The device specific ioctl range is from 0x40 to 0x9f.
0 commit comments