|
33 | 33 | extern "C" { |
34 | 34 | #endif |
35 | 35 |
|
| 36 | +/** |
| 37 | + * DOC: overview |
| 38 | + * |
| 39 | + * DRM exposes many UAPI and structure definition to have a consistent |
| 40 | + * and standardized interface with user. |
| 41 | + * Userspace can refer to these structure definitions and UAPI formats |
| 42 | + * to communicate to driver |
| 43 | + */ |
| 44 | + |
36 | 45 | #define DRM_CONNECTOR_NAME_LEN 32 |
37 | 46 | #define DRM_DISPLAY_MODE_LEN 32 |
38 | 47 | #define DRM_PROP_NAME_LEN 32 |
@@ -630,24 +639,87 @@ struct drm_color_lut { |
630 | 639 | __u16 reserved; |
631 | 640 | }; |
632 | 641 |
|
633 | | -/* HDR Metadata Infoframe as per 861.G spec */ |
| 642 | +/** |
| 643 | + * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data. |
| 644 | + * |
| 645 | + * HDR Metadata Infoframe as per CTA 861.G spec. This is expected |
| 646 | + * to match exactly with the spec. |
| 647 | + * |
| 648 | + * Userspace is expected to pass the metadata information as per |
| 649 | + * the format described in this structure. |
| 650 | + */ |
634 | 651 | struct hdr_metadata_infoframe { |
| 652 | + /** |
| 653 | + * @eotf: Electro-Optical Transfer Function (EOTF) |
| 654 | + * used in the stream. |
| 655 | + */ |
635 | 656 | __u8 eotf; |
| 657 | + /** |
| 658 | + * @metadata_type: Static_Metadata_Descriptor_ID. |
| 659 | + */ |
636 | 660 | __u8 metadata_type; |
| 661 | + /** |
| 662 | + * @display_primaries: Color Primaries of the Data. |
| 663 | + * These are coded as unsigned 16-bit values in units of |
| 664 | + * 0.00002, where 0x0000 represents zero and 0xC350 |
| 665 | + * represents 1.0000. |
| 666 | + * @display_primaries.x: X cordinate of color primary. |
| 667 | + * @display_primaries.y: Y cordinate of color primary. |
| 668 | + */ |
637 | 669 | struct { |
638 | 670 | __u16 x, y; |
639 | 671 | } display_primaries[3]; |
| 672 | + /** |
| 673 | + * @white_point: White Point of Colorspace Data. |
| 674 | + * These are coded as unsigned 16-bit values in units of |
| 675 | + * 0.00002, where 0x0000 represents zero and 0xC350 |
| 676 | + * represents 1.0000. |
| 677 | + * @white_point.x: X cordinate of whitepoint of color primary. |
| 678 | + * @white_point.y: Y cordinate of whitepoint of color primary. |
| 679 | + */ |
640 | 680 | struct { |
641 | 681 | __u16 x, y; |
642 | 682 | } white_point; |
| 683 | + /** |
| 684 | + * @max_display_mastering_luminance: Max Mastering Display Luminance. |
| 685 | + * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, |
| 686 | + * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. |
| 687 | + */ |
643 | 688 | __u16 max_display_mastering_luminance; |
| 689 | + /** |
| 690 | + * @min_display_mastering_luminance: Min Mastering Display Luminance. |
| 691 | + * This value is coded as an unsigned 16-bit value in units of |
| 692 | + * 0.0001 cd/m2, where 0x0001 represents 0.0001 cd/m2 and 0xFFFF |
| 693 | + * represents 6.5535 cd/m2. |
| 694 | + */ |
644 | 695 | __u16 min_display_mastering_luminance; |
| 696 | + /** |
| 697 | + * @max_cll: Max Content Light Level. |
| 698 | + * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, |
| 699 | + * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. |
| 700 | + */ |
645 | 701 | __u16 max_cll; |
| 702 | + /** |
| 703 | + * @max_fall: Max Frame Average Light Level. |
| 704 | + * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, |
| 705 | + * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. |
| 706 | + */ |
646 | 707 | __u16 max_fall; |
647 | 708 | }; |
648 | 709 |
|
| 710 | +/** |
| 711 | + * struct hdr_output_metadata - HDR output metadata |
| 712 | + * |
| 713 | + * Metadata Information to be passed from userspace |
| 714 | + */ |
649 | 715 | struct hdr_output_metadata { |
| 716 | + /** |
| 717 | + * @metadata_type: Static_Metadata_Descriptor_ID. |
| 718 | + */ |
650 | 719 | __u32 metadata_type; |
| 720 | + /** |
| 721 | + * @hdmi_metadata_type1: HDR Metadata Infoframe. |
| 722 | + */ |
651 | 723 | union { |
652 | 724 | struct hdr_metadata_infoframe hdmi_metadata_type1; |
653 | 725 | }; |
|
0 commit comments