Skip to content

Commit a3bc4ff

Browse files
committed
tools headers UAPI: Update tools's copy of drm.h headers
Picking the changes from: b603e81 ("drm/uapi: document kernel capabilities") Doesn't result in any tooling changes: $ tools/perf/trace/beauty/drm_ioctl.sh > before $ cp include/uapi/drm/drm.h tools/include/uapi/drm/drm.h $ tools/perf/trace/beauty/drm_ioctl.sh > after $ diff -u before after Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h' diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h Cc: Simon Ser <contact@emersion.fr> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 6efb943 commit a3bc4ff

1 file changed

Lines changed: 121 additions & 4 deletions

File tree

  • tools/include/uapi/drm

‎tools/include/uapi/drm/drm.h‎

Lines changed: 121 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,30 +625,147 @@ struct drm_gem_open {
625625
__u64 size;
626626
};
627627

628+
/**
629+
* DRM_CAP_DUMB_BUFFER
630+
*
631+
* If set to 1, the driver supports creating dumb buffers via the
632+
* &DRM_IOCTL_MODE_CREATE_DUMB ioctl.
633+
*/
628634
#define DRM_CAP_DUMB_BUFFER 0x1
635+
/**
636+
* DRM_CAP_VBLANK_HIGH_CRTC
637+
*
638+
* If set to 1, the kernel supports specifying a CRTC index in the high bits of
639+
* &drm_wait_vblank_request.type.
640+
*
641+
* Starting kernel version 2.6.39, this capability is always set to 1.
642+
*/
629643
#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
644+
/**
645+
* DRM_CAP_DUMB_PREFERRED_DEPTH
646+
*
647+
* The preferred bit depth for dumb buffers.
648+
*
649+
* The bit depth is the number of bits used to indicate the color of a single
650+
* pixel excluding any padding. This is different from the number of bits per
651+
* pixel. For instance, XRGB8888 has a bit depth of 24 but has 32 bits per
652+
* pixel.
653+
*
654+
* Note that this preference only applies to dumb buffers, it's irrelevant for
655+
* other types of buffers.
656+
*/
630657
#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3
658+
/**
659+
* DRM_CAP_DUMB_PREFER_SHADOW
660+
*
661+
* If set to 1, the driver prefers userspace to render to a shadow buffer
662+
* instead of directly rendering to a dumb buffer. For best speed, userspace
663+
* should do streaming ordered memory copies into the dumb buffer and never
664+
* read from it.
665+
*
666+
* Note that this preference only applies to dumb buffers, it's irrelevant for
667+
* other types of buffers.
668+
*/
631669
#define DRM_CAP_DUMB_PREFER_SHADOW 0x4
670+
/**
671+
* DRM_CAP_PRIME
672+
*
673+
* Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT
674+
* and &DRM_PRIME_CAP_EXPORT.
675+
*
676+
* PRIME buffers are exposed as dma-buf file descriptors. See
677+
* Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing".
678+
*/
632679
#define DRM_CAP_PRIME 0x5
680+
/**
681+
* DRM_PRIME_CAP_IMPORT
682+
*
683+
* If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME
684+
* buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl.
685+
*/
633686
#define DRM_PRIME_CAP_IMPORT 0x1
687+
/**
688+
* DRM_PRIME_CAP_EXPORT
689+
*
690+
* If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME
691+
* buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl.
692+
*/
634693
#define DRM_PRIME_CAP_EXPORT 0x2
694+
/**
695+
* DRM_CAP_TIMESTAMP_MONOTONIC
696+
*
697+
* If set to 0, the kernel will report timestamps with ``CLOCK_REALTIME`` in
698+
* struct drm_event_vblank. If set to 1, the kernel will report timestamps with
699+
* ``CLOCK_MONOTONIC``. See ``clock_gettime(2)`` for the definition of these
700+
* clocks.
701+
*
702+
* Starting from kernel version 2.6.39, the default value for this capability
703+
* is 1. Starting kernel version 4.15, this capability is always set to 1.
704+
*/
635705
#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
706+
/**
707+
* DRM_CAP_ASYNC_PAGE_FLIP
708+
*
709+
* If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC.
710+
*/
636711
#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
637-
/*
638-
* The CURSOR_WIDTH and CURSOR_HEIGHT capabilities return a valid widthxheight
639-
* combination for the hardware cursor. The intention is that a hardware
640-
* agnostic userspace can query a cursor plane size to use.
712+
/**
713+
* DRM_CAP_CURSOR_WIDTH
714+
*
715+
* The ``CURSOR_WIDTH`` and ``CURSOR_HEIGHT`` capabilities return a valid
716+
* width x height combination for the hardware cursor. The intention is that a
717+
* hardware agnostic userspace can query a cursor plane size to use.
641718
*
642719
* Note that the cross-driver contract is to merely return a valid size;
643720
* drivers are free to attach another meaning on top, eg. i915 returns the
644721
* maximum plane size.
645722
*/
646723
#define DRM_CAP_CURSOR_WIDTH 0x8
724+
/**
725+
* DRM_CAP_CURSOR_HEIGHT
726+
*
727+
* See &DRM_CAP_CURSOR_WIDTH.
728+
*/
647729
#define DRM_CAP_CURSOR_HEIGHT 0x9
730+
/**
731+
* DRM_CAP_ADDFB2_MODIFIERS
732+
*
733+
* If set to 1, the driver supports supplying modifiers in the
734+
* &DRM_IOCTL_MODE_ADDFB2 ioctl.
735+
*/
648736
#define DRM_CAP_ADDFB2_MODIFIERS 0x10
737+
/**
738+
* DRM_CAP_PAGE_FLIP_TARGET
739+
*
740+
* If set to 1, the driver supports the &DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE and
741+
* &DRM_MODE_PAGE_FLIP_TARGET_RELATIVE flags in
742+
* &drm_mode_crtc_page_flip_target.flags for the &DRM_IOCTL_MODE_PAGE_FLIP
743+
* ioctl.
744+
*/
649745
#define DRM_CAP_PAGE_FLIP_TARGET 0x11
746+
/**
747+
* DRM_CAP_CRTC_IN_VBLANK_EVENT
748+
*
749+
* If set to 1, the kernel supports reporting the CRTC ID in
750+
* &drm_event_vblank.crtc_id for the &DRM_EVENT_VBLANK and
751+
* &DRM_EVENT_FLIP_COMPLETE events.
752+
*
753+
* Starting kernel version 4.12, this capability is always set to 1.
754+
*/
650755
#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
756+
/**
757+
* DRM_CAP_SYNCOBJ
758+
*
759+
* If set to 1, the driver supports sync objects. See
760+
* Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
761+
*/
651762
#define DRM_CAP_SYNCOBJ 0x13
763+
/**
764+
* DRM_CAP_SYNCOBJ_TIMELINE
765+
*
766+
* If set to 1, the driver supports timeline operations on sync objects. See
767+
* Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
768+
*/
652769
#define DRM_CAP_SYNCOBJ_TIMELINE 0x14
653770

654771
/* DRM_IOCTL_GET_CAP ioctl argument type */

0 commit comments

Comments
 (0)