[PATCH i-g-t 2/3] tools/intel_bios_reader: Dump out more information from the child device structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 tools/intel_bios.h        | 51 ++++++++++++++++++++++++++++++-----
 tools/intel_bios_reader.c | 69 ++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 107 insertions(+), 13 deletions(-)

diff --git a/tools/intel_bios.h b/tools/intel_bios.h
index c4632da336d9..ac8c8650272d 100644
--- a/tools/intel_bios.h
+++ b/tools/intel_bios.h
@@ -272,18 +272,55 @@ struct child_device_config {
 struct efp_child_device_config {
 	uint16_t handle;
 	uint16_t device_type;
-	uint8_t skip1[12];
+	uint16_t device_class;
+	uint8_t i2c_speed;
+	uint8_t dp_onboard_redriver; /* 158 */
+	uint8_t dp_ondock_redriver; /* 158 */
+	uint8_t hdmi_level_shifter_value:4; /* 169 */
+	uint8_t hdmi_max_data_rate:4; /* 204 */
+	uint16_t dtd_buf_ptr; /* 161 */
+	uint8_t edidless_efp:1; /* 161 */
+	uint8_t compression_enable:1; /* 198 */
+	uint8_t compression_method:1; /* 198 */
+	uint8_t ganged_edp:1; /* 202 */
+	uint8_t skip0:4;
+	uint8_t compression_structure_index:4; /* 198 */
+	uint8_t skip1:4;
+	uint8_t slave_port; /*  202 */
+	uint8_t skip2;
 	uint8_t port;
-	uint8_t skip2[2];
+	uint8_t i2c_pin; /* for add-in card */
+	uint8_t slave_addr; /* for add-in card */
 	uint8_t ddc_pin;
-	uint8_t skip3[3];
-	uint8_t docked_port;
+	uint16_t edid_ptr;
+	uint8_t dvo_config;
+	uint8_t efp_docked_port:1; /* 158 */
+	uint8_t lane_reversal:1; /* 184 */
+	uint8_t onboard_lspcon:1; /* 192 */
+	uint8_t iboost_enable:1; /* 196 */
+	uint8_t hpd_invert:1; /* BXT 196 */
+	uint8_t slip3:3;
 	uint8_t hdmi_compat:1;
-	uint8_t conn_info:3;
-	uint8_t skip4:4;
+	uint8_t dp_compat:1;
+	uint8_t tmds_compat:1;
+	uint8_t skip4:5;
 	uint8_t aux_chan;
 	uint8_t dongle_detect;
-	uint8_t skip5[6];
+	uint8_t pipe_cap:2;
+	uint8_t sdvo_stall:1; /* 158 */
+	uint8_t hpd_status:2;
+	uint8_t integrated_encoder:1;
+	uint8_t skip5:2;
+	uint8_t dvo_wiring;
+	uint8_t mipi_bridge_type; /* 171 */
+	uint16_t device_class_ext;
+	uint8_t dvo_function;
+	uint8_t dp_usb_type_c:1; /* 195 */
+	uint8_t skip6:7;
+	uint8_t dp_usb_type_c_2x_gpio_index; /* 195 */
+	uint16_t dp_usb_type_c_2x_gpio_pin; /* 195 */
+	uint8_t iboost_dp:4; /* 196 */
+	uint8_t iboost_hdmi:4; /* 196 */
 } __attribute__ ((packed));
 
 struct bdb_general_definitions {
diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 588cc2c36c7a..3aefe2b1aacf 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -421,15 +421,72 @@ static void dump_child_device(struct context *context,
 		printf("\t\tDevice type: 0x%04x (%s)\n", efp->device_type,
 		       child_device_type(efp->device_type));
 		dump_child_device_type_bits(efp->device_type);
-		printf("\t\tPort: 0x%02x (%s)\n", efp->port,
-		       efp_port(efp->port));
+		printf("\t\tI2C speed: 0x%02x\n", efp->i2c_speed);
+		printf("\t\tDP onboard redriver: 0x%02x\n", efp->dp_onboard_redriver);
+		printf("\t\tDP ondock redriver: 0x%02x\n", efp->dp_ondock_redriver);
+		printf("\t\tHDMI max data rate: 0x%02x\n", efp->hdmi_max_data_rate);
+		printf("\t\tHDMI level shifter value: 0x%02x\n", efp->hdmi_level_shifter_value);
+		printf("\t\tOffset to DTD buffer for edidless EFP: 0x%02x\n", efp->dtd_buf_ptr);
+		printf("\t\tDual pipe ganged eDP: %s\n", YESNO(efp->ganged_edp));
+		printf("\t\tCompression method CPS: %s\n", YESNO(efp->compression_method));
+		printf("\t\tCompression enable: %s\n", YESNO(efp->compression_enable));
+		printf("\t\tEdidless EFP: %s\n", YESNO(efp->edidless_efp));
+		printf("\t\tCompression structure index: 0x%02x)\n", efp->compression_structure_index);
+		printf("\t\tSlave DDI port: 0x%02x (%s)\n", efp->slave_port, efp_port(efp->slave_port));
+		printf("\t\tAIM offset: %d\n", child->addin_offset);
+		printf("\t\tPort: 0x%02x (%s)\n", efp->port, efp_port(efp->port));
+		printf("\t\tAIM I2C pin: 0x%02x\n", efp->i2c_pin);
+		printf("\t\tAIM Slave address: 0x%02x\n", efp->slave_addr);
 		printf("\t\tDDC pin: 0x%02x\n", efp->ddc_pin);
-		printf("\t\tDock port: 0x%02x (%s)\n", efp->docked_port,
-		       efp_port(efp->docked_port));
-		printf("\t\tHDMI compatible? %s\n", efp->hdmi_compat ? "Yes" : "No");
-		printf("\t\tInfo: %s\n", efp_conn(efp->conn_info));
+		printf("\t\tEDID buffer ptr: 0x%02x\n", efp->edid_ptr);
+		printf("\t\tDVO config: 0x%02x\n", efp->dvo_config);
+		printf("\t\tHPD sense invert: %s\n", YESNO(efp->hpd_invert));
+		printf("\t\tIboost enable: %s\n", YESNO(efp->iboost_enable));
+		printf("\t\tOnboard LSPCON: %s\n", YESNO(efp->onboard_lspcon));
+		printf("\t\tLane reversal: %s\n", YESNO(efp->lane_reversal));
+		printf("\t\tEFP routed through dock: %s\n", YESNO(efp->efp_docked_port));
+		printf("\t\tHDMI compatible? %s\n", YESNO(efp->hdmi_compat));
+		printf("\t\tDP compatible? %s\n", YESNO(efp->dp_compat));
+		printf("\t\tTMDS compatible? %s\n", YESNO(efp->tmds_compat));
 		printf("\t\tAux channel: 0x%02x\n", efp->aux_chan);
 		printf("\t\tDongle detect: 0x%02x\n", efp->dongle_detect);
+		printf("\t\tIntegrated encoder instead of SDVO: %s\n", YESNO(efp->integrated_encoder));
+		printf("\t\tHotplu connect status: 0x%02x\n", efp->hpd_status);
+		printf("\t\tSDVO stall signal available: %s\n", YESNO(efp->sdvo_stall));
+		printf("\t\tPipe capabilities: 0x%02x\n", efp->pipe_cap);
+		printf("\t\tDVO wiring: 0x%02x\n", efp->dvo_wiring);
+		printf("\t\tMIPI bridge type:");
+		switch (efp->mipi_bridge_type) {
+		case 1:
+			printf("ASUS\n");
+			break;
+		case 2:
+			printf("Toshiba\n");
+			break;
+		case 3:
+			printf("Renesas\n");
+			break;
+		default:
+			printf("(unknown value %d)\n", efp->mipi_bridge_type);
+			break;
+		}
+		printf("\t\tDevice class extendsion: 0x%02x\n", efp->device_class_ext);
+		printf("\t\tDVO function: 0x%02x\n", efp->dvo_function);
+	}
+
+	if (context->bdb->version >= 195) {
+		struct efp_child_device_config *efp =
+			(struct efp_child_device_config *)child;
+		printf("\t\tDP USB type C support: %s\n", YESNO(efp->dp_usb_type_c));
+		printf("\t\t2X DP GPIO index: 0x%02x\n", efp->dp_usb_type_c_2x_gpio_index);
+		printf("\t\t2X DP GPIO pin number: 0x%02x\n", efp->dp_usb_type_c_2x_gpio_pin);
+	}
+
+	if (context->bdb->version >= 196) {
+		struct efp_child_device_config *efp =
+			(struct efp_child_device_config *)child;
+		printf("\t\tIBoost level for HDMI: 0x%02x\n", efp->iboost_hdmi);
+		printf("\t\tIBoost level for DP/eDP: 0x%02x\n", efp->iboost_dp);
 	}
 }
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux