.. | .. |
---|
38 | 38 | * Protocol version |
---|
39 | 39 | ****************************************************************************** |
---|
40 | 40 | */ |
---|
41 | | -#define XENDISPL_PROTOCOL_VERSION "1" |
---|
| 41 | +#define XENDISPL_PROTOCOL_VERSION "2" |
---|
| 42 | +#define XENDISPL_PROTOCOL_VERSION_INT 2 |
---|
42 | 43 | |
---|
43 | 44 | /* |
---|
44 | 45 | ****************************************************************************** |
---|
.. | .. |
---|
202 | 203 | * Width and height of the connector in pixels separated by |
---|
203 | 204 | * XENDISPL_RESOLUTION_SEPARATOR. This defines visible area of the |
---|
204 | 205 | * display. |
---|
| 206 | + * If backend provides extended display identification data (EDID) with |
---|
| 207 | + * XENDISPL_OP_GET_EDID request then EDID values must take precedence |
---|
| 208 | + * over the resolutions defined here. |
---|
205 | 209 | * |
---|
206 | 210 | *------------------ Connector Request Transport Parameters ------------------- |
---|
207 | 211 | * |
---|
.. | .. |
---|
349 | 353 | #define XENDISPL_OP_FB_DETACH 0x13 |
---|
350 | 354 | #define XENDISPL_OP_SET_CONFIG 0x14 |
---|
351 | 355 | #define XENDISPL_OP_PG_FLIP 0x15 |
---|
| 356 | +/* The below command is available in protocol version 2 and above. */ |
---|
| 357 | +#define XENDISPL_OP_GET_EDID 0x16 |
---|
352 | 358 | |
---|
353 | 359 | /* |
---|
354 | 360 | ****************************************************************************** |
---|
.. | .. |
---|
376 | 382 | #define XENDISPL_FIELD_RESOLUTION "resolution" |
---|
377 | 383 | #define XENDISPL_FIELD_BE_ALLOC "be-alloc" |
---|
378 | 384 | #define XENDISPL_FIELD_UNIQUE_ID "unique-id" |
---|
| 385 | + |
---|
| 386 | +#define XENDISPL_EDID_BLOCK_SIZE 128 |
---|
| 387 | +#define XENDISPL_EDID_BLOCK_COUNT 256 |
---|
| 388 | +#define XENDISPL_EDID_MAX_SIZE (XENDISPL_EDID_BLOCK_SIZE * XENDISPL_EDID_BLOCK_COUNT) |
---|
379 | 389 | |
---|
380 | 390 | /* |
---|
381 | 391 | ****************************************************************************** |
---|
.. | .. |
---|
451 | 461 | * +----------------+----------------+----------------+----------------+ |
---|
452 | 462 | * | gref_directory | 40 |
---|
453 | 463 | * +----------------+----------------+----------------+----------------+ |
---|
454 | | - * | reserved | 44 |
---|
| 464 | + * | data_ofs | 44 |
---|
| 465 | + * +----------------+----------------+----------------+----------------+ |
---|
| 466 | + * | reserved | 48 |
---|
455 | 467 | * +----------------+----------------+----------------+----------------+ |
---|
456 | 468 | * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/| |
---|
457 | 469 | * +----------------+----------------+----------------+----------------+ |
---|
.. | .. |
---|
494 | 506 | * buffer size (buffer_sz) exceeds what can be addressed by this single page, |
---|
495 | 507 | * then reference to the next page must be supplied (see gref_dir_next_page |
---|
496 | 508 | * below) |
---|
| 509 | + * data_ofs - uint32_t, offset of the data in the buffer, octets |
---|
497 | 510 | */ |
---|
498 | 511 | |
---|
499 | 512 | #define XENDISPL_DBUF_FLG_REQ_ALLOC (1 << 0) |
---|
.. | .. |
---|
506 | 519 | uint32_t buffer_sz; |
---|
507 | 520 | uint32_t flags; |
---|
508 | 521 | grant_ref_t gref_directory; |
---|
| 522 | + uint32_t data_ofs; |
---|
509 | 523 | }; |
---|
510 | 524 | |
---|
511 | 525 | /* |
---|
.. | .. |
---|
732 | 746 | }; |
---|
733 | 747 | |
---|
734 | 748 | /* |
---|
| 749 | + * Request EDID - request EDID describing current connector: |
---|
| 750 | + * 0 1 2 3 octet |
---|
| 751 | + * +----------------+----------------+----------------+----------------+ |
---|
| 752 | + * | id | _OP_GET_EDID | reserved | 4 |
---|
| 753 | + * +----------------+----------------+----------------+----------------+ |
---|
| 754 | + * | buffer_sz | 8 |
---|
| 755 | + * +----------------+----------------+----------------+----------------+ |
---|
| 756 | + * | gref_directory | 12 |
---|
| 757 | + * +----------------+----------------+----------------+----------------+ |
---|
| 758 | + * | reserved | 16 |
---|
| 759 | + * +----------------+----------------+----------------+----------------+ |
---|
| 760 | + * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/| |
---|
| 761 | + * +----------------+----------------+----------------+----------------+ |
---|
| 762 | + * | reserved | 64 |
---|
| 763 | + * +----------------+----------------+----------------+----------------+ |
---|
| 764 | + * |
---|
| 765 | + * Notes: |
---|
| 766 | + * - This command is not available in protocol version 1 and should be |
---|
| 767 | + * ignored. |
---|
| 768 | + * - This request is optional and if not supported then visible area |
---|
| 769 | + * is defined by the relevant XenStore's "resolution" property. |
---|
| 770 | + * - Shared buffer, allocated for EDID storage, must not be less then |
---|
| 771 | + * XENDISPL_EDID_MAX_SIZE octets. |
---|
| 772 | + * |
---|
| 773 | + * buffer_sz - uint32_t, buffer size to be allocated, octets |
---|
| 774 | + * gref_directory - grant_ref_t, a reference to the first shared page |
---|
| 775 | + * describing EDID buffer references. See XENDISPL_OP_DBUF_CREATE for |
---|
| 776 | + * grant page directory structure (struct xendispl_page_directory). |
---|
| 777 | + * |
---|
| 778 | + * See response format for this request. |
---|
| 779 | + */ |
---|
| 780 | + |
---|
| 781 | +struct xendispl_get_edid_req { |
---|
| 782 | + uint32_t buffer_sz; |
---|
| 783 | + grant_ref_t gref_directory; |
---|
| 784 | +}; |
---|
| 785 | + |
---|
| 786 | +/* |
---|
735 | 787 | *---------------------------------- Responses -------------------------------- |
---|
736 | 788 | * |
---|
737 | 789 | * All response packets have the same length (64 octets) |
---|
.. | .. |
---|
753 | 805 | * id - uint16_t, private guest value, echoed from request |
---|
754 | 806 | * status - int32_t, response status, zero on success and -XEN_EXX on failure |
---|
755 | 807 | * |
---|
| 808 | + * |
---|
| 809 | + * Get EDID response - response for XENDISPL_OP_GET_EDID: |
---|
| 810 | + * 0 1 2 3 octet |
---|
| 811 | + * +----------------+----------------+----------------+----------------+ |
---|
| 812 | + * | id | operation | reserved | 4 |
---|
| 813 | + * +----------------+----------------+----------------+----------------+ |
---|
| 814 | + * | status | 8 |
---|
| 815 | + * +----------------+----------------+----------------+----------------+ |
---|
| 816 | + * | edid_sz | 12 |
---|
| 817 | + * +----------------+----------------+----------------+----------------+ |
---|
| 818 | + * | reserved | 16 |
---|
| 819 | + * +----------------+----------------+----------------+----------------+ |
---|
| 820 | + * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/| |
---|
| 821 | + * +----------------+----------------+----------------+----------------+ |
---|
| 822 | + * | reserved | 64 |
---|
| 823 | + * +----------------+----------------+----------------+----------------+ |
---|
| 824 | + * |
---|
| 825 | + * Notes: |
---|
| 826 | + * - This response is not available in protocol version 1 and should be |
---|
| 827 | + * ignored. |
---|
| 828 | + * |
---|
| 829 | + * edid_sz - uint32_t, size of the EDID, octets |
---|
| 830 | + */ |
---|
| 831 | + |
---|
| 832 | +struct xendispl_get_edid_resp { |
---|
| 833 | + uint32_t edid_sz; |
---|
| 834 | +}; |
---|
| 835 | + |
---|
| 836 | +/* |
---|
756 | 837 | *----------------------------------- Events ---------------------------------- |
---|
757 | 838 | * |
---|
758 | 839 | * Events are sent via a shared page allocated by the front and propagated by |
---|
.. | .. |
---|
804 | 885 | struct xendispl_fb_detach_req fb_detach; |
---|
805 | 886 | struct xendispl_set_config_req set_config; |
---|
806 | 887 | struct xendispl_page_flip_req pg_flip; |
---|
| 888 | + struct xendispl_get_edid_req get_edid; |
---|
807 | 889 | uint8_t reserved[56]; |
---|
808 | 890 | } op; |
---|
809 | 891 | }; |
---|
.. | .. |
---|
813 | 895 | uint8_t operation; |
---|
814 | 896 | uint8_t reserved; |
---|
815 | 897 | int32_t status; |
---|
816 | | - uint8_t reserved1[56]; |
---|
| 898 | + union { |
---|
| 899 | + struct xendispl_get_edid_resp get_edid; |
---|
| 900 | + uint8_t reserved1[56]; |
---|
| 901 | + } op; |
---|
817 | 902 | }; |
---|
818 | 903 | |
---|
819 | 904 | struct xendispl_evt { |
---|