summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2020-09-03 14:46:24 -0700
committerEric Engestrom <eric@engestrom.ch>2020-09-16 19:23:26 +0200
commitdfdefc942242dcdd4203ae4236b15f7ecedebf82 (patch)
tree4bbd9179fe6de4905a3a5713fbd2d5b815d16f4b
parent76bb05414ff148d981415cf4d275af992fb5564a (diff)
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592> (cherry picked from commit 3b3772d6e694da91ead40c144292f5a93b2aa42e)
-rw-r--r--.pick_status.json2
-rw-r--r--src/freedreno/registers/gen_header.py13
2 files changed, 11 insertions, 4 deletions
diff --git a/.pick_status.json b/.pick_status.json
index de63eb4dc84..449c136c5fb 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1363,7 +1363,7 @@
"description": "freedreno: Make the pack struct have a .qword for wide addresses.",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/freedreno/registers/gen_header.py b/src/freedreno/registers/gen_header.py
index 7e3bcd4f7d8..33fcb344945 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,")