Rev 5368 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5368 | Rev 6110 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | */ |
34 | */ |
Line 35... | Line 35... | ||
35 | 35 | ||
36 | #ifndef _XF86DRMMODE_H_ |
36 | #ifndef _XF86DRMMODE_H_ |
Line 37... | Line 37... | ||
37 | #define _XF86DRMMODE_H_ |
37 | #define _XF86DRMMODE_H_ |
38 | 38 | ||
39 | #if defined(__cplusplus) || defined(c_plusplus) |
39 | #if defined(__cplusplus) |
Line 40... | Line 40... | ||
40 | extern "C" { |
40 | extern "C" { |
Line 238... | Line 238... | ||
238 | struct drm_mode_property_enum *enums; |
238 | struct drm_mode_property_enum *enums; |
239 | int count_blobs; |
239 | int count_blobs; |
240 | uint32_t *blob_ids; /* store the blob IDs */ |
240 | uint32_t *blob_ids; /* store the blob IDs */ |
241 | } drmModePropertyRes, *drmModePropertyPtr; |
241 | } drmModePropertyRes, *drmModePropertyPtr; |
Line -... | Line 242... | ||
- | 242 | ||
- | 243 | static __inline int drm_property_type_is(drmModePropertyPtr property, |
|
- | 244 | uint32_t type) |
|
- | 245 | { |
|
- | 246 | /* instanceof for props.. handles extended type vs original types: */ |
|
- | 247 | if (property->flags & DRM_MODE_PROP_EXTENDED_TYPE) |
|
- | 248 | return (property->flags & DRM_MODE_PROP_EXTENDED_TYPE) == type; |
|
- | 249 | return property->flags & type; |
|
- | 250 | } |
|
242 | 251 | ||
243 | typedef struct _drmModeCrtc { |
252 | typedef struct _drmModeCrtc { |
244 | uint32_t crtc_id; |
253 | uint32_t crtc_id; |
Line 245... | Line 254... | ||
245 | uint32_t buffer_id; /**< FB id to connect to 0 = disconnect */ |
254 | uint32_t buffer_id; /**< FB id to connect to 0 = disconnect */ |
Line 411... | Line 420... | ||
411 | /* |
420 | /* |
412 | * Connector manipulation |
421 | * Connector manipulation |
413 | */ |
422 | */ |
Line 414... | Line 423... | ||
414 | 423 | ||
415 | /** |
424 | /** |
- | 425 | * Retrieve all information about the connector connectorId. This will do a |
|
- | 426 | * forced probe on the connector to retrieve remote information such as EDIDs |
|
416 | * Retrive information about the connector connectorId. |
427 | * from the display device. |
417 | */ |
428 | */ |
418 | extern drmModeConnectorPtr drmModeGetConnector(int fd, |
429 | extern drmModeConnectorPtr drmModeGetConnector(int fd, |
Line 419... | Line 430... | ||
419 | uint32_t connectorId); |
430 | uint32_t connectorId); |
- | 431 | ||
- | 432 | /** |
|
- | 433 | * Retrieve current information, i.e the currently active mode and encoder, |
|
- | 434 | * about the connector connectorId. This will not do any probing on the |
|
- | 435 | * connector or remote device, and only reports what is currently known. |
|
- | 436 | * For the complete set of modes and encoders associated with the connector |
|
- | 437 | * use drmModeGetConnector() which will do a probe to determine any display |
|
- | 438 | * link changes first. |
|
- | 439 | */ |
|
- | 440 | extern drmModeConnectorPtr drmModeGetConnectorCurrent(int fd, |
|
- | 441 | uint32_t connector_id); |
|
420 | 442 | ||
421 | /** |
443 | /** |
422 | * Attaches the given mode to an connector. |
444 | * Attaches the given mode to an connector. |
Line 423... | Line 445... | ||
423 | */ |
445 | */ |
Line 460... | Line 482... | ||
460 | extern void drmModeFreeObjectProperties(drmModeObjectPropertiesPtr ptr); |
482 | extern void drmModeFreeObjectProperties(drmModeObjectPropertiesPtr ptr); |
461 | extern int drmModeObjectSetProperty(int fd, uint32_t object_id, |
483 | extern int drmModeObjectSetProperty(int fd, uint32_t object_id, |
462 | uint32_t object_type, uint32_t property_id, |
484 | uint32_t object_type, uint32_t property_id, |
463 | uint64_t value); |
485 | uint64_t value); |
Line -... | Line 486... | ||
- | 486 | ||
- | 487 | ||
- | 488 | typedef struct _drmModeAtomicReq drmModeAtomicReq, *drmModeAtomicReqPtr; |
|
- | 489 | ||
- | 490 | extern drmModeAtomicReqPtr drmModeAtomicAlloc(void); |
|
- | 491 | extern drmModeAtomicReqPtr drmModeAtomicDuplicate(drmModeAtomicReqPtr req); |
|
- | 492 | extern int drmModeAtomicMerge(drmModeAtomicReqPtr base, |
|
- | 493 | drmModeAtomicReqPtr augment); |
|
- | 494 | extern void drmModeAtomicFree(drmModeAtomicReqPtr req); |
|
- | 495 | extern int drmModeAtomicGetCursor(drmModeAtomicReqPtr req); |
|
- | 496 | extern void drmModeAtomicSetCursor(drmModeAtomicReqPtr req, int cursor); |
|
- | 497 | extern int drmModeAtomicAddProperty(drmModeAtomicReqPtr req, |
|
- | 498 | uint32_t object_id, |
|
- | 499 | uint32_t property_id, |
|
- | 500 | uint64_t value); |
|
- | 501 | extern int drmModeAtomicCommit(int fd, |
|
- | 502 | drmModeAtomicReqPtr req, |
|
- | 503 | uint32_t flags, |
|
- | 504 | void *user_data); |
|
- | 505 | ||
- | 506 | extern int drmModeCreatePropertyBlob(int fd, const void *data, size_t size, |
|
- | 507 | uint32_t *id); |
|
- | 508 | extern int drmModeDestroyPropertyBlob(int fd, uint32_t id); |
|
- | 509 | ||
464 | 510 | ||
465 | #if defined(__cplusplus) || defined(c_plusplus) |
511 | #if defined(__cplusplus) |
466 | } |
512 | } |
Line 467... | Line 513... | ||
467 | #endif |
513 | #endif |