[PATCH i-g-t 1/4] tools/intel-gfx-fw-info: Annotate abstract method
Lucas De Marchi
lucas.demarchi at intel.com
Mon Aug 19 19:55:57 UTC 2024
Make the FW an abstract class and annotate the decode() method.
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
tools/intel-gfx-fw-info | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/intel-gfx-fw-info b/tools/intel-gfx-fw-info
index b0d41bbae..5156c724c 100755
--- a/tools/intel-gfx-fw-info
+++ b/tools/intel-gfx-fw-info
@@ -4,6 +4,7 @@
#
# Copyright (C) 2023 Intel Corporation
+import abc
import argparse
import logging
import hashlib
@@ -103,10 +104,14 @@ def FIELD_GET(mask: int, value: int) -> int:
return (value & mask) >> ffs(mask)
-class Fw:
+class Fw(abc.ABC):
def __init__(self, fw):
self.fw = fw
+ @abc.abstractmethod
+ def decode(self):
+ raise NotImplementedError()
+
class FwCss(Fw):
def decode(self):
--
2.43.0
More information about the igt-dev
mailing list