Skip to contentSkip to conversation

tools/intel_vbt_decode: Fix decoding of child device structure

PATCH In review [email protected] 4 participants 5 messages Aug 16, 2017 – Aug 17, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/intel_vbt_decode: Fix decoding of child device structure

From: Ville Syrjälä <[email protected]>

Fix decoding of the start of the child device structure. I had accidentally duplicated the "device class/type" member and forgot to include the add-in offset later. Fortunately both were two byte fields so they effectively cancelled each other out and thus the remainder of the child device structure was being decoded correctly. But of course anything sitting between these two fieds was being decoded incorrectly.

Fixes 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure")
---
 tools/intel_bios.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/intel_bios.h +1 -1
index ca0d2c587120..f2ccb55ab6c3 100644
@@ -273,7 +273,6 @@ struct child_device_config {
 struct efp_child_device_config {
 	uint16_t handle;
 	uint16_t device_type;
-	uint16_t device_class;
 	uint8_t i2c_speed;
 	uint8_t dp_onboard_redriver; /* 158 */
 	uint8_t dp_ondock_redriver; /* 158 */
@@ -289,6 +288,7 @@ struct efp_child_device_config {
 	uint8_t skip1:4;
 	uint8_t slave_port; /*  202 */
 	uint8_t skip2;
+	uint16_t addin_offset;
 	uint8_t port;
 	uint8_t i2c_pin; /* for add-in card */
 	uint8_t slave_addr; /* for add-in card */
Signature · 6 lines
2.13.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for tools/intel_vbt_decode: Fix decoding of child device structure

== Series Details ==

== Series Details ==

Series: tools/intel_vbt_decode: Fix decoding of child device structure
URL : https://patchwork.freedesktop.org/series/28872/
State : success

== Summary ==

IGT patchset tested on top of latest successful build c8811338e8a7723b5e99a303361ed97c092fc270 intel-ci: Add fast-feedback-simulation.testlist

with latest DRM-Tip kernel build CI_DRM_2968
5118c7fa9c87 drm-tip: 2017y-08m-15d-23h-58m-24s UTC integration manifest

Test kms_pipe_crc_basic:

        Subgroup suspend-read-crc-pipe-b:
                pass       -> DMESG-WARN (fi-byt-n2820) fdo#101705

fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705

fi-bdw-5557u     total:279  pass:268  dwarn:0   dfail:0   fail:0   skip:11  time:444s
fi-bdw-gvtdvm    total:279  pass:265  dwarn:0   dfail:0   fail:0   skip:14  time:429s
fi-blb-e6850     total:279  pass:224  dwarn:1   dfail:0   fail:0   skip:54  time:357s
fi-bsw-n3050     total:279  pass:243  dwarn:0   dfail:0   fail:0   skip:36  time:540s
fi-bxt-j4205     total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:512s
fi-byt-j1900     total:279  pass:254  dwarn:1   dfail:0   fail:0   skip:24  time:524s
fi-byt-n2820     total:279  pass:250  dwarn:1   dfail:0   fail:0   skip:28  time:515s
fi-glk-2a        total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:610s
fi-hsw-4770      total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:442s
fi-hsw-4770r     total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:417s
fi-ilk-650       total:279  pass:229  dwarn:0   dfail:0   fail:0   skip:50  time:416s
fi-ivb-3520m     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:505s
fi-ivb-3770      total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:477s
fi-kbl-7500u     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:474s
fi-kbl-7560u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:587s
fi-kbl-r         total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:597s
fi-pnv-d510      total:279  pass:223  dwarn:1   dfail:0   fail:0   skip:55  time:530s
fi-skl-6260u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:466s
fi-skl-6700k     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:473s
fi-skl-6770hq    total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:480s
fi-skl-gvtdvm    total:279  pass:266  dwarn:0   dfail:0   fail:0   skip:13  time:434s
fi-skl-x1585l    total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:492s
fi-snb-2520m     total:279  pass:251  dwarn:0   dfail:0   fail:0   skip:28  time:557s
fi-snb-2600      total:279  pass:250  dwarn:0   dfail:0   fail:0   skip:29  time:407s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_71/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 11 lines · On Wed, 16 Aug 2017, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Fix decoding of the start of the child device structure. I had accidentally duplicated the "device class/type" member and forgot to include the add-in offset later. Fortunately both were two byte fields so they effectively cancelled each other out and thus the remainder of the child device structure was being decoded correctly. But of course anything sitting between these two fieds was being decoded incorrectly.

Fixes 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure")
Quoted 24 lines
---
 tools/intel_bios.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/intel_bios.h +1 -1
index ca0d2c587120..f2ccb55ab6c3 100644
@@ -273,7 +273,6 @@ struct child_device_config {
 struct efp_child_device_config {
 	uint16_t handle;
 	uint16_t device_type;
-	uint16_t device_class;
 	uint8_t i2c_speed;
 	uint8_t dp_onboard_redriver; /* 158 */
 	uint8_t dp_ondock_redriver; /* 158 */
@@ -289,6 +288,7 @@ struct efp_child_device_config {
 	uint8_t skip1:4;
 	uint8_t slave_port; /*  202 */
 	uint8_t skip2;
+	uint16_t addin_offset;
 	uint8_t port;
 	uint8_t i2c_pin; /* for add-in card */
 	uint8_t slave_addr; /* for add-in card */
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by Tested-by on v1 1/1
#3 lore raw
In reply to [email protected]

This patch fixes the alignment. I spotted another issue with teh structure and will fix it once this one is merged.

Quoted 28 lines · On 08/16/2017 07:20 AM, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Fix decoding of the start of the child device structure. I had accidentally duplicated the "device class/type" member and forgot to include the add-in offset later. Fortunately both were two byte fields so they effectively cancelled each other out and thus the remainder of the child device structure was being decoded correctly. But of course anything sitting between these two fieds was being decoded incorrectly.

Fixes 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure")
---
  tools/intel_bios.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/intel_bios.h +0 -1
index ca0d2c587120..f2ccb55ab6c3 100644
@@ -273,7 +273,6 @@ struct child_device_config {
  struct efp_child_device_config {
  	uint16_t handle;
  	uint16_t device_type;
-	uint16_t device_class;
  	uint8_t i2c_speed;
  	uint8_t dp_onboard_redriver; /* 158 */
  	uint8_t dp_ondock_redriver; /* 158 */

tools/intel_bios.h struct efp_child_device_config { · line 294

Quoted 7 lines
tools/intel_bios.h +1 -0
@@ -289,6 +288,7 @@ struct efp_child_device_config {
  	uint8_t skip1:4;
  	uint8_t slave_port; /*  202 */
  	uint8_t skip2;
+	uint16_t addin_offset;
  	uint8_t port;
  	uint8_t i2c_pin; /* for add-in card */
  	uint8_t slave_addr; /* for add-in card */

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 2 lines · Clint Taylor

This patch fixes the alignment. I spotted another issue with teh structure and will fix it once this one is merged.

I'm sure there are plenty of issues; patches welcome!

BR,
Jani.

Quoted 46 lines
Quoted 28 lines · On 08/16/2017 07:20 AM, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Fix decoding of the start of the child device structure. I had accidentally duplicated the "device class/type" member and forgot to include the add-in offset later. Fortunately both were two byte fields so they effectively cancelled each other out and thus the remainder of the child device structure was being decoded correctly. But of course anything sitting between these two fieds was being decoded incorrectly.

Fixes 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure")
---
  tools/intel_bios.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/intel_bios.h +0 -1
index ca0d2c587120..f2ccb55ab6c3 100644
@@ -273,7 +273,6 @@ struct child_device_config {
  struct efp_child_device_config {
  	uint16_t handle;
  	uint16_t device_type;
-	uint16_t device_class;
  	uint8_t i2c_speed;
  	uint8_t dp_onboard_redriver; /* 158 */
  	uint8_t dp_ondock_redriver; /* 158 */

tools/intel_bios.h struct efp_child_device_config { · line 294

Quoted 7 lines
tools/intel_bios.h +1 -0
@@ -289,6 +288,7 @@ struct efp_child_device_config {
  	uint8_t skip1:4;
  	uint8_t slave_port; /*  202 */
  	uint8_t skip2;
+	uint16_t addin_offset;
  	uint8_t port;
  	uint8_t i2c_pin; /* for add-in card */
  	uint8_t slave_addr; /* for add-in card */

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx