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.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: rickylin <ricky.lin@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841>
This commit is contained in:
Lin, Ricky 2023-11-07 17:37:54 +08:00 committed by Marge Bot
parent 258acf0227
commit e18761001e
3 changed files with 10 additions and 10 deletions

View file

@ -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
}

View file

@ -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(

View file

@ -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;