summaryrefslogtreecommitdiff
path: root/src/intel
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2017-04-14 15:09:42 -0700
committerAnuj Phogat <anuj.phogat@gmail.com>2017-06-09 16:02:58 -0700
commit2417d5ca19e473de33fbc05173b86dc64b94c5f9 (patch)
tree2f2b71f19963abe61d182764e2dbb41461f5ae62 /src/intel
parent98b95a3735ae0929cee406bc85d67105642711e8 (diff)
intel/genxml: Update genx_bits for gen10+
This commit adds a gen10 case to the switch statement and drops some unneeded code for handling gen numbers which doesn't work on gen10 and above. V2: Drop "z = float(z)" and the "z *= 10" lines Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/genxml/gen_bits_header.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/genxml/gen_bits_header.py b/src/intel/genxml/gen_bits_header.py
index ac8ec4c41f4..1b3504073b0 100644
--- a/src/intel/genxml/gen_bits_header.py
+++ b/src/intel/genxml/gen_bits_header.py
@@ -80,6 +80,7 @@ static inline uint32_t ATTRIBUTE_PURE
${item.token_name}_${prop}(const struct gen_device_info *devinfo)
{
switch (devinfo->gen) {
+ case 10: return ${item.get_prop(prop, 10)};
case 9: return ${item.get_prop(prop, 9)};
case 8: return ${item.get_prop(prop, 8)};
case 7:
@@ -167,10 +168,7 @@ class Gen(object):
def __init__(self, z):
# Convert potential "major.minor" string
- z = float(z)
- if z < 10:
- z *= 10
- self.tenx = int(z)
+ self.tenx = int(float(z) * 10)
def __lt__(self, other):
return self.tenx < other.tenx