|
struct drm_mode_modeinfo - Display mode information. @clock: pixel clock in kHz @hdisplay: horizontal display size @hsync_start: horizontal sync start @hsync_end: horizontal sync end @htotal: horizontal total size @hskew: horizontal skew @vdisplay: vertical display size @vsync_start: vertical sync start @vsync_end: vertical sync end @vtotal: vertical total size @vscan: vertical scan @vrefresh: approximate vertical refresh rate in Hz @flags: bitmask of misc. flags, see DRM_MODE_FLAG_* defines @type: bitmask of type flags, see DRM_MODE_TYPE_* defines
This is the user-space API display mode information structure. For the kernel version see struct drm_display_mode.
|
| #define | DRM_MODE_PRESENT_TOP_FIELD (1<<0) |
| |
| #define | DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1) |
| |
| #define | DRM_MODE_ENCODER_NONE 0 |
| |
| #define | DRM_MODE_ENCODER_DAC 1 |
| |
| #define | DRM_MODE_ENCODER_TMDS 2 |
| |
| #define | DRM_MODE_ENCODER_LVDS 3 |
| |
| #define | DRM_MODE_ENCODER_TVDAC 4 |
| |
| #define | DRM_MODE_ENCODER_VIRTUAL 5 |
| |
| #define | DRM_MODE_ENCODER_DSI 6 |
| |
| #define | DRM_MODE_ENCODER_DPMST 7 |
| |
| #define | DRM_MODE_ENCODER_DPI 8 |
| |
| #define | DRM_MODE_CONNECTOR_Unknown 0 |
| |
| #define | DRM_MODE_CONNECTOR_VGA 1 |
| |
| #define | DRM_MODE_CONNECTOR_DVII 2 |
| |
| #define | DRM_MODE_CONNECTOR_DVID 3 |
| |
| #define | DRM_MODE_CONNECTOR_DVIA 4 |
| |
| #define | DRM_MODE_CONNECTOR_Composite 5 |
| |
| #define | DRM_MODE_CONNECTOR_SVIDEO 6 |
| |
| #define | DRM_MODE_CONNECTOR_LVDS 7 |
| |
| #define | DRM_MODE_CONNECTOR_Component 8 |
| |
| #define | DRM_MODE_CONNECTOR_9PinDIN 9 |
| |
| #define | DRM_MODE_CONNECTOR_DisplayPort 10 |
| |
| #define | DRM_MODE_CONNECTOR_HDMIA 11 |
| |
| #define | DRM_MODE_CONNECTOR_HDMIB 12 |
| |
| #define | DRM_MODE_CONNECTOR_TV 13 |
| |
| #define | DRM_MODE_CONNECTOR_eDP 14 |
| |
| #define | DRM_MODE_CONNECTOR_VIRTUAL 15 |
| |
| #define | DRM_MODE_CONNECTOR_DSI 16 |
| |
| #define | DRM_MODE_CONNECTOR_DPI 17 |
| |
| #define | DRM_MODE_CONNECTOR_WRITEBACK 18 |
| |
| #define | DRM_MODE_CONNECTOR_SPI 19 |
| |
| #define | DRM_MODE_CONNECTOR_USB 20 |
| |
| #define | DRM_MODE_PROP_PENDING (1<<0) /* deprecated, do not use */ |
| |
| #define | DRM_MODE_PROP_RANGE (1<<1) |
| |
| #define | DRM_MODE_PROP_IMMUTABLE (1<<2) |
| |
| #define | DRM_MODE_PROP_ENUM (1<<3) /* enumerated type with text strings */ |
| |
| #define | DRM_MODE_PROP_BLOB (1<<4) |
| |
| #define | DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */ |
| |
| #define | DRM_MODE_PROP_LEGACY_TYPE |
| |
| #define | DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0 |
| |
| #define | DRM_MODE_PROP_TYPE(n) ((n) << 6) |
| |
| #define | DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) |
| |
| #define | DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) |
| |
| #define | DRM_MODE_PROP_ATOMIC 0x80000000 |
| |
| enum | drm_mode_subconnector {
DRM_MODE_SUBCONNECTOR_Automatic = 0
, DRM_MODE_SUBCONNECTOR_Unknown = 0
, DRM_MODE_SUBCONNECTOR_VGA = 1
, DRM_MODE_SUBCONNECTOR_DVID = 3
,
DRM_MODE_SUBCONNECTOR_DVIA = 4
, DRM_MODE_SUBCONNECTOR_Composite = 5
, DRM_MODE_SUBCONNECTOR_SVIDEO = 6
, DRM_MODE_SUBCONNECTOR_Component = 8
,
DRM_MODE_SUBCONNECTOR_SCART = 9
, DRM_MODE_SUBCONNECTOR_DisplayPort = 10
, DRM_MODE_SUBCONNECTOR_HDMIA = 11
, DRM_MODE_SUBCONNECTOR_Native = 15
,
DRM_MODE_SUBCONNECTOR_Wireless = 18
} |
| |
|
struct drm_mode_property_enum - Description for an enum/bitfield entry. @value: numeric value for this enum entry.
See struct drm_property_enum for details.
|
| #define | DRM_MODE_OBJECT_CRTC 0xcccccccc |
| |
| #define | DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 |
| |
| #define | DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0 |
| |
| #define | DRM_MODE_OBJECT_MODE 0xdededede |
| |
| #define | DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0 |
| |
| #define | DRM_MODE_OBJECT_FB 0xfbfbfbfb |
| |
| #define | DRM_MODE_OBJECT_BLOB 0xbbbbbbbb |
| |
| #define | DRM_MODE_OBJECT_PLANE 0xeeeeeeee |
| |
| #define | DRM_MODE_OBJECT_COLOROP 0xfafafafa |
| |
| #define | DRM_MODE_OBJECT_ANY 0 |
| |
| #define | DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */ |
| |
| #define | DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifier[] */ |
| |
| #define | DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 |
| |
| #define | DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 |
| |
| #define | DRM_MODE_FB_DIRTY_FLAGS 0x03 |
| |
| #define | DRM_MODE_FB_DIRTY_MAX_CLIPS 256 |
| |
| #define | DRM_MODE_CURSOR_BO 0x01 |
| |
| #define | DRM_MODE_CURSOR_MOVE 0x02 |
| |
| #define | DRM_MODE_CURSOR_FLAGS 0x03 |
| |
| #define | DRM_MODE_PAGE_FLIP_EVENT 0x01 |
| |
| #define | DRM_MODE_PAGE_FLIP_ASYNC 0x02 |
| |
| #define | DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4 |
| |
| #define | DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8 |
| |
| #define | DRM_MODE_PAGE_FLIP_TARGET |
| |
| #define | DRM_MODE_PAGE_FLIP_FLAGS |
| |
| #define | DRM_MODE_ATOMIC_TEST_ONLY 0x0100 |
| |
| #define | DRM_MODE_ATOMIC_NONBLOCK 0x0200 |
| |
| #define | DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 |
| |
| #define | DRM_MODE_ATOMIC_FLAGS |
| |
| #define | __DRM_ARGB64_PREP(c, shift) (((__u64)(c) & __GENMASK(15, 0)) << (shift)) |
| |
| #define | __DRM_ARGB64_PREP_BPC(c, shift, bpc) |
| |
| #define | DRM_ARGB64_PREP(alpha, red, green, blue) |
| |
| #define | DRM_ARGB64_PREP_BPC(alpha, red, green, blue, bpc) |
| |
| #define | __DRM_ARGB64_GET(c, shift) ((__u16)(((__u64)(c) >> (shift)) & __GENMASK(15, 0))) |
| |
| #define | __DRM_ARGB64_GET_BPC(c, shift, bpc) |
| |
| #define | __DRM_ARGB64_GET_BPCS(c, shift, bpc) (__DRM_ARGB64_GET(c, shift) >> (16 - (bpc))) |
| |
| #define | DRM_ARGB64_GETA(c) __DRM_ARGB64_GET(c, 48) |
| |
| #define | DRM_ARGB64_GETR(c) __DRM_ARGB64_GET(c, 32) |
| |
| #define | DRM_ARGB64_GETG(c) __DRM_ARGB64_GET(c, 16) |
| |
| #define | DRM_ARGB64_GETB(c) __DRM_ARGB64_GET(c, 0) |
| |
| #define | DRM_ARGB64_GETA_BPC(c, bpc) __DRM_ARGB64_GET_BPC(c, 48, bpc) |
| |
| #define | DRM_ARGB64_GETR_BPC(c, bpc) __DRM_ARGB64_GET_BPC(c, 32, bpc) |
| |
| #define | DRM_ARGB64_GETG_BPC(c, bpc) __DRM_ARGB64_GET_BPC(c, 16, bpc) |
| |
| #define | DRM_ARGB64_GETB_BPC(c, bpc) __DRM_ARGB64_GET_BPC(c, 0, bpc) |
| |
| #define | DRM_ARGB64_GETA_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 48, bpc) |
| |
| #define | DRM_ARGB64_GETR_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 32, bpc) |
| |
| #define | DRM_ARGB64_GETG_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 16, bpc) |
| |
| #define | DRM_ARGB64_GETB_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 0, bpc) |
| |
| enum | drm_colorop_type {
DRM_COLOROP_1D_CURVE
, DRM_COLOROP_1D_LUT
, DRM_COLOROP_CTM_3X4
, DRM_COLOROP_MULTIPLIER
,
DRM_COLOROP_3D_LUT
} |
| |
| enum | drm_colorop_lut3d_interpolation_type { DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL
} |
| |
| enum | drm_colorop_lut1d_interpolation_type { DRM_COLOROP_LUT1D_INTERPOLATION_LINEAR
} |
| |
| #define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 |
DRM_MODE_ATOMIC_ALLOW_MODESET
Allow the update to result in temporary or transient visible artifacts while the update is being applied. Applying the update may also take significantly more time than a page flip. All visual artifacts will disappear by the time the update is completed, as signalled through the vblank event's timestamp (see struct drm_event_vblank).
This flag must be set when the KMS update might cause visible artifacts. Without this flag such KMS update will return a EINVAL error. What kind of update may cause visible artifacts depends on the driver and the hardware. User-space that needs to know beforehand if an update might cause visible artifacts can use &DRM_MODE_ATOMIC_TEST_ONLY without &DRM_MODE_ATOMIC_ALLOW_MODESET to see if it fails.
To the best of the driver's knowledge, visual artifacts are guaranteed to not appear when this flag is not set. Some sinks might display visual artifacts outside of the driver's control.
| #define DRM_MODE_PAGE_FLIP_ASYNC 0x02 |
DRM_MODE_PAGE_FLIP_ASYNC
Request that the page-flip is performed as soon as possible, ie. with no delay due to waiting for vblank. This may cause tearing to be visible on the screen.
When used with atomic uAPI, the driver will return an error if the hardware doesn't support performing an asynchronous page-flip for this update. User-space should handle this, e.g. by falling back to a regular page-flip.
Note, some hardware might need to perform one last synchronous page-flip before being able to switch to asynchronous page-flips. As an exception, the driver will return success even though that first page-flip is not asynchronous.
| #define DRM_MODE_PAGE_FLIP_EVENT 0x01 |
DRM_MODE_PAGE_FLIP_EVENT
Request that the kernel sends back a vblank event (see struct drm_event_vblank) with the &DRM_EVENT_FLIP_COMPLETE type when the page-flip is done.
When used with atomic uAPI, one event will be delivered per CRTC included in the atomic commit. A CRTC is included in an atomic commit if one of its properties is set, or if a property is set on a connector or plane linked via the CRTC_ID property to the CRTC. At least one CRTC must be included, and all pulled in CRTCs must be either previously or newly powered on (in other words, a powered off CRTC which stays off cannot be included in the atomic commit).