Module: Mesa
Branch: main
Commit: e18761001e6a7638ac831b88b440db8a784a1bb6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e18761001e6a7638ac831b88b440db8a784a1bb6

Author: Lin, Ricky <ricky....@amd.com>
Date:   Tue Nov  7 17:37:54 2023 +0800

amd/vpelib: Rename the parameters of init vpe function

Rename the following parameters for better description.
- mj to major
- ni to minor
- rv to rev_id

Reviewed-by: Tomson Chang <tomson.ch...@amd.com>
Acked-by: Alan Liu <haoping....@amd.com>
Signed-off-by: rickylin <ricky....@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>

---

 src/amd/vpelib/inc/vpe_version.h       | 12 ++++++------
 src/amd/vpelib/src/core/inc/resource.h |  2 +-
 src/amd/vpelib/src/core/resource.c     |  6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/amd/vpelib/inc/vpe_version.h b/src/amd/vpelib/inc/vpe_version.h
index d1fe2182c4c..5e7b932eb70 100644
--- a/src/amd/vpelib/inc/vpe_version.h
+++ b/src/amd/vpelib/inc/vpe_version.h
@@ -43,12 +43,12 @@ extern "C" {
     ((version & VPELIB_API_VERSION_MINOR_MASK) >> 
VPELIB_API_VERSION_MINOR_SHIFT)
 
 
-#define VPE_VERSION(mj, mn, rv)     (((mj) << 16) | ((mn) << 8) | (rv))
-#define VPE_VERSION_MAJ(ver)        ((ver) >> 16)
-#define VPE_VERSION_MIN(ver)        (((ver) >> 8) & 0xFF)
-#define VPE_VERSION_REV(ver)        ((ver) & 0xFF)
-#define VPE_VERSION_6_1_0(ver)      ((ver) == VPE_VERSION(6, 1, 0))
-#define VPE_VERSION_6_1_1(ver)      ((ver) == VPE_VERSION(6, 1, 1))
+#define VPE_VERSION(major, minor, rev_id)     (((major) << 16) | ((minor) << 
8) | (rev_id))
+#define VPE_VERSION_MAJ(ver)                  ((ver) >> 16)
+#define VPE_VERSION_MIN(ver)                  (((ver) >> 8) & 0xFF)
+#define VPE_VERSION_REV(ver)                  ((ver) & 0xFF)
+#define VPE_VERSION_6_1_0(ver)                ((ver) == VPE_VERSION(6, 1, 0))
+#define VPE_VERSION_6_1_1(ver)                (((ver) == VPE_VERSION(6, 1, 1)) 
|| ((ver) == VPE_VERSION(6, 1, 2)))
 
 #ifdef __cplusplus
 }
diff --git a/src/amd/vpelib/src/core/inc/resource.h 
b/src/amd/vpelib/src/core/inc/resource.h
index e35c28f8737..da7385fdce9 100644
--- a/src/amd/vpelib/src/core/inc/resource.h
+++ b/src/amd/vpelib/src/core/inc/resource.h
@@ -111,7 +111,7 @@ struct resource {
 
 /** translate the vpe ip version into vpe hw level */
 enum vpe_ip_level vpe_resource_parse_ip_version(
-    uint8_t mj, uint8_t mi, uint8_t rv);
+    uint8_t major, uint8_t minor, uint8_t rev_id);
 
 /** initialize the resource ased on vpe hw level */
 enum vpe_status vpe_construct_resource(
diff --git a/src/amd/vpelib/src/core/resource.c 
b/src/amd/vpelib/src/core/resource.c
index ffaa2ee8519..8ce0eb18bc7 100644
--- a/src/amd/vpelib/src/core/resource.c
+++ b/src/amd/vpelib/src/core/resource.c
@@ -76,16 +76,16 @@ static const struct vpe_debug_options debug_defaults = {
 };
 
 enum vpe_ip_level vpe_resource_parse_ip_version(
-    uint8_t mj, uint8_t mn, uint8_t rv)
+    uint8_t major, uint8_t minor, uint8_t rev_id)
 {
     enum vpe_ip_level ip_level = VPE_IP_LEVEL_UNKNOWN;
-    switch (VPE_VERSION(mj, mn, rv)) {
+    switch (VPE_VERSION(major, minor, rev_id)) {
 #if VPE_BUILD_1_X
 #if VPE_BUILD_1_0
     case VPE_VERSION(6, 1, 0):
         ip_level = VPE_IP_LEVEL_1_0;
-#endif
         break;
+#endif
 #endif
     default:
         ip_level = VPE_IP_LEVEL_UNKNOWN;

Reply via email to