[PATCH i-g-t 13/27] tools/intel_vbt_decode: Decode block 18 (Driver Rotation)

Ville Syrjala ville.syrjala at linux.intel.com
Fri Jun 7 13:57:44 UTC 2024


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Decode VBT block 18 (Driver Rotation). There's actually only one
bit in there with rest being effectively padding (albeit actually
named for some reason).

Example output from HSW:
BDB block 18 (12 bytes, min 12 bytes) - Driver rotation:
        0000: 12 0c 00 01 00 00 00 00  00 00 00 00 00 00 00

        Rotation enable: yes (0x1)
        Rotation flags 1: 0x00
        Rotation flags 2: 0x0000
        Rotation flags 3: 0x00000000
        Rotation flags 4: 0x00000000

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tools/intel_vbt_decode.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 38a7343b0c3b..a76eae94f037 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -342,6 +342,8 @@ static size_t block_min_size(const struct context *context, int section_id)
 		return sizeof(struct bdb_dot_clock_override);
 	case BDB_DISPLAY_SELECT_OLD:
 		return sizeof(struct bdb_display_select_old);
+	case BDB_DRIVER_ROTATION:
+		return sizeof(struct bdb_driver_rotation);
 	case BDB_DISPLAY_REMOVE_OLD:
 		return sizeof(struct bdb_display_remove_old);
 	case BDB_SDVO_LVDS_OPTIONS:
@@ -2211,6 +2213,20 @@ static void dump_display_remove_hsw(struct context *context,
 	}
 }
 
+static void dump_driver_rotation(struct context *context,
+				 const struct bdb_block *block)
+{
+	const struct bdb_driver_rotation *rot = block_data(block);
+
+	printf("\tRotation enable: %s (0x%x)\n", YESNO(rot->rotation_enable),
+	       rot->rotation_enable);
+
+	printf("\tRotation flags 1: 0x%02x\n", rot->rotation_flags_1);
+	printf("\tRotation flags 2: 0x%04x\n", rot->rotation_flags_2);
+	printf("\tRotation flags 3: 0x%08x\n", rot->rotation_flags_3);
+	printf("\tRotation flags 4: 0x%08x\n", rot->rotation_flags_4);
+}
+
 static void dump_edp(struct context *context,
 		     const struct bdb_block *block)
 {
@@ -3319,6 +3335,11 @@ struct dumper dumpers[] = {
 		.name = "Toggle list block (pre-IVB)",
 		.dump = dump_display_select_old,
 	},
+	{
+		.id = BDB_DRIVER_ROTATION,
+		.name = "Driver rotation",
+		.dump = dump_driver_rotation,
+	},
 	{
 		.id = BDB_DISPLAY_REMOVE_OLD,
 		.name = "Display remove (pre-IVB)",
-- 
2.44.2



More information about the igt-dev mailing list