更新UCD-API库及文档

This commit is contained in:
xinzhu.yin
2026-07-02 17:16:18 +08:00
parent a500751d85
commit 9fa811a9eb
290 changed files with 9558 additions and 2306 deletions

View File

@@ -1996,40 +1996,6 @@
"minValue": 0,
"name": "Maximum refresh rate for supported Adaptive-Sync video timings, in Hz.",
"type": 4
},
{
"configId": "0x10e000d",
"defaultValue": "0",
"description": "Reserved for extension.",
"bitList":
[
{"description": "0x10e000d", "defaultValue": "0"},
{"description": "0x10e000f", "defaultValue": "0"},
{"description": "0x10e001c", "defaultValue": "0"},
{"description": "0x10e001d", "defaultValue": "0"},
{"description": "0x10e001e", "defaultValue": "0"},
{"description": "0x10e001f", "defaultValue": "0"},
{"description": "0x10e002f", "defaultValue": "0"},
{"description": "0x10e0030", "defaultValue": "0"},
{"description": "0x10e0031", "defaultValue": "0"},
{"description": "0x10e0032", "defaultValue": "0"},
{"description": "0x10e0033", "defaultValue": "0"},
{"description": "0x10e0034", "defaultValue": "0"},
{"description": "0x10e0035", "defaultValue": "0"},
{"description": "0x10e0036", "defaultValue": "0"},
{"description": "0x10e0037", "defaultValue": "0"},
{"description": "0x10e00b7", "defaultValue": "0"},
{"description": "0x10e00b8", "defaultValue": "0"},
{"description": "0x10e00b9", "defaultValue": "0"},
{"description": "0x10e00ba", "defaultValue": "0"},
{"description": "0x10e00bb", "defaultValue": "0"},
{"description": "0x10e00bc", "defaultValue": "0"},
{"description": "0x10e00bd", "defaultValue": "0"},
{"description": "0x10e00be", "defaultValue": "0"}
],
"flag": 3,
"id": "RESERVED",
"type": 4
}
],
"id": "0x03",

View File

@@ -67,20 +67,6 @@
"minValue": 0,
"name": "Delay between test cycles, in milliseconds",
"type": 4
},
{
"configId": "0x10703",
"defaultValue": "0",
"description": "Reserved for DUT Capabilities flags and DUT Test automation capabilities flags.",
"bitList":
[
{"description": "0x10703", "defaultValue": "0"},
{"description": "0x10704", "defaultValue": "0"}
],
"flag": 3,
"id": "RESERVED",
"name": "Reserved",
"type": 4
}
],
"id": "0x04",

View File

@@ -65,7 +65,11 @@
{"mask": "0x01000000", "description": "2x1 tiled display and DisplayID Tiled Display Topology data block supported"},
{"mask": "0x02000000", "description": "Field sequential stereo and DisplayID Tiled Stereo Display Interface data block supported"},
{"mask": "0x04000000", "description": "Stacked frame stereo and DisplayID Tiled Stereo Display Interface data block supported"},
{"mask": "0x08000000", "description": "Dynamic Refresh Rate with VBlank stretch with MSA_TIMING_PAR_IGNORED supported"}
{"mask": "0x08000000", "description": "Dynamic Refresh Rate with VBlank stretch with MSA_TIMING_PAR_IGNORED supported"},
{"mask": "0x10000000", "description": "MST transmission supported"},
{"mask": "0x20000000", "description": "MST UP_REQUEST supported"},
{"mask": "0x40000000", "description": "MST RSN_REQUEST supported"},
{"mask": "0x80000000", "description": "MST POWER_UP/DOWN_PHY supported"}
],
"flag": 3,
"id": "TSI_DP20_SRCCTS_DUT_CAPS",
@@ -211,6 +215,17 @@
"name": "Debug mode configuration.",
"type": 12
},
{
"configId": "0x119000f",
"defaultValue": "1028",
"description": "Includes: Maximum stream count supported and Maximum daisy chain sink count supported.",
"flag": 3,
"id": "TSI_DP20_SRCCTS_DUT_MST_CAPS",
"maxValue": 2147483647,
"minValue": 0,
"name": "MST source DUT capabilities.",
"type": 4
},
{
"configId": "0x1190010",
"defaultValue": "32000",
@@ -2598,39 +2613,6 @@
"name": "Video mode supported by Source DUT (DP2.1 video & DSC tests)",
"type": 4
},
{
"configId": "0x119000f",
"defaultValue": "0",
"description": "Reserved for extension.",
"bitList":
[
{"description": "0x119000f", "defaultValue": "0"},
{"description": "0x119001c", "defaultValue": "0"},
{"description": "0x119001d", "defaultValue": "0"},
{"description": "0x119001e", "defaultValue": "0"},
{"description": "0x119001f", "defaultValue": "0"},
{"description": "0x119002f", "defaultValue": "0"},
{"description": "0x1190030", "defaultValue": "0"},
{"description": "0x1190031", "defaultValue": "0"},
{"description": "0x1190032", "defaultValue": "0"},
{"description": "0x1190033", "defaultValue": "0"},
{"description": "0x1190034", "defaultValue": "0"},
{"description": "0x1190035", "defaultValue": "0"},
{"description": "0x1190036", "defaultValue": "0"},
{"description": "0x1190037", "defaultValue": "0"},
{"description": "0x11900b7", "defaultValue": "0"},
{"description": "0x11900b8", "defaultValue": "0"},
{"description": "0x11900b9", "defaultValue": "0"},
{"description": "0x11900ba", "defaultValue": "0"},
{"description": "0x11900bb", "defaultValue": "0"},
{"description": "0x11900bc", "defaultValue": "0"},
{"description": "0x11900bd", "defaultValue": "0"},
{"description": "0x11900be", "defaultValue": "0"}
],
"flag": 3,
"id": "RESERVED",
"type": 4
},
{
"configId": "0x11900f4",
"defaultValue": "1920",

View File

@@ -132,7 +132,7 @@
],
"flag": 1,
"id": "TSI_HDMI_SNKCTS_DSC_VIDEO_FORMAT",
"name": "DSC Video formats 1.",
"name": "DSC Video formats 1",
"type": 12
},
{
@@ -174,7 +174,7 @@
],
"flag": 1,
"id": "TSI_HDMI_SNKCTS_DSC_VIDEO_FORMAT_2",
"name": "DSC Video formats 2.",
"name": "DSC Video formats 2",
"type": 12
},
{
@@ -197,7 +197,7 @@
"id": "TSI_HDMI_SNKCTS_DSC_TOTAL_CHUNK_BYTES",
"maxValue": 2147483647,
"minValue": 0,
"name": "DSC Max Slices",
"name": "DSC TotalChunkKBytes",
"type": 4
}
],

View File

@@ -1,66 +1,8 @@
{
"descriptions": [
{
"configId": "0x2100",
"defaultValue": "0",
"description": "Does the Sink support Fast Vactive (FVA), also known as Quick Frame Transport (QFT)?",
"flag": 3,
"id": "TSI_HDMI_GAMING_FVA",
"maxValue": 1,
"minValue": 0,
"name": "Sink_Supports_FVA",
"type": 3,
"enumerationVariants": "0 # NO\n1 # YES"
},
{
"configId": "0x2101",
"defaultValue": "1",
"description": "Does the Sink support Variable Refresh Rate (VRR)",
"flag": 3,
"id": "TSI_HDMI_GAMING_VRR",
"maxValue": 1,
"minValue": 0,
"name": "Sink_Supports_VRR",
"type": 3,
"enumerationVariants": "0 # NO\n1 # YES"
},
{
"configId": "0x2102",
"defaultValue": "0",
"description": "Does the Sink support Negative Mvrr values?",
"flag": 3,
"id": "TSI_HDMI_GAMING_NMVRR",
"maxValue": 1,
"minValue": 0,
"name": "Sink_Supports_Negative_MVRR",
"type": 3,
"enumerationVariants": "0 # NO\n1 # YES"
},
{
"configId": "0x2103",
"defaultValue": "40",
"description": "What is the Sinks supported VRR Range? Minimum value.\n",
"flag": 3,
"id": "TSI_HDMI_GAMING_RANGE_MIN",
"maxValue": 480,
"minValue": 20,
"name": "Sink_Supported_VRR_Range VRRMIN",
"type": 4
},
{
"configId": "0x2104",
"defaultValue": "0",
"description": "What is the Sinks supported VRR Range? Maximum value or BRR\n",
"flag": 3,
"id": "TSI_HDMI_GAMING_RANGE_MAX",
"maxValue": 480,
"minValue": 20,
"name": "Sink_Supported_VRR_Range VRRMAX or 0 for BRR",
"type": 4
},
{
"configId": "0x2105",
"defaultValue": "0",
"defaultValue": "1",
"description": "Does the Sink implement Auto Low-Latency Mode (ALLM)?",
"flag": 3,
"id": "TSI_HDMI_GAMING_ALLM",
@@ -72,32 +14,28 @@
},
{
"configId": "0x2106",
"defaultValue": "0",
"defaultValue": "Cinema",
"description": "Which display processing mode is the preferred mode with normal latency?",
"flag": 3,
"id": "TSI_HDMI_GAMING_NLM",
"maxValue": 2,
"minValue": 0,
"name": "Sink_Preferred_NLM",
"type": 4,
"enumerationVariants": "0 # Cinema\n1 # Vivid\n2 # Normal"
"type": 2,
"maxLength": 256
},
{
"configId": "0x2107",
"defaultValue": "0",
"defaultValue": "Gaming",
"description": "Which display processing mode is the preferred mode to minimize latency?",
"flag": 3,
"id": "TSI_HDMI_GAMING_LLM",
"maxValue": 1,
"minValue": 0,
"name": "Sink_Preferred_LLM",
"type": 4,
"enumerationVariants": "0 # Game\n1 # PC"
"type": 2,
"maxLength": 256
},
{
{
"configId": "0x2108",
"defaultValue": "1",
"description": "Does the Sink DUT support QMS-VRR?",
"description": "Does the Sink supports QMS-VRR?",
"flag": 3,
"id": "TSI_HDMI_GAMING_QMS",
"maxValue": 1,
@@ -106,29 +44,59 @@
"type": 3,
"enumerationVariants": "0 # NO\n1 # YES"
},
{
"configId": "0x2109",
"defaultValue": "97",
"description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_TMDS are supported by the Sink using TMDS?",
{
"configId": "0x2101",
"defaultValue": "1",
"description": "Does the Sink supports VRR?",
"flag": 3,
"id": "TSI_HDMI_GAMING_VIDEO_TMDS",
"maxValue": 255,
"minValue": 16,
"name": "Sink_QMS_Video_Format_TMDS",
"type": 4,
"enumerationVariants": "78 # VIC=78; 1920x1080@120\n97 # VIC=97; 3840x2160@60"
"id": "TSI_HDMI_GAMING_VRR",
"maxValue": 1,
"minValue": 0,
"name": "Sink_Supports_VRR",
"type": 3,
"enumerationVariants": "0 # NO\n1 # YES"
},
{
"configId": "0x2103",
"defaultValue": "0",
"description": "What is the Sink's supported VRR Range?",
"bitList": [
{
"mask": "0xFFFF",
"description": "VRR min"
},
{
"mask": "0xFFFF0000",
"description": "VRR max (0 for BRR)"
}
],
"flag": 12,
"id": "TSI_HDMI_GAMING_VRR_RANGE",
"name": "Sink_Supported_VRR_Range",
"type": 12
},
{
"configId": "0x210A",
"defaultValue": "118",
"description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_FRL are supported by the Sink using FRL?",
"flag": 3,
"defaultValue": "0x0003c0043800780",
"description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_FRL are supported by the Sink using TMDS?",
"bitList": [
{
"mask": "0xFFFFF",
"description": "Width"
},
{
"mask": "0xFFFFF00000",
"description": "Height"
},
{
"mask": "0xFFFFF0000000000",
"description": "BRR"
}
],
"flag": 12,
"id": "TSI_HDMI_GAMING_VIDEO_FRL",
"maxValue": 255,
"minValue": 16,
"name": "Sink_QMS_Video_Format_FRL",
"type": 4,
"enumerationVariants": "0 # N/A\n78 # VIC=78; 1920x1080@120\n97 # VIC=97; 3840x2160@60\n118 # VIC=118; 3840x2160@120"
"type": 13
},
{
"configId": "0x210B",
@@ -140,11 +108,11 @@
"minValue": 0,
"name": "Sink_QMS_Min_TFR",
"type": 4,
"enumerationVariants": "0 # N/A\n1 # TFR=1; 24/1.001\n2 # TFR=2; 24\n3 # TFR=3; 25\n4 # TFR=4; 30/1.001\n5 # TFR=5; 30\n6 # TFR=6; 48/1.001\n7 # TFR=7; 48\n8 # TFR=8; 50\n9 # TFR=9; 60/1.001\n10 # TFR=10; 60\n11 # TFR=11; 100\n12 # TFR=12; 120/1.001\n13 # TFR=13; 120"
"enumerationVariants": "0 # N/A\n1 # 1 - 24/1.001\n2 # 2 - 24\n3 # 3 - 25\n4 # 4 - 30/1.001\n5 # 5 - 30\n6 # 6 - 48/1.001\n7 # 7 - 48\n8 # 8 - 50\n9 # 9 - 60/1.001\n10 # 10 - 60\n11 # 11 - 100\n12 # 12 - 120/1.001\n13 # 13 - 120"
},
{
"configId": "0x210C",
"defaultValue": "10",
"defaultValue": "6",
"description": "If the Sink DUT supports QMS-VRR, what is the maximum Next_TFR value supported using TMDS? (Refer to the Next_TFR field definition in HDMI 2.1a Table 10-37.)",
"flag": 3,
"id": "TSI_HDMI_GAMING_MAX_TFR_TMDS",
@@ -152,11 +120,11 @@
"minValue": 0,
"name": "Sink_QMS_Max_TFR_TMDS",
"type": 4,
"enumerationVariants": "0 # N/A\n1 # TFR=1; 24/1.001\n2 # TFR=2; 24\n3 # TFR=3; 25\n4 # TFR=4; 30/1.001\n5 # TFR=5; 30\n6 # TFR=6; 48/1.001\n7 # TFR=7; 48\n8 # TFR=8; 50\n9 # TFR=9; 60/1.001\n10 # TFR=10; 60\n11 # TFR=11; 100\n12 # TFR=12; 120/1.001\n13 # TFR=13; 120"
"enumerationVariants": "0 # N/A\n1 # 1 - 24/1.001\n2 # 2 - 24\n3 # 3 - 25\n4 # 4 - 30/1.001\n5 # 5 - 30\n6 # 6 - 48/1.001\n7 # 7 - 48\n8 # 8 - 50\n9 # 9 - 60/1.001\n10 # 10 - 60\n11 # 11 - 100\n12 # 12 - 120/1.001\n13 # 13 - 120"
},
{
"configId": "0x210D",
"defaultValue": "13",
"defaultValue": "8",
"description": "If the Sink DUT supports QMS-VRR, what is the maximum Next_TFR value supported using FRL? (Refer to the Next_TFR field definition in HDMI 2.1a Table 10-37.)",
"flag": 3,
"id": "TSI_HDMI_GAMING_MAX_TFR_FRL",
@@ -164,9 +132,44 @@
"minValue": 0,
"name": "Sink_QMS_Max_TFR_FRL",
"type": 4,
"enumerationVariants": "0 # N/A\n1 # TFR=1; 24/1.001\n2 # TFR=2; 24\n3 # TFR=3; 25\n4 # TFR=4; 30/1.001\n5 # TFR=5; 30\n6 # TFR=6; 48/1.001\n7 # TFR=7; 48\n8 # TFR=8; 50\n9 # TFR=9; 60/1.001\n10 # TFR=10; 60\n11 # TFR=11; 100\n12 # TFR=12; 120/1.001\n13 # TFR=13; 120"
"enumerationVariants": "0 # N/A\n1 # 1 - 24/1.001\n2 # 2 - 24\n3 # 3 - 25\n4 # 4 - 30/1.001\n5 # 5 - 30\n6 # 6 - 48/1.001\n7 # 7 - 48\n8 # 8 - 50\n9 # 9 - 60/1.001\n10 # 10 - 60\n11 # 11 - 100\n12 # 12 - 120/1.001\n13 # 13 - 120"
},
{
"configId": "0x210E",
"defaultValue": "1",
"description": "What is the maximum FRL Rate that the product supports? (Set to 0 if the product does not support FRL reception.)",
"flag": 3,
"id": "TSI_HDMI_GAMING_MAX_FRL",
"maxValue": 6,
"minValue": 0,
"name": "Sink_Max_FRL_Rate",
"type": 4,
"enumerationVariants": "0 # N/A\n1 # 1\n2 # 2\n3 # 3\n4 # 4\n5 # 5\n6 # 6"
},
{
"configId": "0x210F",
"defaultValue": "0x0003c0043800780",
"description": "What is the highest resolution (i.e., width x height) and base refresh rate (BRR) for which all TFRs up to Sink_QMS_Max_TFR_TMDS are supported by the Sink using TMDS?",
"bitList": [
{
"mask": "0xFFFFF",
"description": "Width"
},
{
"mask": "0xFFFFF00000",
"description": "Height"
},
{
"mask": "0xFFFFF0000000000",
"description": "BRR"
}
],
"flag": 12,
"id": "TSI_HDMI_GAMING_VIDEO_TMDS",
"name": "Sink_QMS_Video_Format_TMDS",
"type": 13
}
],
"id": "0x23",
"name": "HDMI CTS MOI (VRR-QMS)"
"name": "HDMI CTS MOI Gaming Features"
}

View File

@@ -0,0 +1,197 @@
{
"descriptions": [
{
"configId": "0x01260000",
"defaultValue": "10000",
"description": "Defines timeout for all Timings video tests, in milliseconds. Default setting is 10000ms.\n",
"flag": 3,
"id": "TSI_TIMINGS_TIMEOUT",
"maxValue": 2147483647,
"minValue": 0,
"name": "Test timeout, in milliseconds",
"type": 4
},
{
"configId": "0x01260001",
"defaultValue": "200",
"description": "Total number of frames to be tested. After timings check for total number of frames test will be completed. If total number is equal to 0, then test will be executing up to test timeout. Default setting is 200.\n",
"flag": 3,
"id": "TSI_TIMINGS_FRAMES_TO_TEST",
"maxValue": 2147483647,
"minValue": 0,
"name": "Test duration, in frames",
"type": 4
},
{
"configId": "0x01260002",
"defaultValue": "2",
"description": "Number of bad frames allowed in test. Default setting is 2\n",
"flag": 3,
"id": "TSI_TIMINGS_LIM_FRAME_MISMATCHES",
"maxValue": 2147483647,
"minValue": 0,
"name": "Allowed mismatches, in frames",
"type": 4
},
{
"configId": "0x01260003",
"defaultValue": "24",
"description": "Defines the color depth as bits per pixel. If the input video color depth does not match this setting, the test will fail. Default setting is 24.\n",
"enumerationVariants": "12\n15\n16\n18\n20\n21\n24\n30\n32\n36\n48",
"flag": 3,
"id": "TSI_TIMINGS_REF_COLORDEPTH",
"maxValue": 2147480000,
"minValue": 0,
"name": "Expected color depth, as bits per pixel",
"type": 4
},
{
"configId": "0x01260004",
"defaultValue": "0",
"description": "Defines the required frame rate for timings test, in millihertz. Setting of zero (0) disables the frame-rate requirement. Default setting is 0.\n",
"flag": 3,
"id": "TSI_TIMINGS_REQUIRED_FRAME_RATE",
"maxValue": 2147483647,
"minValue": 0,
"name": "Expected frame rate, in millihertz (mHz)",
"type": 4
},
{
"configId": "0x01260005",
"defaultValue": "0",
"description": "Defines the maximum allowed deviation of input frame-rate from the required frame rate (TSI_TIMINGS_REQUIRED_FRAME_RATE), in millihertz. When this setting is non-zero, it defines the range of allowed frame rate as requirements ± tolerance. If the frame-rate requirement is set to zero, this setting has no effect. Default setting is 0 mHz.\n",
"flag": 3,
"id": "TSI_TIMINGS_FRAME_RATE_TOLERANCE",
"maxValue": 2147483647,
"minValue": 0,
"name": "Frame rate tolerance, in millihertz (mHz)",
"type": 4
},
{
"configId": "0x01260006",
"defaultValue": "2200",
"description": "Defined the expected video width, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1920.\n",
"flag": 3,
"id": "TSI_TIMINGS_REF_HTOTAL",
"maxValue": 2147483647,
"minValue": 0,
"name": "Expected video width, in pixels",
"type": 4
},
{
"configId": "0x01260007",
"defaultValue": "1125",
"description": "Defined the expected total video height, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1080.\n",
"flag": 3,
"id": "TSI_TIMINGS_REF_VTOTAL",
"maxValue": 2147483647,
"minValue": 0,
"name": "Expected total video height, in pixels",
"type": 4
},
{
"configId": "0x01260008",
"defaultValue": "1920",
"description": "Defined the expected active video width, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1920.\n",
"flag": 3,
"id": "TSI_TIMINGS_REF_HACTIVE",
"maxValue": 2147483647,
"minValue": 0,
"name": "Expected active video width, in pixels",
"type": 4
},
{
"configId": "0x01260009",
"defaultValue": "1080",
"description": "Defined the expected active video height, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1080.\n",
"flag": 3,
"id": "TSI_TIMINGS_REF_VACTIVE",
"maxValue": 2147483647,
"minValue": 0,
"name": "Expected active video height, in pixels",
"type": 4
},
{
"configId": "0x0126000a",
"defaultValue": "88",
"description": "Defined the expected horizontal front porch, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1920.\n",
"flag": 3,
"id": "TSI_TIMINGS_REF_HFRONT",
"maxValue": 2147483647,
"minValue": 0,
"name": "Expected horizontal front porch, in pixels",
"type": 4
},
{
"configId": "0x0126000b",
"defaultValue": "4",
"description": "Defined the expected vertical front porch, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1080.\n",
"flag": 3,
"id": "TSI_TIMINGS_REF_VFRONT",
"maxValue": 2147483647,
"minValue": 0,
"name": "Expected vertical front porch, in pixels",
"type": 4
},
{
"configId": "0x0126000c",
"defaultValue": "44",
"description": "Defined the expected horizontal sync interval, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1920.\n",
"flag": 3,
"id": "TSI_TIMINGS_REF_HSYNC",
"maxValue": 2147483647,
"minValue": 0,
"name": "Expected horizontal sync interval, in pixels",
"type": 4
},
{
"configId": "0x0126000d",
"defaultValue": "5",
"description": "Defined the expected vertical sync interval, in pixels. If the video being received does not match this setting, the test will fail. Default setting is 1080.\n",
"flag": 3,
"id": "TSI_TIMINGS_REF_VSYNC",
"maxValue": 2147483647,
"minValue": 0,
"name": "Expected vertical sync interval, in pixels",
"type": 4
},
{
"configId": "0x0126000e",
"defaultValue": "0",
"description": "Data transfer timeout in milliseconds. Default setting is 0.\n",
"flag": 3,
"id": "TSI_TIMINGS_DATA_TRANSFER_TIMEOUT",
"maxValue": 2147483647,
"minValue": 0,
"name": "Data transfer timeout.",
"type": 4
},
{
"configId": "0x01260021",
"defaultValue": "",
"description": "Contains the full path to the folder where failed frames are to be saved without trailing backslash (\\). No default. Failed frame file-name will be “Failed_<#>.ppm”, where <#> is replaced with an auto-incremented number.",
"flag": 3,
"id": "TSI_FAILED_FRAME_TARGET_FOLDER",
"maxLength": 10000,
"name": "Location where the failed frames are to be saved",
"type": 11
},
{
"configId": "0x01260022",
"defaultValue": "0",
"description": "Defines the number of failed frames to be exported from the video test. Default setting is 0. If the setting is 0, no frames are exported.",
"flag": 3,
"id": "TSI_MAX_EXPORT_FAILED",
"maxValue": 2147483647,
"minValue": 0,
"name": "Maximum number of exported frames",
"type": 4
}
],
"id": "0x2d",
"name": "Timings Video Tests",
"shortName": "Timings Video Tests",
"old_names": [
"Timings Video Test Set"
]
}

View File

@@ -0,0 +1,67 @@
{
"descriptions": [
{
"configId": "0x1270000",
"defaultValue": "5000",
"description": "Defines test timeout in milliseconds, default value is 5000ms.",
"flag": 3,
"id": "TSI_DP20_MST_BRANCH_TIMEOUT",
"maxValue": 2147483647,
"minValue": 0,
"name": "Test timeout in milliseconds.",
"reportFormat": "Test timeout = %2ms<br>",
"type": 4
},
{
"configId": "0x1270001",
"defaultValue": "0x00000000",
"description": "Defines the DUT capabilities as flags.",
"bitList":
[
{"mask": "0x00000001", "description": "DUT supports CSN DFP broadcast", "reportFormat": "- DUT is Type-C device<br>"}
],
"flag": 3,
"id": "TSI_DP20_MST_BRANCH_DUT_CAPS",
"name": "DUT Capability flags.",
"reportFormat": "Test DUT capabilities flags:<br>",
"type": 12
},
{
"configId": "0x1270002",
"defaultValue": "0x00000010",
"description": "Defines the numbers of DUT UFP and DFP ports connected to TE.",
"bitList":
[
{"mask": "0x0000000f", "description": "DUT UFP port connected to TE"},
{"mask": "0x000000f0", "description": "DUT DFP port connected to TE"}
],
"flag": 3,
"id": "TSI_DP20_MST_BRANCH_DUT_UFP_DFP_PORTS",
"name": "DUT UFP and DFP ports connected to TE",
"reportFormat": "DUT UFP and DFP ports connected to TE:<br>",
"type": 12
},
{
"configId": "0x1270003",
"defaultValue": "0x00005432",
"description": "Defines the numbers of DUT DFP ports connected to external sinks.",
"bitList":
[
{"mask": "0x0000000f", "description": "DUT DFP port connected to Sink 1"},
{"mask": "0x000000f0", "description": "DUT DFP port connected to Sink 2"},
{"mask": "0x00000f00", "description": "DUT DFP port connected to Sink 3"},
{"mask": "0x0000f000", "description": "DUT DFP port connected to Sink 4"}
],
"flag": 3,
"id": "TSI_DP20_MST_BRANCH_DUT_SINK_PORTS",
"name": "DUT DFP ports connected to external sinks",
"reportFormat": "DUT DFP ports connected to external sinks:<br>",
"type": 12
}
],
"id": "0x2E",
"name": "DP 2.1 MST Branch CTS",
"old_names": [
"DP 2.1 MST Branch CTS"
]
}

View File

@@ -26,6 +26,13 @@ from .hdmi_sink_tests import HdmiSinkDUTTestParam, HdmiTestMode, HdmiFrlRate
from .hdmi_source_tests import HdmiSourceDUTTestParam
from .hdmi_sink_continuity_tests import HdmiSinkContinuityDUTTestParam
from .hdmi_sink_cable_check_tests import HdmiSinkCableCheckTestParam
from .hdmi_hdcp_1a_tests import HdmiHdcp1ATestParam
from .hdmi_hdcp_1b_tests import HdmiHdcp1BTestParam
from .hdmi_hdcp_2c_tests import HdmiHdcp2CTestParam
from .hdmi_hdcp_3a_tests import HdmiHdcp3ATestParam
from .hdmi_hdcp_3b_tests import HdmiHdcp3BTestParam
from .hdmi_hdcp_3c_tests import HdmiHdcp3CTestParam
from .dp_2_1_branch_mst import Dp21BranchMSTSourceDUTTestParam
from ..test_group_params_types import Param, get_param_list
DUTTestParameters = TypeVar("DUTTestParameters",
@@ -53,4 +60,12 @@ DUTTestParameters = TypeVar("DUTTestParameters",
Hdr10TestParam,
HdmiSinkDUTTestParam,
HdmiSinkContinuityDUTTestParam,
HdmiSinkCableCheckTestParam)
HdmiSinkCableCheckTestParam,
HdmiHdcp1ATestParam,
HdmiHdcp1BTestParam,
HdmiHdcp2CTestParam,
HdmiHdcp3ATestParam,
HdmiHdcp3BTestParam,
HdmiHdcp3CTestParam,
Dp21BranchMSTSourceDUTTestParam
)

View File

@@ -4,6 +4,7 @@ from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_adaptive_sync_tab
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_2_1_video_modes import Dp21AvailableVideoModes
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_2_1_dsc_video_modes import Dp21AvailableDscVideoModes
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_source_audio_tab import AudioSourceDp21SettingTab
from UniTAP.dev.modules.dut_tests.dut_default_params.dp_2_1_mst import Dp21MstSettingsTab
class Dp21SourceDUTTestParam:
@@ -13,6 +14,7 @@ class Dp21SourceDUTTestParam:
- Set and get `DisplayIdDp21ConfigTab`. Allows working with parameters from Display ID part `display_id`.
- Set and get `AdaptiveSyncDp21ConfigTab`. Allows working with parameters from Adaptive-Sync part `adaptive_sync`.
- Set and get `Dp21AvailableVideoModes`. Allows working with parameters from Video modes part `video_modes`.
- Set and get `Dp21MstSettingsTab`. Allows working with parameters from MST part `mst`.
"""
def __init__(self, json_obj):
self.__general_tab = GeneralSourceDUTDp21SettingTab(json_obj)
@@ -21,6 +23,7 @@ class Dp21SourceDUTTestParam:
self.__adaptive_sync_tab = AdaptiveSyncDp21ConfigTab(json_obj)
self.__video_modes = Dp21AvailableVideoModes(json_obj)
self.__dsc_video_modes = Dp21AvailableDscVideoModes(json_obj)
self.__mst_tab = Dp21MstSettingsTab(json_obj)
@property
def general(self) -> GeneralSourceDUTDp21SettingTab:
@@ -81,3 +84,13 @@ class Dp21SourceDUTTestParam:
object of `Dp21AvailableVideoModes` type
"""
return self.__dsc_video_modes
@property
def mst(self) -> Dp21MstSettingsTab:
"""
Get object of parameters from Video modes source part.
Returns:
object of `Dp21MstSettingsTab` type
"""
return self.__mst_tab

View File

@@ -0,0 +1,210 @@
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
class DutCapsMSTBranchFlags:
"""
Class `DutCapsDp21Flags` defines the DUT capabilities as flags.
Setting:
- DUT CSN DFP broadcast supported flag `support_csn_dfp_broadcast`.
"""
def __init__(self, json_obj):
self.__value = Param(json_obj)
@property
def support_csn_dfp_broadcast(self) -> bool:
"""
Set and get DUT CSN DFP broadcast flag support.
Returns:
object of bool type
"""
return self.__value._get_by_bitmask(0, bool)
@support_csn_dfp_broadcast.setter
def support_csn_dfp_broadcast(self, support_csn_dfp_broadcast: bool):
self.__value._set_by_bitmask(support_csn_dfp_broadcast, 0)
class PortsConnectedToTE:
"""
Class `PortsConnectedToTE` which defines the numbers of DUT UFP and DFP ports connected to TE.
Setting:
- Number of DUT UFP ports connected to TE `ufp_ports`.
- Number of DUT DFP ports connected to TE `dfp_ports`.
"""
def __init__(self, json_obj):
self.__value = Param(json_obj)
@property
def ufp_ports(self) -> int:
"""
Set and get number of DUT UFP ports connected to TE.
Returns:
object of int type
"""
return self.__value._get_by_bitmask(0, int)
@ufp_ports.setter
def ufp_ports(self, ufp_ports: int):
self.__value._set_by_bitmask(ufp_ports, 0)
@property
def dfp_ports(self) -> int:
"""
Set and get number of DUT DFP ports connected to TE.
Returns:
object of int type
"""
return self.__value._get_by_bitmask(1, int)
@dfp_ports.setter
def dfp_ports(self, dfp_ports: int):
self.__value._set_by_bitmask(dfp_ports, 1)
class PortsConnectedToExternalSink:
"""
Class `PortsConnectedToExternalSink` which defines the numbers of DUT DFP ports connected to external sinks.
Setting:
- Number of DUT DFP ports connected to Sink 1 `sink_1`.
- Number of DUT DFP ports connected to Sink 2 `sink_2`.
- Number of DUT DFP ports connected to Sink 3 `sink_3`.
- Number of DUT DFP ports connected to Sink 4 `sink_4`.
"""
def __init__(self, json_obj):
self.__value = Param(json_obj)
@property
def sink_1(self) -> int:
"""
Set and get number of DUT DFP ports connected to Sink 1.
Returns:
object of int type
"""
return self.__value._get_by_bitmask(0, int)
@sink_1.setter
def sink_1(self, ports_to_sink_1: int):
self.__value._set_by_bitmask(ports_to_sink_1, 0)
@property
def sink_2(self) -> int:
"""
Set and get number of DUT DFP ports connected to Sink 2.
Returns:
object of int type
"""
return self.__value._get_by_bitmask(0, int)
@sink_2.setter
def sink_2(self, ports_to_sink_2: int):
self.__value._set_by_bitmask(ports_to_sink_2, 0)
@property
def sink_3(self) -> int:
"""
Set and get number of DUT DFP ports connected to Sink 3.
Returns:
object of int type
"""
return self.__value._get_by_bitmask(0, int)
@sink_3.setter
def sink_3(self, ports_to_sink_3: int):
self.__value._set_by_bitmask(ports_to_sink_3, 0)
@property
def sink_4(self) -> int:
"""
Set and get number of DUT DFP ports connected to Sink 4.
Returns:
object of int type
"""
return self.__value._get_by_bitmask(0, int)
@sink_4.setter
def sink_4(self, ports_to_sink_1: int):
self.__value._set_by_bitmask(ports_to_sink_1, 0)
class Dp21BranchMSTSourceDUTTestParam:
"""
Class `Dp21BranchMSTSourceDUTTestParam` describes requirement parameters for DP 2.1 branch MST tests:
- Set and get `timeout`. Describes test timeout, in milliseconds.
- DUT MST Branch capabilities flags `dut_caps_flags` type `DutCapsMSTBranchFlags`.
- DUT UFP and DFP ports connected to TE `ports_connect_to_te` type `PortsConnectedToTE`.
- DUT DFP ports connected to external sinks `ports_connect_to_external_sink` type `PortsConnectedToExternalSink`
"""
def __init__(self, json_obj):
self.__timeout = Param(json_obj["TSI_DP20_MST_BRANCH_TIMEOUT"])
self.__dut_caps_flags = DutCapsMSTBranchFlags(json_obj["TSI_DP20_MST_BRANCH_DUT_CAPS"])
self.__ports_connect_to_te = PortsConnectedToTE(json_obj["TSI_DP20_MST_BRANCH_DUT_UFP_DFP_PORTS"])
self.__ports_connect_to_external_sink = PortsConnectedToExternalSink(json_obj["TSI_DP20_MST_BRANCH_DUT_SINK_PORTS"])
@property
def timeout(self) -> int:
"""
Set and get test timeout, in milliseconds.
Returns:
object of int type
"""
return self.__timeout.default_value
@timeout.setter
def timeout(self, timeout: int):
if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
f"{self.__timeout.max_value}.")
self.__timeout.default_value = timeout
@property
def dut_caps_flags(self) -> DutCapsMSTBranchFlags:
"""
Set and get DUT capabilities flags.
Returns:
object of `DutCapsMSTBranchFlags` type
"""
return self.__dut_caps_flags
@dut_caps_flags.setter
def dut_caps_flags(self, dut_caps_flags: DutCapsMSTBranchFlags):
self.__dut_caps_flags = dut_caps_flags
@property
def ports_connect_to_te(self) -> PortsConnectedToTE:
"""
Set and get numbers DUT UFP and DFP ports connected to TE.
Returns:
object of `PortsConnectedToTE` type
"""
return self.__ports_connect_to_te
@ports_connect_to_te.setter
def ports_connect_to_te(self, ports_connect_to_te: PortsConnectedToTE):
self.__ports_connect_to_te = ports_connect_to_te
@property
def ports_connect_to_external_sink(self) -> PortsConnectedToExternalSink:
"""
Set and get numbers DUT UFP and DFP ports connected to External Sinks.
Returns:
object of `PortsConnectedToExternalSink` type
"""
return self.__ports_connect_to_external_sink
@ports_connect_to_external_sink.setter
def ports_connect_to_external_sink(self, ports_connect_to_external_sink: PortsConnectedToExternalSink):
self.__ports_connect_to_external_sink = ports_connect_to_external_sink

View File

@@ -276,13 +276,11 @@ class VideoModeInfo:
def __init__(self, json_obj):
self.__value = Param(json_obj)
self.__standard = VideoModeStandard(self.__value)
self.__colorimetry = ColorimetryModes(self.__value)
@property
def standard(self) -> VideoModeStandard:
return self.__standard
return VideoModeStandard(self.__value)
@property
def colorimetry(self) -> ColorimetryModes:
return self.__colorimetry
return ColorimetryModes(self.__value)

View File

@@ -7,8 +7,6 @@ class Dp21AvailableDscVideoModes:
- Set and get...
"""
def __init__(self, json_obj):
self.__is_config_changed = False
self.__1920x1080_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_1920_1080_30"])
self.__1920x1080_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_1920_1080_60"])
self.__1920x1080_120hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_1920_1080_120"])
@@ -30,12 +28,6 @@ class Dp21AvailableDscVideoModes:
self.__10240x4320_30hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_10240_4320_30"])
self.__10240x4320_60hz = VideoModeInfo(json_obj["TSI_DP20_SRCCTS_DSC_VMT_10240_4320_60"])
def __getattribute__(self, name):
attr = super().__getattribute__(name)
if "vm_" in name or "_all" in name:
self.__is_config_changed = True
return attr
@property
def vm_1920x1080_30hz(self) -> VideoModeInfo:
return self.__1920x1080_30hz

View File

@@ -0,0 +1,46 @@
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
class Dp21MstSettingsTab:
"""
Class `Dp21MstSettingsTab` allows working with MST source DUT capabilities.
- Set and get Maximum stream count
- Set and get Maximum daisy chain sink count
"""
def __init__(self, json_obj):
self.__max_stream_count = Param(json_obj["TSI_DP20_SRCCTS_DUT_MST_CAPS"])
self.__max_daisy_chain_sink_count = Param(json_obj["TSI_DP20_SRCCTS_DUT_MST_CAPS"])
@property
def max_stream_count(self) -> int:
"""
Set and get max stream count (1-4).
Returns:
object of int type
"""
return self.__max_stream_count.default_value & 0xFF
@max_stream_count.setter
def max_stream_count(self, max_stream_count: int):
if not (self.__max_stream_count.min_value <= max_stream_count <= self.__max_stream_count.max_value):
raise ValueError(f"Timeout cannot be less than {self.__max_stream_count.min_value} and more than "
f"{self.__max_stream_count.max_value}.")
self.__max_stream_count.direct_set_bits_value(0xFF, max_stream_count, 0)
@property
def max_daisy_chain_sink_count(self) -> int:
"""
Set and get max daisy chain sink count (1-4).
Returns:
object of int type
"""
return (self.__max_daisy_chain_sink_count.default_value >> 8) & 0xFF
@max_daisy_chain_sink_count.setter
def max_daisy_chain_sink_count(self, max_daisy_chain_sink_count: int):
if not (self.__max_stream_count.min_value <= max_daisy_chain_sink_count <= self.__max_stream_count.max_value):
raise ValueError(f"Timeout cannot be less than {self.__max_daisy_chain_sink_count.min_value} and more than "
f"{self.__max_daisy_chain_sink_count.max_value}.")
self.__max_daisy_chain_sink_count.direct_set_bits_value(0xFF00, max_daisy_chain_sink_count, 8)

View File

@@ -114,7 +114,7 @@ class LinkRateDp21(Param):
self._set_by_bitmask(support_13_5Gbps, 2)
class DutCapsDp21Flags(Param):
class DutCapsDp21Flags:
"""
Class `DutCapsDp21Flags` inherited of class`DutCapsFlags` which defines the DUT capabilities as flags and allows
setting:
@@ -123,7 +123,7 @@ class DutCapsDp21Flags(Param):
Also has all the `DutCapsFlags` functionality.
"""
def __init__(self, json_obj):
super().__init__(json_obj)
self.__value = Param(json_obj)
@property
def voltage_swing_supported(self) -> bool:
@@ -133,11 +133,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(0, bool)
return self.__value._get_by_bitmask(0, bool)
@voltage_swing_supported.setter
def voltage_swing_supported(self, voltage_swing_supported: bool):
self._set_by_bitmask(voltage_swing_supported, 0)
self.__value._set_by_bitmask(voltage_swing_supported, 0)
@property
def pre_emphasis_supported(self) -> bool:
@@ -147,11 +147,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(1, bool)
return self.__value._get_by_bitmask(1, bool)
@pre_emphasis_supported.setter
def pre_emphasis_supported(self, pre_emphasis_supported: bool):
self._set_by_bitmask(pre_emphasis_supported, 1)
self.__value._set_by_bitmask(pre_emphasis_supported, 1)
@property
def fixed_timing_dut_supported(self) -> bool:
@@ -161,11 +161,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(2, bool)
return self.__value._get_by_bitmask(2, bool)
@fixed_timing_dut_supported.setter
def fixed_timing_dut_supported(self, fixed_timing_dut_supported: bool):
self._set_by_bitmask(fixed_timing_dut_supported, 2)
self.__value._set_by_bitmask(fixed_timing_dut_supported, 2)
@property
def spread_spectrum_supported(self) -> bool:
@@ -175,11 +175,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(3, bool)
return self.__value._get_by_bitmask(3, bool)
@spread_spectrum_supported.setter
def spread_spectrum_supported(self, spread_spectrum_supported: bool):
self._set_by_bitmask(spread_spectrum_supported, 3)
self.__value._set_by_bitmask(spread_spectrum_supported, 3)
@property
def change_vf_without_lt_supported(self) -> bool:
@@ -189,11 +189,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(4, bool)
return self.__value._get_by_bitmask(4, bool)
@change_vf_without_lt_supported.setter
def change_vf_without_lt_supported(self, change_vf_without_lt_supported: bool):
self._set_by_bitmask(change_vf_without_lt_supported, 4)
self.__value._set_by_bitmask(change_vf_without_lt_supported, 4)
@property
def e_ddc_protocol_supported(self) -> bool:
@@ -203,11 +203,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(5, bool)
return self.__value._get_by_bitmask(5, bool)
@e_ddc_protocol_supported.setter
def e_ddc_protocol_supported(self, e_ddc_protocol_supported: bool):
self._set_by_bitmask(e_ddc_protocol_supported, 5)
self.__value._set_by_bitmask(e_ddc_protocol_supported, 5)
@property
def audio_transmission_supported(self) -> bool:
@@ -217,11 +217,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(6, bool)
return self.__value._get_by_bitmask(6, bool)
@audio_transmission_supported.setter
def audio_transmission_supported(self, audio_transmission_supported: bool):
self._set_by_bitmask(audio_transmission_supported, 6)
self.__value._set_by_bitmask(audio_transmission_supported, 6)
@property
def dut_is_type_c_device(self) -> bool:
@@ -231,11 +231,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(7, bool)
return self.__value._get_by_bitmask(7, bool)
@dut_is_type_c_device.setter
def dut_is_type_c_device(self, dut_is_type_c_device: bool):
self._set_by_bitmask(dut_is_type_c_device, 7)
self.__value._set_by_bitmask(dut_is_type_c_device, 7)
@property
def fec_supported(self) -> bool:
@@ -245,11 +245,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(8, bool)
return self.__value._get_by_bitmask(8, bool)
@fec_supported.setter
def fec_supported(self, fec_supported: bool):
self._set_by_bitmask(fec_supported, 8)
self.__value._set_by_bitmask(fec_supported, 8)
@property
def fec_disable_sequence_supported(self) -> bool:
@@ -259,11 +259,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(9, bool)
return self.__value._get_by_bitmask(9, bool)
@fec_disable_sequence_supported.setter
def fec_disable_sequence_supported(self, fec_disable_sequence_supported: bool):
self._set_by_bitmask(fec_disable_sequence_supported, 9)
self.__value._set_by_bitmask(fec_disable_sequence_supported, 9)
@property
def audio_without_video_supported(self) -> bool:
@@ -273,11 +273,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(10, bool)
return self.__value._get_by_bitmask(10, bool)
@audio_without_video_supported.setter
def audio_without_video_supported(self, audio_without_video_supported: bool):
self._set_by_bitmask(audio_without_video_supported, 10)
self.__value._set_by_bitmask(audio_without_video_supported, 10)
@property
def dsc_supported(self) -> bool:
@@ -287,11 +287,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(11, bool)
return self.__value._get_by_bitmask(11, bool)
@dsc_supported.setter
def dsc_supported(self, dsc_supported: bool):
self._set_by_bitmask(dsc_supported, 11)
self.__value._set_by_bitmask(dsc_supported, 11)
@property
def dsc_block_prediction_supported(self) -> bool:
@@ -301,11 +301,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(12, bool)
return self.__value._get_by_bitmask(12, bool)
@dsc_block_prediction_supported.setter
def dsc_block_prediction_supported(self, dsc_block_prediction_supported: bool):
self._set_by_bitmask(dsc_block_prediction_supported, 12)
self.__value._set_by_bitmask(dsc_block_prediction_supported, 12)
@property
def max_link_bandwidth_policy_supported(self):
@@ -315,11 +315,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(13, bool)
return self.__value._get_by_bitmask(13, bool)
@max_link_bandwidth_policy_supported.setter
def max_link_bandwidth_policy_supported(self, max_link_bandwidth_policy_supported: bool):
self._set_by_bitmask(max_link_bandwidth_policy_supported, 13)
self.__value._set_by_bitmask(max_link_bandwidth_policy_supported, 13)
@property
def use_3tap_conversion(self):
@@ -329,11 +329,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(14, bool)
return self.__value._get_by_bitmask(14, bool)
@use_3tap_conversion.setter
def use_3tap_conversion(self, use_3tap_filter: bool):
self._set_by_bitmask(use_3tap_filter, 14)
self.__value._set_by_bitmask(use_3tap_filter, 14)
@property
def usb4_tunnel_presented(self):
@@ -343,11 +343,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(15, bool)
return self.__value._get_by_bitmask(15, bool)
@usb4_tunnel_presented.setter
def usb4_tunnel_presented(self, usb4_tunnel_presented: bool):
self._set_by_bitmask(usb4_tunnel_presented, 15)
self.__value._set_by_bitmask(usb4_tunnel_presented, 15)
@property
def native_display_id_read(self) -> bool:
@@ -357,11 +357,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(16, bool)
return self.__value._get_by_bitmask(16, bool)
@native_display_id_read.setter
def native_display_id_read(self, native_display_id_read: bool):
self._set_by_bitmask(native_display_id_read, 16)
self.__value._set_by_bitmask(native_display_id_read, 16)
@property
def display_id_vii_supported(self) -> bool:
@@ -371,11 +371,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(17, bool)
return self.__value._get_by_bitmask(17, bool)
@display_id_vii_supported.setter
def display_id_vii_supported(self, display_id_vii_supported: bool):
self._set_by_bitmask(display_id_vii_supported, 17)
self.__value._set_by_bitmask(display_id_vii_supported, 17)
@property
def display_id_viii_supported(self) -> bool:
@@ -385,12 +385,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(18, bool)
return self.__value._get_by_bitmask(18, bool)
@display_id_viii_supported.setter
def display_id_viii_supported(self, display_id_viii_supported: bool):
self._set_by_bitmask(display_id_viii_supported, 18)
self.__value._set_by_bitmask(display_id_viii_supported, 18)
@property
def display_id_ix_supported(self) -> bool:
@@ -400,11 +399,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(19, bool)
return self.__value._get_by_bitmask(19, bool)
@display_id_ix_supported.setter
def display_id_ix_supported(self, display_id_ix_supported: bool):
self._set_by_bitmask(display_id_ix_supported, 19)
self.__value._set_by_bitmask(display_id_ix_supported, 19)
@property
def display_id_x_supported(self) -> bool:
@@ -414,11 +413,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(20, bool)
return self.__value._get_by_bitmask(20, bool)
@display_id_x_supported.setter
def display_id_x_supported(self, display_id_x_supported: bool):
self._set_by_bitmask(display_id_x_supported, 20)
self.__value._set_by_bitmask(display_id_x_supported, 20)
@property
def display_id_tiled_display_topology(self) -> bool:
@@ -428,11 +427,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(21, bool)
return self.__value._get_by_bitmask(21, bool)
@display_id_tiled_display_topology.setter
def display_id_tiled_display_topology(self, display_id_tiled_display_topology: bool):
self._set_by_bitmask(display_id_tiled_display_topology, 21)
self.__value._set_by_bitmask(display_id_tiled_display_topology, 21)
@property
def display_id_tiled_stereo_display(self) -> bool:
@@ -442,11 +441,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(22, bool)
return self.__value._get_by_bitmask(22, bool)
@display_id_tiled_stereo_display.setter
def display_id_tiled_stereo_display(self, display_id_tiled_stereo_display: bool):
self._set_by_bitmask(display_id_tiled_stereo_display, 22)
self.__value._set_by_bitmask(display_id_tiled_stereo_display, 22)
@property
def stacked_frame_stereo_supported(self) -> bool:
@@ -456,11 +455,11 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(23, bool)
return self.__value._get_by_bitmask(23, bool)
@stacked_frame_stereo_supported.setter
def stacked_frame_stereo_supported(self, stacked_frame_stereo_supported: bool):
self._set_by_bitmask(stacked_frame_stereo_supported, 23)
self.__value._set_by_bitmask(stacked_frame_stereo_supported, 23)
@property
def dynamic_refresh_rate_support(self) -> bool:
@@ -470,11 +469,67 @@ class DutCapsDp21Flags(Param):
Returns:
object of bool type
"""
return self._get_by_bitmask(24, bool)
return self.__value._get_by_bitmask(24, bool)
@dynamic_refresh_rate_support.setter
def dynamic_refresh_rate_support(self, dynamic_refresh_rate_support: bool):
self._set_by_bitmask(dynamic_refresh_rate_support, 24)
self.__value._set_by_bitmask(dynamic_refresh_rate_support, 24)
@property
def mst_transmission_supported(self) -> bool:
"""
Set and get MST transmission supported flag supported.
Returns:
object of bool type
"""
return self.__value._get_by_bitmask(25, bool)
@mst_transmission_supported.setter
def mst_transmission_supported(self, mst_transmission_supported: bool):
self.__value._set_by_bitmask(mst_transmission_supported, 25)
@property
def mst_up_request_supported(self) -> bool:
"""
Set and get MST UP REQUEST supported flag supported.
Returns:
object of bool type
"""
return self.__value._get_by_bitmask(26, bool)
@mst_up_request_supported.setter
def mst_up_request_supported(self, mst_up_request_supported: bool):
self.__value._set_by_bitmask(mst_up_request_supported, 26)
@property
def mst_rsn_request_supported(self) -> bool:
"""
Set and get MST RSN REQUEST supported flag supported.
Returns:
object of bool type
"""
return self.__value._get_by_bitmask(27, bool)
@mst_rsn_request_supported.setter
def mst_rsn_request_supported(self, mst_rsn_request_supported: bool):
self.__value._set_by_bitmask(mst_rsn_request_supported, 27)
@property
def mst_power_up_request_supported(self) -> bool:
"""
Set and get MST POWER_UP DOWN_PHY supported flag supported.
Returns:
object of bool type
"""
return self.__value._get_by_bitmask(28, bool)
@mst_power_up_request_supported.setter
def mst_power_up_request_supported(self, mst_power_up_request_supported: bool):
self.__value._set_by_bitmask(mst_power_up_request_supported, 28)
class DutCapsDp21:
@@ -487,7 +542,7 @@ class DutCapsDp21:
def __init__(self, json_obj):
self.__max_lanes = Param(json_obj["TSI_DP20_SRCCTS_MAX_LANES"])
self.__max_link_rate = Param(json_obj["TSI_DP20_SRCCTS_MAX_LINK_RATE"])
self.__dut_caps_flags = DutCapsDp21Flags(json_obj["TSI_DP20_SRCCTS_DUT_CAPS"])
self.__dut_caps_flags_mst = DutCapsDp21Flags(json_obj["TSI_DP20_SRCCTS_DUT_CAPS"])
@property
def max_lanes(self) -> int:
@@ -529,11 +584,11 @@ class DutCapsDp21:
Returns:
object of `DutCapsFlags` type
"""
return self.__dut_caps_flags
return self.__dut_caps_flags_mst
@dut_caps_flags.setter
def dut_caps_flags(self, dut_caps_flags: DutCapsDp21Flags):
self.__dut_caps_flags = dut_caps_flags
self.__dut_caps_flags_mst = dut_caps_flags
class DebugOptions:
@@ -755,4 +810,3 @@ class GeneralSourceDUTDp21SettingTab:
@debug_options.setter
def debug_options(self, debug_config: DebugOptions):
self.__debug_options = debug_config

View File

@@ -0,0 +1,27 @@
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
class HdmiHdcp1ATestParam:
"""
Class `HdmiHdcp1ATestParam` describes requirement parameters for HDMI HDCP 1A tests:
- Set and get `timeout`. Describes test timeout, in milliseconds.
"""
def __init__(self, json_obj):
self.__timeout = Param(json_obj["TSI_HDMI_HDCP_1A_TIMEOUT"])
@property
def timeout(self) -> int:
"""
Set and get test timeout, in milliseconds.
Returns:
object of int type
"""
return self.__timeout.default_value
@timeout.setter
def timeout(self, timeout: int):
if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
f"{self.__timeout.max_value}.")
self.__timeout.default_value = timeout

View File

@@ -0,0 +1,27 @@
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
class HdmiHdcp1BTestParam:
"""
Class `HdmiHdcp1BTestParam` describes requirement parameters for HDMI HDCP 1B tests:
- Set and get `timeout`. Describes test timeout, in milliseconds.
"""
def __init__(self, json_obj):
self.__timeout = Param(json_obj["TSI_HDMI_HDCP_1B_TIMEOUT"])
@property
def timeout(self) -> int:
"""
Set and get test timeout, in milliseconds.
Returns:
object of int type
"""
return self.__timeout.default_value
@timeout.setter
def timeout(self, timeout: int):
if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
f"{self.__timeout.max_value}.")
self.__timeout.default_value = timeout

View File

@@ -0,0 +1,60 @@
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
from .hdmi_sink_tests import HdmiFrlRate
class HdmiHdcp2CTestParam:
"""
Class `HdmiHdcp2CTestParam` describes requirement parameters for HDMI HDCP 2C tests:
- Set and get `timeout`. Describes test timeout, in milliseconds.
- Set and get `lt_before_test`.
- Set and get `link_rate`.
"""
def __init__(self, json_obj):
self.__timeout = Param(json_obj["TSI_HDMI_HDCP_2C_TIMEOUT"])
self.__lt_before_test = Param(json_obj["TSI_HDMI_HDCP_2C_LT_BEFORE_TEST"])
self.__link_rate = Param(json_obj["TSI_HDMI_HDCP_2C_LINK_RATE"])
@property
def timeout(self) -> int:
"""
Set and get test timeout, in milliseconds.
Returns:
object of int type
"""
return self.__timeout.default_value
@timeout.setter
def timeout(self, timeout: int):
if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
f"{self.__timeout.max_value}.")
self.__timeout.default_value = timeout
@property
def lt_before_test(self) -> bool:
"""
Set and get flag to do or not link training before starting test
Returns:
object of bool type
"""
return bool(self.__lt_before_test.default_value)
@lt_before_test.setter
def lt_before_test(self, enable: bool):
self.__lt_before_test.default_value = int(enable)
@property
def link_rate(self) -> HdmiFrlRate:
"""
Set and get the Link rate for link training.
Returns:
object of `HdmiFrlRate` type
"""
return HdmiFrlRate(self.__link_rate.default_value)
@link_rate.setter
def link_rate(self, link_rate: HdmiFrlRate):
self.__link_rate.default_value = link_rate.value

View File

@@ -0,0 +1,27 @@
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
class HdmiHdcp3ATestParam:
"""
Class `HdmiHdcp3ATestParam` describes requirement parameters for HDMI HDCP 3A tests:
- Set and get `timeout`. Describes test timeout, in milliseconds.
"""
def __init__(self, json_obj):
self.__timeout = Param(json_obj["TSI_HDMI_HDCP_3A_TIMEOUT"])
@property
def timeout(self) -> int:
"""
Set and get test timeout, in milliseconds.
Returns:
object of int type
"""
return self.__timeout.default_value
@timeout.setter
def timeout(self, timeout: int):
if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
f"{self.__timeout.max_value}.")
self.__timeout.default_value = timeout

View File

@@ -0,0 +1,27 @@
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
class HdmiHdcp3BTestParam:
"""
Class `HdmiHdcp3BTestParam` describes requirement parameters for HDMI HDCP 3B tests:
- Set and get `timeout`. Describes test timeout, in milliseconds.
"""
def __init__(self, json_obj):
self.__timeout = Param(json_obj["TSI_HDMI_HDCP_3B_TIMEOUT"])
@property
def timeout(self) -> int:
"""
Set and get test timeout, in milliseconds.
Returns:
object of int type
"""
return self.__timeout.default_value
@timeout.setter
def timeout(self, timeout: int):
if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
f"{self.__timeout.max_value}.")
self.__timeout.default_value = timeout

View File

@@ -0,0 +1,27 @@
from UniTAP.dev.modules.dut_tests.test_group_params_types import Param
class HdmiHdcp3CTestParam:
"""
Class `HdmiHdcp3CTestParam` describes requirement parameters for HDMI HDCP 3C tests:
- Set and get `timeout`. Describes test timeout, in milliseconds.
"""
def __init__(self, json_obj):
self.__timeout = Param(json_obj["TSI_HDMI_HDCP_3C_TIMEOUT"])
@property
def timeout(self) -> int:
"""
Set and get test timeout, in milliseconds.
Returns:
object of int type
"""
return self.__timeout.default_value
@timeout.setter
def timeout(self, timeout: int):
if not(self.__timeout.min_value < timeout < self.__timeout.max_value):
raise ValueError(f"Timeout cannot be less than {self.__timeout.min_value} and more than "
f"{self.__timeout.max_value}.")
self.__timeout.default_value = timeout

View File

@@ -142,45 +142,25 @@ class DUTTests:
- Make report after testing `make_report`.
- Run test from file `run_from_file` - Not implemented. Will be added later.
"""
__DEFAULT_TEST_PARAMETERS = None
def __init__(self, dev_io: DeviceIO):
self.__io = dev_io
self.__opf_device = None
self.__results = []
self.__default_parameters = {}
self.__test_groups = {}
self.__parser = Parser()
self.__io.set_test_config(0)
cfp_path = os.path.join(os.path.dirname(__file__), 'cfg')
files = os.listdir(cfp_path)
for file in files:
try:
if not os.path.isfile(os.path.join(cfp_path, file)):
continue
with open(os.path.join(cfp_path, file), encoding='UTF-8') as cfg_json:
json_obj = json.load(cfg_json)
item_group = MergedTestGroups(int(json_obj.get('id'), 16))
group_type = MERGED_GROUP_PARAMS_TYPE.get(item_group, None)
if group_type is None:
continue
group_parameters_dict = {}
for parameter in json_obj.get('descriptions'):
group_parameters_dict[parameter["id"]] = parameter
self.__default_parameters[group_type] = group_type(group_parameters_dict)
except ValueError:
logging.info(
f"[UniTAP] Failed to load {os.path.join(cfp_path, file)}.\n Value {int(json_obj.get('id'), 16)} is missing in MergedTestGroups.")
test_list = self.__io.get_test_list()
for test in test_list:
test_id = test[0] & 0xFFFF
group_id = TestGroupId(test[0] >> 16)
try:
group_id = TestGroupId(test[0] >> 16)
except BaseException as e:
logging.info(e)
continue
name = test[2]
if test[2].find(' / ') != -1:
@@ -201,6 +181,49 @@ class DUTTests:
self.__test_groups[group_id]._add_new_test(Test(name=test_name, test_id=test_id))
@staticmethod
def __enumerate_and_get_default_test_parameters():
if DUTTests.__DEFAULT_TEST_PARAMETERS is None:
DUTTests.__DEFAULT_TEST_PARAMETERS = {}
cfp_path = os.path.join(os.path.dirname(__file__), 'cfg')
files = os.listdir(cfp_path)
for file in files:
try:
if not os.path.isfile(os.path.join(cfp_path, file)):
continue
with open(os.path.join(cfp_path, file), encoding='UTF-8') as cfg_json:
json_obj = json.load(cfg_json)
item_group = MergedTestGroups(int(json_obj.get('id'), 16))
group_type = MERGED_GROUP_PARAMS_TYPE.get(item_group, None)
if group_type is None:
continue
group_parameters_dict = {}
for parameter in json_obj.get('descriptions'):
group_parameters_dict[parameter["id"]] = parameter
DUTTests.__DEFAULT_TEST_PARAMETERS[group_type] = group_type(group_parameters_dict)
except ValueError:
logging.info(
f"[UniTAP] Failed to load {os.path.join(cfp_path, file)}.\n Value {int(json_obj.get('id'), 16)} is missing in MergedTestGroups.")
return DUTTests.__DEFAULT_TEST_PARAMETERS
@staticmethod
def __is_dsc_parameters_changed(param: Dp21SourceDUTTestParam):
assert isinstance(param, Dp21SourceDUTTestParam)
result = []
dsc_vm_params = vars(param.dsc_video_modes)
for key in dsc_vm_params:
vm_param_dict = vars(dsc_vm_params[key])
result.append(any(vm_param_dict[param_key].is_modified for param_key in vm_param_dict))
return any(result)
def run(self, group_id: TestGroupId, test_id: int, params: Optional[DUTTestParameters] = None,
print_fw_logs: bool = True, test_delay: int = 0) -> SubTestResultObject:
"""
@@ -234,8 +257,11 @@ class DUTTests:
if params is not None:
params_list = get_param_list(params)
if isinstance(params, Dp21SourceDUTTestParam) and not params.dsc_video_modes._Dp21AvailableDscVideoModes__is_config_changed:
logging.warning("Detected that used didn't change new DSC config. Copy setting from video config.")
#
# Backward compatibility with old config
#
if isinstance(params, Dp21SourceDUTTestParam):
dsc_dp2_ci_remapper = {
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_30": "TSI_DP20_SRCCTS_VMT_1920_1080_30",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_60": "TSI_DP20_SRCCTS_VMT_1920_1080_60",
@@ -259,27 +285,33 @@ class DUTTests:
"TSI_DP20_SRCCTS_DSC_VMT_10240_4320_60": "TSI_DP20_SRCCTS_VMT_10240_4320_60"
}
for key in dsc_dp2_ci_remapper.keys():
dst = next((obj for obj in params_list if obj.config_id_name == key), None)
src = next((obj for obj in params_list if obj.config_id_name == dsc_dp2_ci_remapper[key]), None)
if not DUTTests.__is_dsc_parameters_changed(params):
logging.warn("Detected that user didn't change new DSC config. Copy setting from video config.")
if dst.default_value != src.default_value:
logging.warn(f"DSC Config missmatch detected. Apply workaround: {key}:{hex(dst.default_value)}; {dsc_dp2_ci_remapper[key]}:{hex(src.default_value)}")
dst.default_value = src.default_value
for key in dsc_dp2_ci_remapper.keys():
dst = next((obj for obj in params_list if obj.config_id_name == key), None)
src = next((obj for obj in params_list if obj.config_id_name == dsc_dp2_ci_remapper[key]), None)
if dst.default_value != src.default_value:
logging.warn(
f"DSC Config missmatch detected. Apply workaround: {key}:{hex(dst.default_value)}; {dsc_dp2_ci_remapper[key]}:{hex(src.default_value)}")
dst.default_value = src.default_value
else:
logging.warn(f"DSC Config modification detected. Skip workaround.")
else:
params_list = self.__default_parameters[merged_group_id]
params_list = DUTTests.__enumerate_and_get_default_test_parameters()[merged_group_id]
for item in params_list:
if group_id == TestGroupId.AUDIO_TEST and item.config_id_name == "TSI_REF1_FRAME_DATA":
if isinstance(item.default_value, str) and os.path.exists(item.default_value):
image_data = read_image_file(item.default_value)
image_data, file_extension = read_image_file(item.default_value)
if len(image_data) > 0:
item.default_value = uicl_image_preparation(image_data, params)
# It is assumed that the bin file already contains prepared data,
# otherwise there is no way to determine whether additional conversion is required.
item.default_value = uicl_image_preparation(image_data, params, file_extension == ".bin")
elif isinstance(item, bytearray):
# TODO: add 'bytearray' support
item.default_value = uicl_image_preparation(item.default_value, params)
item.default_value = uicl_image_preparation(item.default_value, params, False)
self.__io.set(item.config_id, item.default_value, dict_types.get(item.value_type),
item.data_length)
@@ -315,41 +347,51 @@ class DUTTests:
result_obj.test_delay = test_delay
self.__results.append(result_obj)
time.sleep(test_delay)
return copy.deepcopy(self.__results[-1])
def get_params_from_file(self, path: str) -> Tuple[TestGroupId, int, DUTTestParameters]:
@staticmethod
def get_params_from_file(path: str) -> Tuple[TestGroupId, int, DUTTestParameters]:
"""
Get test parameters from transferred file: td or json (not cdf).
Args:
path ('str') - full path to config file
"""
self.__parser.set_file_name(path)
group_id = self.__parser.detect_group()
test_id = self.__parser.detect_test()
parser = Parser()
parser.set_file_name(path)
group_id = parser.detect_group()
test_id = parser.detect_test()
group_type = group_params_dict.get(group_id)
params = self.__parser.parse(self.get_default_parameters(group_type))
params = parser.parse(DUTTests.get_default_parameters(group_type))
return group_id, test_id, params
# TODO - add support parsing '.td' (other test groups) file extension
def get_params_from_cdf_file(self, path: str) -> DUTTestParameters:
@staticmethod
def get_params_from_cdf_file(path: str) -> DUTTestParameters:
"""
Get test parameters from transferred file: json (cdf).
Args:
path ('str') - full path to config file
"""
self.__parser.set_file_name(path)
group_id = self.__parser.detect_merged_group()
parser = Parser()
parser.set_file_name(path)
group_id = parser.detect_merged_group()
group_type = MERGED_GROUP_PARAMS_TYPE.get(group_id)
params = self.__parser.parse(self.get_default_parameters(group_type))
params = parser.parse(DUTTests.get_default_parameters(group_type))
return params
def get_default_parameters(self, group_type: Type[DUTTestParameters]) -> DUTTestParameters:
@staticmethod
def get_default_parameters(group_type: Type[DUTTestParameters]) -> DUTTestParameters:
"""
Get predefined (default) parameters of test group.
@@ -359,9 +401,9 @@ class DUTTests:
Returns:
object of `DUTTestParameters` type
"""
for group_id in self.__default_parameters.keys():
if isinstance(self.__default_parameters.get(group_id), group_type):
return copy.deepcopy(self.__default_parameters.get(group_id))
for group_id in DUTTests.__enumerate_and_get_default_test_parameters().keys():
if isinstance(DUTTests.__enumerate_and_get_default_test_parameters().get(group_id), group_type):
return copy.deepcopy(DUTTests.__enumerate_and_get_default_test_parameters().get(group_id))
raise ValueError(f"Group {group_type} is not available.")
def number_tests_in_group(self, group_id: TestGroupId) -> int:

View File

@@ -120,16 +120,16 @@ class ParserJson(ParserFileBase):
CDF = 1
__DSC_VMT_CI_LIST = [ "TSI_DP20_SRCCTS_DSC_VMT_1920_1080_30",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_60",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_120",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_144",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_240",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_30",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_60",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_120",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_144",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_240",
"TSI_DP20_SRCCTS_DSC_VMT_5120_2160_30",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_60",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_120",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_144",
"TSI_DP20_SRCCTS_DSC_VMT_1920_1080_240",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_30",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_60",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_120",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_144",
"TSI_DP20_SRCCTS_DSC_VMT_3840_2160_240",
"TSI_DP20_SRCCTS_DSC_VMT_5120_2160_30",
"TSI_DP20_SRCCTS_DSC_VMT_5120_2160_60",
"TSI_DP20_SRCCTS_DSC_VMT_5120_2160_120",
"TSI_DP20_SRCCTS_DSC_VMT_5120_2160_144",

View File

@@ -31,7 +31,17 @@ class MergedTestGroups(IntEnum):
HDRX_DSC_CTS = 0x20,
HDTX_DSC_CTS = 0x21,
HDTX_CONTINUITY = 0x22,
HDTX_CABLE_CHECK = 0x24
HDTX_CABLE_CHECK = 0x24,
HDMI_HDCP_CTS_1A = 0x25,
HDMI_HDCP_CTS_1B = 0x26,
HDMI_HDCP_CTS_2C = 0x27,
HDMI_HDCP_CTS_3A = 0x28,
HDMI_HDCP_CTS_3B = 0x29,
HDMI_HDCP_CTS_3C = 0x2A,
DPRX_128b132b_LL_CTS_DEMO = 0x2B,
DPTX_128b132b_LL_CTS_DEMO = 0x2C,
TIMINGS_VIDEO_TEST = 0x2D,
BRANCH_128b132b_MST_CTS = 0x2E
MERGED_GROUP_PARAMS_TYPE = {
@@ -60,7 +70,14 @@ MERGED_GROUP_PARAMS_TYPE = {
MergedTestGroups.HDRX_DSC_CTS: HdmiSourceDUTTestParam,
MergedTestGroups.HDTX_DSC_CTS: HdmiSinkDUTTestParam,
MergedTestGroups.HDTX_CONTINUITY: HdmiSinkContinuityDUTTestParam,
MergedTestGroups.HDTX_CABLE_CHECK: HdmiSinkCableCheckTestParam
MergedTestGroups.HDTX_CABLE_CHECK: HdmiSinkCableCheckTestParam,
MergedTestGroups.HDMI_HDCP_CTS_1A: HdmiHdcp1ATestParam,
MergedTestGroups.HDMI_HDCP_CTS_1B: HdmiHdcp1BTestParam,
MergedTestGroups.HDMI_HDCP_CTS_3A: HdmiHdcp3ATestParam,
MergedTestGroups.HDMI_HDCP_CTS_3B: HdmiHdcp3BTestParam,
MergedTestGroups.HDMI_HDCP_CTS_2C: HdmiHdcp2CTestParam,
MergedTestGroups.HDMI_HDCP_CTS_3C: HdmiHdcp3CTestParam,
MergedTestGroups.BRANCH_128b132b_MST_CTS: Dp21BranchMSTSourceDUTTestParam
}
group_params_dict = {
@@ -104,7 +121,25 @@ group_params_dict = {
TestGroupId.HD_RX_DSC_CTS: HdmiSourceDUTTestParam,
TestGroupId.HD_TX_DSC_CTS: HdmiSinkDUTTestParam,
TestGroupId.HD_TX_CONTINUITY: HdmiSinkContinuityDUTTestParam,
TestGroupId.HD_TX_CABLE_CHECK: HdmiSinkCableCheckTestParam
TestGroupId.HD_TX_CABLE_CHECK: HdmiSinkCableCheckTestParam,
TestGroupId.HDMI_HDCP_CTS_1A: HdmiHdcp1ATestParam,
TestGroupId.HDMI_HDCP_CTS_1B: HdmiHdcp1BTestParam,
TestGroupId.HDMI_HDCP_CTS_2C: HdmiHdcp2CTestParam,
TestGroupId.HDMI_HDCP_CTS_3A: HdmiHdcp3ATestParam,
TestGroupId.HDMI_HDCP_CTS_3B: HdmiHdcp3BTestParam,
TestGroupId.HDMI_HDCP_CTS_3C: HdmiHdcp3CTestParam,
TestGroupId.DEMO_DP_2_1_TX_DISPAYID: Dp21SinkTestParam,
TestGroupId.DEMO_DP_2_1_RX_DISPAYID: Dp21SourceDUTTestParam,
TestGroupId.DEMO_DP_2_1_TX_ADAPTIVESYNC: Dp21SinkTestParam,
TestGroupId.DEMO_DP_2_1_RX_ADAPTIVESYNC: Dp21SourceDUTTestParam,
TestGroupId.DEMO_DP_2_1_RX_LL_CTS: Dp21SourceDUTTestParam,
TestGroupId.DEMO_DP_2_1_TX_LL_CTS: Dp21SinkTestParam,
TestGroupId.DEMO_DP_2_1_RX_LTTPR_CTS: Dp21SourceDUTTestParam,
TestGroupId.DEMO_DP_2_1_TX_LTTPR_CTS: Dp21SinkTestParam,
TestGroupId.DEMO_DP_2_1_RX_DSC_CTS: Dp21SourceDUTTestParam,
TestGroupId.DEMO_DP_2_1_TX_DSC_CTS: Dp21SinkTestParam,
TestGroupId.DP_2_1_RX_MST_CTS: Dp21SourceDUTTestParam,
TestGroupId.DP_2_1_BRANCH_MST_CTS: Dp21BranchMSTSourceDUTTestParam
}
@@ -127,11 +162,17 @@ def test_group_to_merged_group(fw_group: TestGroupId, test_id: int) -> MergedTes
merged_group_id = MergedTestGroups.CRCVideoTest
elif fw_group in [TestGroupId.DP_2_1_RX_LL_CTS, TestGroupId.DP_2_1_RX_DSC_CTS,
TestGroupId.DP_2_1_RX_LTTPR_CTS, TestGroupId.DP_2_1_RX_DISPAYID,
TestGroupId.DP_2_1_RX_ADAPTIVESYNC]:
TestGroupId.DP_2_1_RX_ADAPTIVESYNC,
TestGroupId.DEMO_DP_2_1_RX_LL_CTS, TestGroupId.DEMO_DP_2_1_RX_DSC_CTS,
TestGroupId.DEMO_DP_2_1_RX_LTTPR_CTS, TestGroupId.DEMO_DP_2_1_RX_DISPAYID,
TestGroupId.DEMO_DP_2_1_RX_ADAPTIVESYNC, TestGroupId.DP_2_1_RX_MST_CTS]:
merged_group_id = MergedTestGroups.DPRX_128b132b_LL_CTS
elif fw_group in [TestGroupId.DP_2_1_TX_LL_CTS, TestGroupId.DP_2_1_TX_DSC_CTS,
TestGroupId.DP_2_1_TX_LTTPR_CTS, TestGroupId.DP_2_1_TX_DISPAYID,
TestGroupId.DP_2_1_TX_ADAPTIVESYNC]:
TestGroupId.DP_2_1_TX_ADAPTIVESYNC,
TestGroupId.DEMO_DP_2_1_TX_LL_CTS, TestGroupId.DEMO_DP_2_1_TX_DSC_CTS,
TestGroupId.DEMO_DP_2_1_TX_LTTPR_CTS, TestGroupId.DEMO_DP_2_1_TX_DISPAYID,
TestGroupId.DEMO_DP_2_1_TX_ADAPTIVESYNC]:
merged_group_id = MergedTestGroups.DPTX_128b132b_LL_CTS
elif fw_group == TestGroupId.DP_2_1_LTTPR_CTS:
merged_group_id = MergedTestGroups.LTTPR_128b132b_LL_CTS
@@ -169,6 +210,20 @@ def test_group_to_merged_group(fw_group: TestGroupId, test_id: int) -> MergedTes
merged_group_id = MergedTestGroups.HDTX_CONTINUITY
elif fw_group == TestGroupId.HD_TX_CABLE_CHECK:
merged_group_id = MergedTestGroups.HDTX_CABLE_CHECK
elif fw_group == TestGroupId.HDMI_HDCP_CTS_1A:
merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_1A
elif fw_group == TestGroupId.HDMI_HDCP_CTS_1B:
merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_1B
elif fw_group == TestGroupId.HDMI_HDCP_CTS_2C:
merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_2C
elif fw_group == TestGroupId.HDMI_HDCP_CTS_3A:
merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_3A
elif fw_group == TestGroupId.HDMI_HDCP_CTS_3B:
merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_3B
elif fw_group == TestGroupId.HDMI_HDCP_CTS_3C:
merged_group_id = MergedTestGroups.HDMI_HDCP_CTS_3C
elif fw_group == TestGroupId.DP_2_1_BRANCH_MST_CTS:
merged_group_id = MergedTestGroups.BRANCH_128b132b_MST_CTS
else:
merged_group_id = MergedTestGroups.Unknown
return merged_group_id

View File

@@ -0,0 +1,102 @@
import re
class ReportContentExtractor:
"""
Class `ReportContentExtractor` allows to extract content from test report.
- Extracted EDIDs, DisplayIDs from test report.
"""
__EDID_LINE_PATTERN = re.compile(r"\d{4}.\d{3}.\d{3}:\s+[0-9a-f]{4}:\s+([0-9a-f]{2}\s+)+")
def __init__(self) -> None:
self.__extracting = False
self.__edid_addr = 0
self.__edid_size = 0
self.__edid_ready = False
self.__data = bytearray()
def __start_new_edid(self):
self.__extracting = True
self.__edid_addr = 0
self.__edid_size = 0
self.__edid_ready = False
self.__data = bytearray()
def extract_content_from_report(self, report):
edids = []
for log_line in report.fw_logs.splitlines():
self.__parse_line(log_line)
if self.__edid_ready and self.__edid_size > 0:
edids.append(self.__pop_edid())
return edids
def __parse_line(self, line: str):
if not self.__extracting:
if ("Reference Source reads Sink DUT EDID" in line
or "EDID contents:" in line):
self.__start_new_edid()
return
if len(line) < 18:
return
view = line[18:]
if "I2C AUX WR" in line:
sub_strs = view.split()
if len(sub_strs) <= 3:
return
el = sub_strs[-3]
if "30h" in el:
val = int(sub_strs[-1], 16)
self.__edid_addr = val * 0x100
elif "50h" in el:
val = int(sub_strs[-1], 16)
self.__edid_addr = val
return
if "I2C AUX RD" in line:
sub_strs = view.split()
if len(sub_strs) <= 3:
return
count = int(sub_strs[4])
for i in range(count):
byte_hex = sub_strs[5 + i]
self.__data.append(int(byte_hex, 16))
self.__edid_addr += 1
self.__edid_size = max(self.__edid_size, self.__edid_addr)
return
if self.__EDID_LINE_PATTERN.search(line):
if len(line) < 20:
return
view = line[line.rfind(':') + 1:]
sub_strs = view.split()
for byte_hex in sub_strs:
self.__data.append(int(byte_hex, 16))
self.__edid_addr += 1
self.__edid_size = max(self.__edid_size, self.__edid_addr)
return
self.__edid_ready = True
self.__extracting = False
def __pop_edid(self):
if self.__edid_ready and self.__edid_size > 0:
edid = self.__data[:self.__edid_size].hex()
self.__edid_ready = False
self.__edid_size = 0
self.__data = bytearray()
self.__edid_addr = 0
return edid
return bytearray()

View File

@@ -1,8 +1,10 @@
import os
import platform
from datetime import datetime
from enum import IntEnum
from .report_template import *
from .report_edid_extractor import ReportContentExtractor
class TestResult(IntEnum):
@@ -59,12 +61,48 @@ def replace_additional_info(test_additional_info: TestAdditionalInfo):
return result
def to_intel_hex(edid_hex: str) -> str:
data = bytes.fromhex(edid_hex)
lines = []
for offset in range(0, len(data), 16):
chunk = data[offset:offset + 16]
byte_count = len(chunk)
addr_hi = (offset >> 8) & 0xFF
addr_lo = offset & 0xFF
record = [byte_count, addr_hi, addr_lo, 0x00] + list(chunk)
checksum = (~sum(record) + 1) & 0xFF
hex_str = ''.join(f'{b:02X}' for b in record) + f'{checksum:02X}'
lines.append(f':{hex_str}')
lines.append(':00000001FF')
return ('\r\n'.join(lines) + '\r\n').encode('utf-8').hex().upper()
def generate_html_report(path: str, test_additional_info: TestAdditionalInfo, reports: list):
result = str()
head = ReportHead
head = head.replace("#count#", str((len(reports) + 2)))
for index, report in enumerate(reports):
extractor = ReportContentExtractor()
edid_displaid_content = extractor.extract_content_from_report(report)
if edid_displaid_content is None or len(edid_displaid_content) <= 0:
continue
formatted_edids = '["' + '",\n "'.join(edid_displaid_content).upper() + '"]'
formatted_edids_intel_hex = '["' + '",\n "'.join(to_intel_hex(edid) for edid in edid_displaid_content) + '"]'
test_name_formatted = report.test_name.split(' ')[0].replace('.', '_')
if len(edid_displaid_content) > 0:
head = head.replace("#edid_fill#", f"testsEdidData.set({index}, {{name: \"{test_name_formatted}\", data: {formatted_edids}, dataIntelHex: {formatted_edids_intel_hex}}}); \n#edid_fill#")
break
head = head.replace("#edid_fill#", "")
head = head.replace("#jsCode#", report_js)
head = head.replace("#count#", str(len(reports) + 2))
head = head.replace("#fileNamePrefix#", os.path.splitext(os.path.basename(path))[0])
body = ReportBody
body = body.replace("#device_description#", replace_additional_info(test_additional_info))
@@ -105,7 +143,7 @@ def generate_html_report(path: str, test_additional_info: TestAdditionalInfo, re
line = OptionListLine
line = line.replace("#number#", str(i + 2))
line = line.replace("#test_name#", f"{reports[i].group_name} / {reports[i].test_name}")
line = line.replace("#test_result#", dict_result_2.get(reports[i].test_result))
line = line.replace("#test_result#", dict_result_2.get(reports[i].test_result, "UNKNOWN"))
options_list += line + "\n"
body = body.replace("#optionList#", options_list)
@@ -117,7 +155,7 @@ def generate_html_report(path: str, test_additional_info: TestAdditionalInfo, re
line = line.replace("#handler_number#", str(i + 2))
line = line.replace("#test_name#", reports[i].test_name)
line = line.replace("#test_group#", reports[i].group_name)
line = line.replace("#test_result#", dict_result_2.get(reports[i].test_result))
line = line.replace("#test_result#", dict_result_2.get(reports[i].test_result, "UNKNOWN"))
line = line.replace("#error#", f"{reports[i].error_code}" if reports[i].error_code != 0 else "-")
line = line.replace("#ending#", "2" if i % 2 else "")
test_result = dict_result_2.get(reports[i].test_result)
@@ -153,14 +191,17 @@ def generate_html_report(path: str, test_additional_info: TestAdditionalInfo, re
line = line.replace("#test_number#", f"{i + 1}")
line = line.replace("#test_group#", reports[i].group_name)
line = line.replace("#test_name#", reports[i].test_name)
line = line.replace("#result#", dict_result_2.get(reports[i].test_result))
line = line.replace("#result#", dict_result_2.get(reports[i].test_result, "UNKNOWN"))
line = line.replace("#test_delay#", f"{reports[i].test_delay * 1000}")
line = line.replace("#test_parameters#", reports[i].config_info)
line = line.replace("#warning#", "<b>Debug options enabled!</b><br><br>" if reports[i].debug else "")
if reports[i].debug:
if "demo" in reports[i].group_name.lower():
warnings = "<b>Demo Report Only - Not valid for DP Logo Certification.</b><br><br>"
elif reports[i].debug:
warnings = "<b>Debug options enabled!</b><br><br>"
line = line.replace("#warning#", warnings)
line = line.replace("#test_log#", escape_html(reports[i].fw_logs))
tables_list += line + "\n"

View File

@@ -14,23 +14,29 @@ ReportHead = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\
" PRE.TESTBODY{margin-top: 0;margin-bottom: 0;margin-left: 1.0cm;font-weight: medium;font-family: \"Courier New\";font-size: 11pt;color: #000000;}\n" \
" P.BODYDETAILTEXT{margin-top: 0;margin-bottom: 0;margin-left: 1.4cm;font-weight: medium;font-family: \"Arial\";font-size: 9pt;color: #000000;}\n" \
" P.CONTENTS SELECT{font-weight: normal;font-family: \"Arial\";font-size: 11pt;width: 98%;margin-top: 0;text-align: left;}\n" \
"P.TABLE_HEADERS{background-color: #DCFABC;margin-top: 0;margin-bottom: 0;margin-left: 1.0cm;font-weight: " \
"medium;font-family: \"Arial\";font-size: 12pt;color: #000000;}\n" \
" P.TABLE_HEADERS{background-color: #DCFABC;margin-top: 0;margin-bottom: 0;margin-left: 1.0cm;font-weight: medium;font-family: \"Arial\";font-size: 12pt;color: #000000;}\n" \
" P.TABLE_LINKS{margin-top: 0;margin-bottom: 0;margin-left: 1.0cm;font-weight: medium;font-family: \"Arial\";font-size: 11pt;}\n" \
" P.TABLE_LINKS2{margin-top: 0;margin-bottom: 0;margin-left: 1.0cm;font-weight: medium;font-family: \"Arial\";font-size: 11pt; background-color: #DDDDDD;}\n" \
" P.FAILED{margin-top: 0;margin-bottom: 0;background-color: #FFBCBC; font-weight: bold;font-family: \"Arial\";font-size: 11pt;color: #000000;}\n" \
" P.PASSED{margin-top: 0;margin-bottom: 0;background-color: #BCFFBC; font-weight: bold;font-family: \"Arial\";font-size: 11pt;color: #000000;}\n" \
" P.SKIPPED{margin-top: 0;margin-bottom: 0;background-color: #BCBCBC; font-weight: bold;font-family: \"Arial\";font-size: 11pt;color: #000000;}\n" \
" P.ERROR_CODE{margin-top: 0;margin-bottom: 0;background-color: #FFFFFF; font-weight: bold;font-family: \"Arial\";font-size: 11pt;color: #000000;}\n" \
" P.ABORTED{margin-top: 0;margin-bottom: 0;background-color: #FFFFFF; font-weight: bold;font-family: \"Arial\";font-size: 11pt;color: #000000;}\n" \
" .TOPBUTTON{display: none; position: fixed; bottom: 20px; right: 30px; z-index: 99; font-size: 18px; border: solid black 1px; outline: none; background-color: #DCFABC; cursor: pointer; padding: 15px; border-radius: 5px;}\n" \
" .DBG_HIGHLIGHT { color: #ff0000;}\n" \
" .flex-container {\n" \
" display: flex;\n" \
" gap: 5px;\n" \
" }\n" \
"</style>\n" \
"<script src=\"https://cdn.jsdelivr.net/npm/jszip@3.10.1/dist/jszip.min.js\"></script>" \
"<script type=\"text/javascript\">\n" \
"var base64Content = #configInfo#;\n"\
"var base64Content = #configInfo#;\n" \
"window.current_index = 2;\n" \
"window.min_value = 2;\n" \
"window.max_value = #count# - 1;\n" \
"window.onscroll = function() {scrollFunction()};\n" \
"let testsEdidData = new Map();\n" \
"#edid_fill#\n\n" \
"function Hide(iElementIndex) { document.getElementById(\"ID\"+iElementIndex).style.display = 'none'; }\n" \
"function Show(iElementIndex) { document.getElementById(\"ID\"+iElementIndex).style.display = 'inline'; }\n" \
"function HideAll(iDivCount) { for(var i=0;i<iDivCount;i++) { Hide(i); }}\n" \
@@ -38,15 +44,26 @@ ReportHead = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\
"function SetIndex(value) { window.current_index = value; }\n" \
"function GetIndex() { return parseInt(window.current_index, 10); }\n" \
"function HideButtons() { document.getElementById(\"top_buttons\").style.display = 'none'; document.getElementById(\"bottom_buttons\").style.display = 'none'; }\n" \
"function ShowButtons() { document.getElementById(\"top_buttons\").style.display = 'inline'; document.getElementById(\"bottom_buttons\").style.display = 'inline'; }\n" \
"function UpdateButtonsState() { GetIndex() >= window.min_value && window.max_value ? ShowButtons() : HideButtons(); }\n" \
"function ShowButtons() { document.getElementById(\"top_buttons\").style.display = 'inline'; document.getElementById(\"bottom_buttons\").style.display = 'inline';} \n" \
"function ShowHideEdidBtn() {\n" \
" let index = GetIndex();\n" \
" let edidBtnVisibility = 'none';\n" \
" if (index < window.min_value || index > window.max_value) {\n" \
" if (testsEdidData.size > 0) edidBtnVisibility = 'inline';\n }" \
" else if (testsEdidData.has(index)) edidBtnVisibility = 'inline';\n" \
" document.getElementById(\"save_edid_btn\").style.display = edidBtnVisibility;\n" \
" document.getElementById(\"save_edid_intel_hex_btn\").style.display = edidBtnVisibility;\n" \
"}\n" \
"function UpdateButtonsState() { GetIndex() >= window.min_value && window.max_value ? ShowButtons() : HideButtons();\n" \
" ShowHideEdidBtn(); }\n" \
"function ListHandler (iOptionValue) { if(iOptionValue==-1) { ShowAll(#count#); Hide(1); SetIndex(1); UpdateButtonsState(); return; } HideAll(#count#); Show(iOptionValue); SetIndex(iOptionValue > 1 ? iOptionValue : 1); UpdateButtonsState();}\n" \
"function NextTest() { var index = GetIndex(); ListHandler ((index + 1 > window.max_value) ? (window.min_value) : (index + 1)); }\n" \
"function PreviousTest() { var index = GetIndex(); ListHandler ((index - 1 < window.min_value) ? (window.max_value) : (index - 1)); }\n" \
"function scrollFunction() { let topButton = document.getElementById('topBtn'); if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {topButton.style.display = 'block';} else {topButton.style.display = 'none';} }\n" \
"function TopFunction() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0;}\n" \
"function SaveConfig() { var jsonData = atob(base64Content[GetIndex()-2]); var blob = new Blob([jsonData], { type: 'application/json' }); var link = document.createElement('a'); link.href = window.URL.createObjectURL(blob); var currentPageURL = window.location.href; var decodedURL = decodeURIComponent(currentPageURL); link.download = getText() + \".json\"; document.body.appendChild(link); link.click(); document.body.removeChild(link); }\n"\
"function getText() { var index = GetIndex(); let a = document.getElementById(\"testlist\"); let option = a.options[index]; return option.text.replace('/', '').replace('>', '').replace(':', '') }\n"\
"function SaveConfig() { var jsonData = atob(base64Content[GetIndex()-2]); var blob = new Blob([jsonData], { type: 'application/json' }); var link = document.createElement('a'); link.href = window.URL.createObjectURL(blob); var currentPageURL = window.location.href; var decodedURL = decodeURIComponent(currentPageURL); link.download = getText() + \".json\"; document.body.appendChild(link); link.click(); document.body.removeChild(link); }\n" \
"function getText() { var index = GetIndex(); let a = document.getElementById(\"testlist\"); let option = a.options[index]; return option.text.replace('/', '').replace('>', '').replace(':', '') }\n" \
"#jsCode#" \
"</script>\n" \
"</head>\n"
@@ -102,7 +119,7 @@ TestTable = "<br><br></p></div><div id=\"ID#number#\">\n" \
"\n"
ReportBody = "<body onload='ListHandler(0);'>\n" \
" <button class=\"TOPBUTTON\" onclick=\"TopFunction()\" id=\"topBtn\" title=\"Go to top\">&#8593;</button>\n" \
"<button class=\"TOPBUTTON\" onclick=\"TopFunction()\" id=\"topBtn\" title=\"Go to top\">&#8593;</button>\n" \
" <div><p class=\"HEADING\" id=\"top\">&nbsp;&nbsp;Unigraf Test Report</p></div>\n" \
" <div>\n" \
" <table class=\"DOCUMENT\" cellpadding=\"0\" cellspacing=\"0\">\n" \
@@ -115,16 +132,22 @@ ReportBody = "<body onload='ListHandler(0);'>\n" \
" <option value=\"0\">Report Summary</option>\n" \
" <option value=\"1\">Test Summary</option>\n" \
"#optionList#\n" \
" <option value=\"-1\">Show everything</option>\n" \
" <option value=\"-1\">Show All</option>\n" \
" </select>\n" \
" </td>\n" \
" </table>\n" \
"<div id=\"top_buttons\" style='margin-left: 12'>\n" \
"<button type=\"button\" onclick=\"PreviousTest()\">Previous</button>\n" \
"<button type=\"button\" onclick=\"ListHandler(1)\">Summary</button>\n" \
"<button type=\"button\" onclick=\"SaveConfig()\">Save Test Config</button>\n" \
"<button type=\"button\" onclick=\"NextTest()\">Next</button>\n" \
"<br>\n" \
"<div class='flex-container'>" \
" <div id=\"top_buttons\">\n" \
" <button type=\"button\" onclick=\"PreviousTest()\">Previous</button>\n" \
" <button type=\"button\" onclick=\"ListHandler(1)\">Summary</button>\n" \
" <button type=\"button\" onclick=\"SaveConfig()\">Save Test Config</button>\n" \
" <button type=\"button\" onclick=\"NextTest()\">Next</button>\n" \
" </div>\n" \
" <div>\n" \
" <button type=\"button\" id=\"save_edid_btn\" onclick=\"SaveEdid()\">Save EDID as bin</button>\n" \
" <button type=\"button\" id=\"save_edid_intel_hex_btn\" onclick=\"SaveEdidIntelHex()\">Save EDID as intel hex</button>\n" \
" <br>\n" \
" </div>\n" \
"</div>\n" \
"<br>\n" \
"<div id=\"ID0\">\n" \
@@ -151,3 +174,134 @@ ReportFooter = "<br><br></pre></div>\n" \
" </p>\n" \
"</body>\n" \
"</html>\n"
report_js = """
function hexToUint8Array(hex) {
const clean = hex.replace(/\s+/g, '');
const bytes = new Uint8Array(clean.length / 2);
for (let i = 0; i < clean.length; i += 2) {
bytes[i / 2] = parseInt(clean.substr(i, 2), 16);
}
return bytes;
}
function saveBlob(blob, fileName) {
const a = document.createElement('a');
const url = URL.createObjectURL(blob);
a.href = url;
a.download = fileName;
a.style.display = 'none';
document.body.appendChild(a);
a.click();
setTimeout(() => {
URL.revokeObjectURL(url);
a.remove();
}, 2000);
}
async function saveZip(files, zipName) {
const zip = new JSZip();
for (const file of files) {
zip.file(file.name, file.data, {
binary: true
});
}
const uint8 = await zip.generateAsync({
type: 'uint8array',
compression: 'STORE'
});
const blob = new Blob([uint8], { type: 'application/zip' });
saveBlob(blob, zipName);
}
async function saveFiles(getFileList, zipName, mimeType) {
const files = getFileList();
if (files.length === 1) {
saveBlob(
new Blob([files[0].data], { type: mimeType }),
files[0].name
);
} else if (files.length > 1) {
await saveZip(files, zipName);
}
}
function getEdidBinFiles() {
let index = GetIndex();
const files = [];
if (index < window.min_value || index > window.max_value) {
for (const [key, value] of testsEdidData) {
for (let i = 0; i < value.data.length; ++i) {
files.push({
name: `#fileNamePrefix#_Test${key}_${value.name}_EDID_${i}.bin`,
data: hexToUint8Array(value.data[i])
});
}
}
} else if (testsEdidData.has(index)) {
const testData = testsEdidData.get(index);
for (let i = 0; i < testData.data.length; ++i) {
files.push({
name: `#fileNamePrefix#_Test_${testData.name}_EDID_${i}.bin`,
data: hexToUint8Array(testData.data[i])
});
}
}
return files;
}
function getEdidIntelHexFiles() {
let index = GetIndex();
const files = [];
if (index < window.min_value || index > window.max_value) {
for (const [key, value] of testsEdidData) {
for (let i = 0; i < value.dataIntelHex.length; ++i) {
files.push({
name: `#fileNamePrefix#_Test${key}_${value.name}_EDID_${i}.hex`,
data: hexToUint8Array(value.dataIntelHex[i])
});
}
}
} else if (testsEdidData.has(index)) {
const testData = testsEdidData.get(index);
for (let i = 0; i < testData.dataIntelHex.length; ++i) {
files.push({
name: `#fileNamePrefix#_Test_${testData.name}_EDID_${i}.hex`,
data: hexToUint8Array(testData.dataIntelHex[i])
});
}
}
return files;
}
async function SaveEdid() {
await saveFiles(
getEdidBinFiles,
'#fileNamePrefix#_EDID_BIN.zip',
'application/octet-stream'
);
}
async function SaveEdidIntelHex() {
await saveFiles(
getEdidIntelHexFiles,
'#fileNamePrefix#_EDID_HEX.zip',
'application/octet-stream'
);
}
"""

View File

@@ -121,6 +121,8 @@ class Param:
self.__process_value(json_obj)
self.__modified = False
def _set_by_bitmask(self, value, bitmask_index):
if len(self.__bit_field_list) > bitmask_index:
mask = self.__bit_field_list[bitmask_index].mask
@@ -149,12 +151,17 @@ class Param:
def direct_set_def_value(self, default_value):
self.__default_value = default_value
def direct_set_bits_value(self, mask: int, value: int, shift: int = 0):
cleared = self.__default_value & ~mask
self.__default_value = cleared | (value << shift)
@property
def default_value(self):
return self.__default_value
@default_value.setter
def default_value(self, default_value):
self.__modified = True
if self.__enumeration_variants is not None:
if str(default_value) in self.__enumeration_variants.available_values:
self.__default_value = default_value
@@ -203,6 +210,10 @@ class Param:
else:
return 1
@property
def is_modified(self):
return self.__modified
def __str__(self):
return f"{self.default_value if self.data_length <= 50 else self.default_value[:50]}"
@@ -274,25 +285,28 @@ def param_by_ci_name(json_obj, name: str) -> Param:
return Param({})
def read_image_file(full_filename: str) -> bytearray:
def read_image_file(full_filename: str) -> [bytearray, str]:
file_name, file_extension = os.path.splitext(full_filename)
if file_extension.lower() == '.bin':
with open(full_filename, 'rb') as file:
image_data = bytearray(file.read())
return image_data
return image_data, file_extension
elif file_extension.lower() in [".png", '.jpg', ".ppm", '.bmp', '.tif', '.tiff']:
image = Image.open(full_filename)
image = image.convert('RGB')
image_data = bytearray(image.tobytes())
return image_data
return image_data, file_extension
else:
return bytearray()
return bytearray(), file_extension
def uicl_image_preparation(data: bytearray, params):
def uicl_image_preparation(data: bytearray, params, is_prepared):
ref_image = UICL_Image()
ref_param = UICL_ImageParameters()
if is_prepared:
return list(data)
ref_param.Width = params.image_width
ref_param.Height = params.image_height
# VideoPixelTestElementFormat: RGB_16BPC = 20

View File

@@ -58,6 +58,26 @@ class TestGroupId(IntEnum):
HD_TX_DSC_CTS = 0x41
HD_TX_CONTINUITY = 0x42
HD_TX_CABLE_CHECK = 0x43
HDMI_HDCP_CTS_1A = 0x44
HDMI_HDCP_CTS_1B = 0x45
HDMI_HDCP_CTS_2C = 0x46
HDMI_HDCP_CTS_3A = 0x47
HDMI_HDCP_CTS_3B = 0x48
HDMI_HDCP_CTS_3C = 0x49
DP_2_1_RX_MST_CTS = 0x4A,
DEMO_DP_2_1_TX_DISPAYID = 0x4B,
DEMO_DP_2_1_RX_DISPAYID = 0x4C,
DEMO_DP_2_1_TX_ADAPTIVESYNC = 0x4D,
DEMO_DP_2_1_RX_ADAPTIVESYNC = 0x4E,
DEMO_DP_2_1_RX_LL_CTS = 0x4F,
DEMO_DP_2_1_TX_LL_CTS = 0x50,
DEMO_DP_2_1_RX_LTTPR_CTS = 0x51,
DEMO_DP_2_1_TX_LTTPR_CTS = 0x52,
DEMO_DP_2_1_RX_DSC_CTS = 0x53,
DEMO_DP_2_1_TX_DSC_CTS = 0x54,
DP_2_1_BRANCH_MST_CTS = 0x55,
HDMI_TIMINGS_TEST_SUIT = 0x59,
DP_TIMINGS_TEST_SUIT = 0x5A,
PIXEL_VIDEO_TEST = 0x3E8
HDR10_TEST = -2