Home | History | Annotate | Line # | Download | only in include
      1 /*	$NetBSD: set_mode_types.h,v 1.2 2021/12/18 23:45:07 riastradh Exp $	*/
      2 
      3 /*
      4  * Copyright 2012-15 Advanced Micro Devices, Inc.
      5  *
      6  * Permission is hereby granted, free of charge, to any person obtaining a
      7  * copy of this software and associated documentation files (the "Software"),
      8  * to deal in the Software without restriction, including without limitation
      9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     10  * and/or sell copies of the Software, and to permit persons to whom the
     11  * Software is furnished to do so, subject to the following conditions:
     12  *
     13  * The above copyright notice and this permission notice shall be included in
     14  * all copies or substantial portions of the Software.
     15  *
     16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     19  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
     20  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
     21  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
     22  * OTHER DEALINGS IN THE SOFTWARE.
     23  *
     24  * Authors: AMD
     25  *
     26  */
     27 
     28 #ifndef __DAL_SET_MODE_TYPES_H__
     29 #define __DAL_SET_MODE_TYPES_H__
     30 
     31 #include "dc_types.h"
     32 #include <linux/hdmi.h>
     33 
     34 /* Info frame packet status */
     35 enum info_frame_flag {
     36 	INFO_PACKET_PACKET_INVALID = 0,
     37 	INFO_PACKET_PACKET_VALID = 1,
     38 	INFO_PACKET_PACKET_RESET = 2,
     39 	INFO_PACKET_PACKET_UPDATE_SCAN_TYPE = 8
     40 };
     41 
     42 struct hdmi_info_frame_header {
     43 	uint8_t info_frame_type;
     44 	uint8_t version;
     45 	uint8_t length;
     46 };
     47 
     48 #pragma pack(push)
     49 #pragma pack(1)
     50 
     51 struct info_packet_raw_data {
     52 	uint8_t hb0;
     53 	uint8_t hb1;
     54 	uint8_t hb2;
     55 	uint8_t sb[28]; /* sb0~sb27 */
     56 };
     57 
     58 union hdmi_info_packet {
     59 	struct avi_info_frame {
     60 		struct hdmi_info_frame_header header;
     61 
     62 		uint8_t CHECK_SUM:8;
     63 
     64 		uint8_t S0_S1:2;
     65 		uint8_t B0_B1:2;
     66 		uint8_t A0:1;
     67 		uint8_t Y0_Y1_Y2:3;
     68 
     69 		uint8_t R0_R3:4;
     70 		uint8_t M0_M1:2;
     71 		uint8_t C0_C1:2;
     72 
     73 		uint8_t SC0_SC1:2;
     74 		uint8_t Q0_Q1:2;
     75 		uint8_t EC0_EC2:3;
     76 		uint8_t ITC:1;
     77 
     78 		uint8_t VIC0_VIC7:8;
     79 
     80 		uint8_t PR0_PR3:4;
     81 		uint8_t CN0_CN1:2;
     82 		uint8_t YQ0_YQ1:2;
     83 
     84 		uint16_t bar_top;
     85 		uint16_t bar_bottom;
     86 		uint16_t bar_left;
     87 		uint16_t bar_right;
     88 
     89 		uint8_t F140_F143:4;
     90 		uint8_t ACE0_ACE3:4;
     91 
     92 		uint8_t reserved[13];
     93 	} bits;
     94 
     95 	struct info_packet_raw_data packet_raw_data;
     96 };
     97 
     98 #pragma pack(pop)
     99 
    100 #endif /* __DAL_SET_MODE_TYPES_H__ */
    101