From: Eric Anholt Date: Thu, 3 Sep 2020 21:46:24 +0000 (-0700) Subject: freedreno: Make the pack struct have a .qword for wide addresses. X-Git-Tag: upstream/21.0.0~5501 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b3772d6e694da91ead40c144292f5a93b2aa42e;p=platform%2Fupstream%2Fmesa.git freedreno: Make the pack struct have a .qword for wide addresses. Storing a precomputed iova in reg packing wasn't possible because you'd truncate to 32 bits. Making it be .qword makes it possible. Cc: mesa-stable Part-of: --- diff --git a/src/freedreno/registers/gen_header.py b/src/freedreno/registers/gen_header.py index db491cf..9657dff 100644 --- a/src/freedreno/registers/gen_header.py +++ b/src/freedreno/registers/gen_header.py @@ -126,8 +126,11 @@ class Bitset(object): if prefix == None: prefix = self.name + value_name = "dword" print("struct %s {" % prefix) for f in self.fields: + if f.type == "waddress": + value_name = "qword" if f.type in [ "address", "waddress" ]: tab_to(" __bo_type", "bo;") tab_to(" uint32_t", "bo_offset;") @@ -137,8 +140,12 @@ class Bitset(object): type, val = f.ctype("var") tab_to(" %s" % type, "%s;" % name) - tab_to(" uint32_t", "unknown;") - tab_to(" uint32_t", "dword;") + if value_name == "qword": + tab_to(" uint64_t", "unknown;") + tab_to(" uint64_t", "qword;") + else: + tab_to(" uint32_t", "unknown;") + tab_to(" uint32_t", "dword;") print("};\n") address = None; @@ -176,7 +183,7 @@ class Bitset(object): else: type, val = f.ctype("fields.%s" % field_name(prefix, f.name)) print(" (%-40s << %2d) |" % (val, f.low)) - print(" fields.unknown | fields.dword,") + print(" fields.unknown | fields.%s," % (value_name,)) if address: print(" .is_address = true,")