From 2aa9ec5018e07673757c831e0cab82a42b5aced5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 21 Mar 2026 23:20:50 -0400 Subject: [PATCH] amd/packets: fix the size of 1-bit bitfields Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15137 Reviewed-by: Samuel Pitoiset Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/amd/packets/parse_cp_pm4_table_data_json.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/packets/parse_cp_pm4_table_data_json.py b/src/amd/packets/parse_cp_pm4_table_data_json.py index 0f85043101c..d7602eb2383 100644 --- a/src/amd/packets/parse_cp_pm4_table_data_json.py +++ b/src/amd/packets/parse_cp_pm4_table_data_json.py @@ -261,7 +261,7 @@ def get_field_bits(field): last_bit, first_bit = int(left), int(right) else: first_bit = int(bits_str) - last_bit = first_bit + 1 + last_bit = first_bit return (first_bit, last_bit) @@ -589,7 +589,7 @@ def print_packet(packet_name, packet_dict, engine_name, dword0_read): (dword_var, first_bit, bitmask, packet_name, word_index_0based)) continue - # Some address fields don't use the first 2-3 bits. Include them anyway. + # Some address fields don't use low bits. Include them anyway. if num_printed_fields == 1 and first_bit + num_bits == 32 and first_bit <= 8: num_bits = 32