1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892
|
/*
* ***THIS FILE IS GENERATED. ***
* See param.cpp.mako for modifications
*
* Copyright (C) 2019-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
* @file zes_parameter_validation.cpp
*
*/
#include "ze_validation_layer.h"
#include "param_validation.h"
namespace validation_layer
{
ze_result_t
ZESParameterValidation::zesInitPrologue(
zes_init_flags_t flags ///< [in] initialization flags.
///< currently unused, must be 0 (default).
)
{
if( 0x1 < flags )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDriverGetPrologue(
uint32_t* pCount, ///< [in,out] pointer to the number of sysman driver instances.
///< if count is zero, then the loader shall update the value with the
///< total number of sysman drivers available.
///< if count is greater than the number of sysman drivers available, then
///< the loader shall update the value with the correct number of sysman
///< drivers available.
zes_driver_handle_t* phDrivers ///< [in,out][optional][range(0, *pCount)] array of sysman driver instance handles.
///< if count is less than the number of sysman drivers available, then the
///< loader shall only retrieve that number of sysman drivers.
)
{
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDriverGetExtensionPropertiesPrologue(
zes_driver_handle_t hDriver, ///< [in] handle of the driver instance
uint32_t* pCount, ///< [in,out] pointer to the number of extension properties.
///< if count is zero, then the driver shall update the value with the
///< total number of extension properties available.
///< if count is greater than the number of extension properties available,
///< then the driver shall update the value with the correct number of
///< extension properties available.
zes_driver_extension_properties_t* pExtensionProperties ///< [in,out][optional][range(0, *pCount)] array of query results for
///< extension properties.
///< if count is less than the number of extension properties available,
///< then driver shall only retrieve that number of extension properties.
)
{
if( nullptr == hDriver )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pExtensionProperties);
}
ze_result_t
ZESParameterValidation::zesDriverGetExtensionFunctionAddressPrologue(
zes_driver_handle_t hDriver, ///< [in] handle of the driver instance
const char* name, ///< [in] extension function name
void** ppFunctionAddress ///< [out] pointer to function pointer
)
{
if( nullptr == hDriver )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == name )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == ppFunctionAddress )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceGetPrologue(
zes_driver_handle_t hDriver, ///< [in] handle of the sysman driver instance
uint32_t* pCount, ///< [in,out] pointer to the number of sysman devices.
///< if count is zero, then the driver shall update the value with the
///< total number of sysman devices available.
///< if count is greater than the number of sysman devices available, then
///< the driver shall update the value with the correct number of sysman
///< devices available.
zes_device_handle_t* phDevices ///< [in,out][optional][range(0, *pCount)] array of handle of sysman devices.
///< if count is less than the number of sysman devices available, then
///< driver shall only retrieve that number of sysman devices.
)
{
if( nullptr == hDriver )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceGetPropertiesPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
zes_device_properties_t* pProperties ///< [in,out] Structure that will contain information about the device.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesDeviceGetStatePrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
zes_device_state_t* pState ///< [in,out] Structure that will contain information about the device.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pState);
}
ze_result_t
ZESParameterValidation::zesDeviceResetPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle for the device
ze_bool_t force ///< [in] If set to true, all applications that are currently using the
///< device will be forcibly killed.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceResetExtPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle for the device
zes_reset_properties_t* pProperties ///< [in] Device reset properties to apply
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesDeviceProcessesGetStatePrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle for the device
uint32_t* pCount, ///< [in,out] pointer to the number of processes.
///< if count is zero, then the driver shall update the value with the
///< total number of processes currently attached to the device.
///< if count is greater than the number of processes currently attached to
///< the device, then the driver shall update the value with the correct
///< number of processes.
zes_process_state_t* pProcesses ///< [in,out][optional][range(0, *pCount)] array of process information.
///< if count is less than the number of processes currently attached to
///< the device, then the driver shall only retrieve information about that
///< number of processes. In this case, the return code will ::ZE_RESULT_ERROR_INVALID_SIZE.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProcesses);
}
ze_result_t
ZESParameterValidation::zesDevicePciGetPropertiesPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
zes_pci_properties_t* pProperties ///< [in,out] Will contain the PCI properties.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesDevicePciGetStatePrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
zes_pci_state_t* pState ///< [in,out] Will contain the PCI properties.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pState);
}
ze_result_t
ZESParameterValidation::zesDevicePciGetBarsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of PCI bars.
///< if count is zero, then the driver shall update the value with the
///< total number of PCI bars that are setup.
///< if count is greater than the number of PCI bars that are setup, then
///< the driver shall update the value with the correct number of PCI bars.
zes_pci_bar_properties_t* pProperties ///< [in,out][optional][range(0, *pCount)] array of information about setup
///< PCI bars.
///< if count is less than the number of PCI bars that are setup, then the
///< driver shall only retrieve information about that number of PCI bars.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesDevicePciGetStatsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
zes_pci_stats_t* pStats ///< [in,out] Will contain a snapshot of the latest stats.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pStats )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceSetOverclockWaiverPrologue(
zes_device_handle_t hDevice ///< [in] Sysman handle of the device.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceGetOverclockDomainsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pOverclockDomains ///< [in,out] Returns the overclock domains that are supported (a bit for
///< each of enum ::zes_overclock_domain_t). If no bits are set, the device
///< doesn't support overclocking.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pOverclockDomains )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceGetOverclockControlsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
zes_overclock_domain_t domainType, ///< [in] Domain type.
uint32_t* pAvailableControls ///< [in,out] Returns the overclock controls that are supported for the
///< specified overclock domain (a bit for each of enum
///< ::zes_overclock_control_t).
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_OVERCLOCK_DOMAIN_ADM < domainType )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
if( nullptr == pAvailableControls )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceResetOverclockSettingsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
ze_bool_t onShippedState ///< [in] True will reset to shipped state; false will reset to
///< manufacturing state
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceReadOverclockStatePrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
zes_overclock_mode_t* pOverclockMode, ///< [out] One of overclock mode.
ze_bool_t* pWaiverSetting, ///< [out] Waiver setting: 0 = Waiver not set, 1 = waiver has been set.
ze_bool_t* pOverclockState, ///< [out] Current settings 0 =manufacturing state, 1= shipped state)..
zes_pending_action_t* pPendingAction, ///< [out] This enum is returned when the driver attempts to set an
///< overclock control or reset overclock settings.
ze_bool_t* pPendingReset ///< [out] Pending reset 0 =manufacturing state, 1= shipped state)..
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pOverclockMode )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pWaiverSetting )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pOverclockState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pPendingAction )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pPendingReset )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumOverclockDomainsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_overclock_handle_t* phDomainHandle ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesOverclockGetDomainPropertiesPrologue(
zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain.
zes_overclock_properties_t* pDomainProperties ///< [in,out] The overclock properties for the specified domain.
)
{
if( nullptr == hDomainHandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pDomainProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pDomainProperties);
}
ze_result_t
ZESParameterValidation::zesOverclockGetDomainVFPropertiesPrologue(
zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain.
zes_vf_property_t* pVFProperties ///< [in,out] The VF min,max,step for a specified domain.
)
{
if( nullptr == hDomainHandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pVFProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesOverclockGetDomainControlPropertiesPrologue(
zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain.
zes_overclock_control_t DomainControl, ///< [in] Handle for the component.
zes_control_property_t* pControlProperties ///< [in,out] overclock control values.
)
{
if( nullptr == hDomainHandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
if( nullptr == pControlProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesOverclockGetControlCurrentValuePrologue(
zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component.
zes_overclock_control_t DomainControl, ///< [in] Overclock Control.
double* pValue ///< [in,out] Getting overclock control value for the specified control.
)
{
if( nullptr == hDomainHandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
if( nullptr == pValue )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesOverclockGetControlPendingValuePrologue(
zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain.
zes_overclock_control_t DomainControl, ///< [in] Overclock Control.
double* pValue ///< [out] Returns the pending value for a given control. The units and
///< format of the value depend on the control type.
)
{
if( nullptr == hDomainHandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
if( nullptr == pValue )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesOverclockSetControlUserValuePrologue(
zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain.
zes_overclock_control_t DomainControl, ///< [in] Domain Control.
double pValue, ///< [in] The new value of the control. The units and format of the value
///< depend on the control type.
zes_pending_action_t* pPendingAction ///< [out] Pending overclock setting.
)
{
if( nullptr == hDomainHandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
if( nullptr == pPendingAction )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesOverclockGetControlStatePrologue(
zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain.
zes_overclock_control_t DomainControl, ///< [in] Domain Control.
zes_control_state_t* pControlState, ///< [out] Current overclock control state.
zes_pending_action_t* pPendingAction ///< [out] Pending overclock setting.
)
{
if( nullptr == hDomainHandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_OVERCLOCK_CONTROL_ACM_DISABLE < DomainControl )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
if( nullptr == pControlState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pPendingAction )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesOverclockGetVFPointValuesPrologue(
zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain.
zes_vf_type_t VFType, ///< [in] Voltage or Freqency point to read.
zes_vf_array_type_t VFArrayType, ///< [in] User,Default or Live VF array to read from
uint32_t PointIndex, ///< [in] Point index - number between (0, max_num_points - 1).
uint32_t* PointValue ///< [out] Returns the frequency in 1kHz units or voltage in millivolt
///< units from the custom V-F curve at the specified zero-based index
)
{
if( nullptr == hDomainHandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_VF_TYPE_FREQ < VFType )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
if( ZES_VF_ARRAY_TYPE_LIVE_VF_ARRAY < VFArrayType )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
if( nullptr == PointValue )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesOverclockSetVFPointValuesPrologue(
zes_overclock_handle_t hDomainHandle, ///< [in] Handle for the component domain.
zes_vf_type_t VFType, ///< [in] Voltage or Freqency point to read.
uint32_t PointIndex, ///< [in] Point index - number between (0, max_num_points - 1).
uint32_t PointValue ///< [in] Writes frequency in 1kHz units or voltage in millivolt units to
///< custom V-F curve at the specified zero-based index
)
{
if( nullptr == hDomainHandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_VF_TYPE_FREQ < VFType )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumDiagnosticTestSuitesPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_diag_handle_t* phDiagnostics ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDiagnosticsGetPropertiesPrologue(
zes_diag_handle_t hDiagnostics, ///< [in] Handle for the component.
zes_diag_properties_t* pProperties ///< [in,out] Structure describing the properties of a diagnostics test
///< suite
)
{
if( nullptr == hDiagnostics )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesDiagnosticsGetTestsPrologue(
zes_diag_handle_t hDiagnostics, ///< [in] Handle for the component.
uint32_t* pCount, ///< [in,out] pointer to the number of tests.
///< if count is zero, then the driver shall update the value with the
///< total number of tests that are available.
///< if count is greater than the number of tests that are available, then
///< the driver shall update the value with the correct number of tests.
zes_diag_test_t* pTests ///< [in,out][optional][range(0, *pCount)] array of information about
///< individual tests sorted by increasing value of the `index` member of ::zes_diag_test_t.
///< if count is less than the number of tests that are available, then the
///< driver shall only retrieve that number of tests.
)
{
if( nullptr == hDiagnostics )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDiagnosticsRunTestsPrologue(
zes_diag_handle_t hDiagnostics, ///< [in] Handle for the component.
uint32_t startIndex, ///< [in] The index of the first test to run. Set to
///< ::ZES_DIAG_FIRST_TEST_INDEX to start from the beginning.
uint32_t endIndex, ///< [in] The index of the last test to run. Set to
///< ::ZES_DIAG_LAST_TEST_INDEX to complete all tests after the start test.
zes_diag_result_t* pResult ///< [in,out] The result of the diagnostics
)
{
if( nullptr == hDiagnostics )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pResult )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEccAvailablePrologue(
zes_device_handle_t hDevice, ///< [in] Handle for the component.
ze_bool_t* pAvailable ///< [out] ECC functionality is available (true)/unavailable (false).
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pAvailable )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEccConfigurablePrologue(
zes_device_handle_t hDevice, ///< [in] Handle for the component.
ze_bool_t* pConfigurable ///< [out] ECC can be enabled/disabled (true)/enabled/disabled (false).
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfigurable )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceGetEccStatePrologue(
zes_device_handle_t hDevice, ///< [in] Handle for the component.
zes_device_ecc_properties_t* pState ///< [out] ECC state, pending state, and pending action for state change.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pState);
}
ze_result_t
ZESParameterValidation::zesDeviceSetEccStatePrologue(
zes_device_handle_t hDevice, ///< [in] Handle for the component.
const zes_device_ecc_desc_t* newState, ///< [in] Pointer to desired ECC state.
zes_device_ecc_properties_t* pState ///< [out] ECC state, pending state, and pending action for state change.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == newState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( ZES_DEVICE_ECC_STATE_DISABLED < newState->state )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
auto retVal = ZE_RESULT_SUCCESS;
retVal = ParameterValidation::validateExtensions(newState);
if(retVal)
return retVal;
retVal = ParameterValidation::validateExtensions(pState);
return retVal;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumEngineGroupsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_engine_handle_t* phEngine ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesEngineGetPropertiesPrologue(
zes_engine_handle_t hEngine, ///< [in] Handle for the component.
zes_engine_properties_t* pProperties ///< [in,out] The properties for the specified engine group.
)
{
if( nullptr == hEngine )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesEngineGetActivityPrologue(
zes_engine_handle_t hEngine, ///< [in] Handle for the component.
zes_engine_stats_t* pStats ///< [in,out] Will contain a snapshot of the engine group activity
///< counters.
)
{
if( nullptr == hEngine )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pStats )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEventRegisterPrologue(
zes_device_handle_t hDevice, ///< [in] The device handle.
zes_event_type_flags_t events ///< [in] List of events to listen to.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( 0xffff < events )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDriverEventListenPrologue(
ze_driver_handle_t hDriver, ///< [in] handle of the driver instance
uint32_t timeout, ///< [in] if non-zero, then indicates the maximum time (in milliseconds) to
///< yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY;
///< if zero, then will check status and return immediately;
///< if `UINT32_MAX`, then function will not return until events arrive.
uint32_t count, ///< [in] Number of device handles in phDevices.
zes_device_handle_t* phDevices, ///< [in][range(0, count)] Device handles to listen to for events. Only
///< devices from the provided driver handle can be specified in this list.
uint32_t* pNumDeviceEvents, ///< [in,out] Will contain the actual number of devices in phDevices that
///< generated events. If non-zero, check pEvents to determine the devices
///< and events that were received.
zes_event_type_flags_t* pEvents ///< [in,out] An array that will continue the list of events for each
///< device listened in phDevices.
///< This array must be at least as big as count.
///< For every device handle in phDevices, this will provide the events
///< that occurred for that device at the same position in this array. If
///< no event was received for a given device, the corresponding array
///< entry will be zero.
)
{
if( nullptr == hDriver )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == phDevices )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pNumDeviceEvents )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pEvents )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDriverEventListenExPrologue(
ze_driver_handle_t hDriver, ///< [in] handle of the driver instance
uint64_t timeout, ///< [in] if non-zero, then indicates the maximum time (in milliseconds) to
///< yield before returning ::ZE_RESULT_SUCCESS or ::ZE_RESULT_NOT_READY;
///< if zero, then will check status and return immediately;
///< if `UINT64_MAX`, then function will not return until events arrive.
uint32_t count, ///< [in] Number of device handles in phDevices.
zes_device_handle_t* phDevices, ///< [in][range(0, count)] Device handles to listen to for events. Only
///< devices from the provided driver handle can be specified in this list.
uint32_t* pNumDeviceEvents, ///< [in,out] Will contain the actual number of devices in phDevices that
///< generated events. If non-zero, check pEvents to determine the devices
///< and events that were received.
zes_event_type_flags_t* pEvents ///< [in,out] An array that will continue the list of events for each
///< device listened in phDevices.
///< This array must be at least as big as count.
///< For every device handle in phDevices, this will provide the events
///< that occurred for that device at the same position in this array. If
///< no event was received for a given device, the corresponding array
///< entry will be zero.
)
{
if( nullptr == hDriver )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == phDevices )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pNumDeviceEvents )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pEvents )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumFabricPortsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_fabric_port_handle_t* phPort ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFabricPortGetPropertiesPrologue(
zes_fabric_port_handle_t hPort, ///< [in] Handle for the component.
zes_fabric_port_properties_t* pProperties ///< [in,out] Will contain properties of the Fabric Port.
)
{
if( nullptr == hPort )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesFabricPortGetLinkTypePrologue(
zes_fabric_port_handle_t hPort, ///< [in] Handle for the component.
zes_fabric_link_type_t* pLinkType ///< [in,out] Will contain details about the link attached to the Fabric
///< port.
)
{
if( nullptr == hPort )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pLinkType )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFabricPortGetConfigPrologue(
zes_fabric_port_handle_t hPort, ///< [in] Handle for the component.
zes_fabric_port_config_t* pConfig ///< [in,out] Will contain configuration of the Fabric Port.
)
{
if( nullptr == hPort )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfig )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pConfig);
}
ze_result_t
ZESParameterValidation::zesFabricPortSetConfigPrologue(
zes_fabric_port_handle_t hPort, ///< [in] Handle for the component.
const zes_fabric_port_config_t* pConfig ///< [in] Contains new configuration of the Fabric Port.
)
{
if( nullptr == hPort )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfig )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pConfig);
}
ze_result_t
ZESParameterValidation::zesFabricPortGetStatePrologue(
zes_fabric_port_handle_t hPort, ///< [in] Handle for the component.
zes_fabric_port_state_t* pState ///< [in,out] Will contain the current state of the Fabric Port
)
{
if( nullptr == hPort )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pState);
}
ze_result_t
ZESParameterValidation::zesFabricPortGetThroughputPrologue(
zes_fabric_port_handle_t hPort, ///< [in] Handle for the component.
zes_fabric_port_throughput_t* pThroughput ///< [in,out] Will contain the Fabric port throughput counters.
)
{
if( nullptr == hPort )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pThroughput )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFabricPortGetFabricErrorCountersPrologue(
zes_fabric_port_handle_t hPort, ///< [in] Handle for the component.
zes_fabric_port_error_counters_t* pErrors ///< [in,out] Will contain the Fabric port Error counters.
)
{
if( nullptr == hPort )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pErrors )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pErrors);
}
ze_result_t
ZESParameterValidation::zesFabricPortGetMultiPortThroughputPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t numPorts, ///< [in] Number of ports enumerated in function ::zesDeviceEnumFabricPorts
zes_fabric_port_handle_t* phPort, ///< [in][range(0, numPorts)] array of fabric port handles provided by user
///< to gather throughput values.
zes_fabric_port_throughput_t** pThroughput ///< [out][range(0, numPorts)] array of fabric port throughput counters
///< from multiple ports of type ::zes_fabric_port_throughput_t.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == phPort )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pThroughput )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumFansPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_fan_handle_t* phFan ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFanGetPropertiesPrologue(
zes_fan_handle_t hFan, ///< [in] Handle for the component.
zes_fan_properties_t* pProperties ///< [in,out] Will contain the properties of the fan.
)
{
if( nullptr == hFan )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesFanGetConfigPrologue(
zes_fan_handle_t hFan, ///< [in] Handle for the component.
zes_fan_config_t* pConfig ///< [in,out] Will contain the current configuration of the fan.
)
{
if( nullptr == hFan )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfig )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pConfig);
}
ze_result_t
ZESParameterValidation::zesFanSetDefaultModePrologue(
zes_fan_handle_t hFan ///< [in] Handle for the component.
)
{
if( nullptr == hFan )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFanSetFixedSpeedModePrologue(
zes_fan_handle_t hFan, ///< [in] Handle for the component.
const zes_fan_speed_t* speed ///< [in] The fixed fan speed setting
)
{
if( nullptr == hFan )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == speed )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFanSetSpeedTableModePrologue(
zes_fan_handle_t hFan, ///< [in] Handle for the component.
const zes_fan_speed_table_t* speedTable ///< [in] A table containing temperature/speed pairs.
)
{
if( nullptr == hFan )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == speedTable )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFanGetStatePrologue(
zes_fan_handle_t hFan, ///< [in] Handle for the component.
zes_fan_speed_units_t units, ///< [in] The units in which the fan speed should be returned.
int32_t* pSpeed ///< [in,out] Will contain the current speed of the fan in the units
///< requested. A value of -1 indicates that the fan speed cannot be
///< measured.
)
{
if( nullptr == hFan )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_FAN_SPEED_UNITS_PERCENT < units )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
if( nullptr == pSpeed )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumFirmwaresPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_firmware_handle_t* phFirmware ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFirmwareGetPropertiesPrologue(
zes_firmware_handle_t hFirmware, ///< [in] Handle for the component.
zes_firmware_properties_t* pProperties ///< [in,out] Pointer to an array that will hold the properties of the
///< firmware
)
{
if( nullptr == hFirmware )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesFirmwareFlashPrologue(
zes_firmware_handle_t hFirmware, ///< [in] Handle for the component.
void* pImage, ///< [in] Image of the new firmware to flash.
uint32_t size ///< [in] Size of the flash image.
)
{
if( nullptr == hFirmware )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pImage )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFirmwareGetFlashProgressPrologue(
zes_firmware_handle_t hFirmware, ///< [in] Handle for the component.
uint32_t* pCompletionPercent ///< [in,out] Pointer to the Completion Percentage of Firmware Update
)
{
if( nullptr == hFirmware )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCompletionPercent )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFirmwareGetConsoleLogsPrologue(
zes_firmware_handle_t hFirmware, ///< [in] Handle for the component.
size_t* pSize, ///< [in,out] size of firmware log
char* pFirmwareLog ///< [in,out][optional] pointer to null-terminated string of the log.
)
{
if( nullptr == hFirmware )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pSize )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumFrequencyDomainsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_freq_handle_t* phFrequency ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyGetPropertiesPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
zes_freq_properties_t* pProperties ///< [in,out] The frequency properties for the specified domain.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesFrequencyGetAvailableClocksPrologue(
zes_freq_handle_t hFrequency, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of frequencies.
///< if count is zero, then the driver shall update the value with the
///< total number of frequencies that are available.
///< if count is greater than the number of frequencies that are available,
///< then the driver shall update the value with the correct number of frequencies.
double* phFrequency ///< [in,out][optional][range(0, *pCount)] array of frequencies in units of
///< MHz and sorted from slowest to fastest.
///< if count is less than the number of frequencies that are available,
///< then the driver shall only retrieve that number of frequencies.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyGetRangePrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
zes_freq_range_t* pLimits ///< [in,out] The range between which the hardware can operate for the
///< specified domain.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pLimits )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencySetRangePrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
const zes_freq_range_t* pLimits ///< [in] The limits between which the hardware can operate for the
///< specified domain.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pLimits )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyGetStatePrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
zes_freq_state_t* pState ///< [in,out] Frequency state for the specified domain.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pState);
}
ze_result_t
ZESParameterValidation::zesFrequencyGetThrottleTimePrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
zes_freq_throttle_time_t* pThrottleTime ///< [in,out] Will contain a snapshot of the throttle time counters for the
///< specified domain.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pThrottleTime )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcGetCapabilitiesPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
zes_oc_capabilities_t* pOcCapabilities ///< [in,out] Pointer to the capabilities structure.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pOcCapabilities )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pOcCapabilities);
}
ze_result_t
ZESParameterValidation::zesFrequencyOcGetFrequencyTargetPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
double* pCurrentOcFrequency ///< [out] Overclocking Frequency in MHz, if extended moded is supported,
///< will returned in 1 Mhz granularity, else, in multiples of 50 Mhz. This
///< cannot be greater than the `maxOcFrequency` member of
///< ::zes_oc_capabilities_t.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCurrentOcFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcSetFrequencyTargetPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
double CurrentOcFrequency ///< [in] Overclocking Frequency in MHz, if extended moded is supported, it
///< could be set in 1 Mhz granularity, else, in multiples of 50 Mhz. This
///< cannot be greater than the `maxOcFrequency` member of
///< ::zes_oc_capabilities_t.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcGetVoltageTargetPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
double* pCurrentVoltageTarget, ///< [out] Overclock voltage in Volts. This cannot be greater than the
///< `maxOcVoltage` member of ::zes_oc_capabilities_t.
double* pCurrentVoltageOffset ///< [out] This voltage offset is applied to all points on the
///< voltage/frequency curve, including the new overclock voltageTarget.
///< Valid range is between the `minOcVoltageOffset` and
///< `maxOcVoltageOffset` members of ::zes_oc_capabilities_t.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCurrentVoltageTarget )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pCurrentVoltageOffset )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcSetVoltageTargetPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
double CurrentVoltageTarget, ///< [in] Overclock voltage in Volts. This cannot be greater than the
///< `maxOcVoltage` member of ::zes_oc_capabilities_t.
double CurrentVoltageOffset ///< [in] This voltage offset is applied to all points on the
///< voltage/frequency curve, include the new overclock voltageTarget.
///< Valid range is between the `minOcVoltageOffset` and
///< `maxOcVoltageOffset` members of ::zes_oc_capabilities_t.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcSetModePrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
zes_oc_mode_t CurrentOcMode ///< [in] Current Overclocking Mode ::zes_oc_mode_t.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_OC_MODE_FIXED < CurrentOcMode )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcGetModePrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
zes_oc_mode_t* pCurrentOcMode ///< [out] Current Overclocking Mode ::zes_oc_mode_t.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCurrentOcMode )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcGetIccMaxPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
double* pOcIccMax ///< [in,out] Will contain the maximum current limit in Amperes on
///< successful return.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pOcIccMax )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcSetIccMaxPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
double ocIccMax ///< [in] The new maximum current limit in Amperes.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcGetTjMaxPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
double* pOcTjMax ///< [in,out] Will contain the maximum temperature limit in degrees Celsius
///< on successful return.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pOcTjMax )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFrequencyOcSetTjMaxPrologue(
zes_freq_handle_t hFrequency, ///< [in] Handle for the component.
double ocTjMax ///< [in] The new maximum temperature limit in degrees Celsius.
)
{
if( nullptr == hFrequency )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumLedsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_led_handle_t* phLed ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesLedGetPropertiesPrologue(
zes_led_handle_t hLed, ///< [in] Handle for the component.
zes_led_properties_t* pProperties ///< [in,out] Will contain the properties of the LED.
)
{
if( nullptr == hLed )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesLedGetStatePrologue(
zes_led_handle_t hLed, ///< [in] Handle for the component.
zes_led_state_t* pState ///< [in,out] Will contain the current state of the LED.
)
{
if( nullptr == hLed )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pState);
}
ze_result_t
ZESParameterValidation::zesLedSetStatePrologue(
zes_led_handle_t hLed, ///< [in] Handle for the component.
ze_bool_t enable ///< [in] Set to TRUE to turn the LED on, FALSE to turn off.
)
{
if( nullptr == hLed )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesLedSetColorPrologue(
zes_led_handle_t hLed, ///< [in] Handle for the component.
const zes_led_color_t* pColor ///< [in] New color of the LED.
)
{
if( nullptr == hLed )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pColor )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumMemoryModulesPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_mem_handle_t* phMemory ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesMemoryGetPropertiesPrologue(
zes_mem_handle_t hMemory, ///< [in] Handle for the component.
zes_mem_properties_t* pProperties ///< [in,out] Will contain memory properties.
)
{
if( nullptr == hMemory )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesMemoryGetStatePrologue(
zes_mem_handle_t hMemory, ///< [in] Handle for the component.
zes_mem_state_t* pState ///< [in,out] Will contain the current health and allocated memory.
)
{
if( nullptr == hMemory )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pState);
}
ze_result_t
ZESParameterValidation::zesMemoryGetBandwidthPrologue(
zes_mem_handle_t hMemory, ///< [in] Handle for the component.
zes_mem_bandwidth_t* pBandwidth ///< [in,out] Will contain the total number of bytes read from and written
///< to memory, as well as the current maximum bandwidth.
)
{
if( nullptr == hMemory )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pBandwidth )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumPerformanceFactorDomainsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_perf_handle_t* phPerf ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesPerformanceFactorGetPropertiesPrologue(
zes_perf_handle_t hPerf, ///< [in] Handle for the Performance Factor domain.
zes_perf_properties_t* pProperties ///< [in,out] Will contain information about the specified Performance
///< Factor domain.
)
{
if( nullptr == hPerf )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesPerformanceFactorGetConfigPrologue(
zes_perf_handle_t hPerf, ///< [in] Handle for the Performance Factor domain.
double* pFactor ///< [in,out] Will contain the actual Performance Factor being used by the
///< hardware (may not be the same as the requested Performance Factor).
)
{
if( nullptr == hPerf )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pFactor )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesPerformanceFactorSetConfigPrologue(
zes_perf_handle_t hPerf, ///< [in] Handle for the Performance Factor domain.
double factor ///< [in] The new Performance Factor.
)
{
if( nullptr == hPerf )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumPowerDomainsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_pwr_handle_t* phPower ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceGetCardPowerDomainPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
zes_pwr_handle_t* phPower ///< [in,out] power domain handle for the entire PCIe card.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == phPower )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesPowerGetPropertiesPrologue(
zes_pwr_handle_t hPower, ///< [in] Handle for the component.
zes_power_properties_t* pProperties ///< [in,out] Structure that will contain property data.
)
{
if( nullptr == hPower )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesPowerGetEnergyCounterPrologue(
zes_pwr_handle_t hPower, ///< [in] Handle for the component.
zes_power_energy_counter_t* pEnergy ///< [in,out] Will contain the latest snapshot of the energy counter and
///< timestamp when the last counter value was measured.
)
{
if( nullptr == hPower )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pEnergy )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesPowerGetLimitsPrologue(
zes_pwr_handle_t hPower, ///< [in] Handle for the component.
zes_power_sustained_limit_t* pSustained, ///< [in,out][optional] The sustained power limit. If this is null, the
///< current sustained power limits will not be returned.
zes_power_burst_limit_t* pBurst, ///< [in,out][optional] The burst power limit. If this is null, the current
///< peak power limits will not be returned.
zes_power_peak_limit_t* pPeak ///< [in,out][optional] The peak power limit. If this is null, the peak
///< power limits will not be returned.
)
{
if( nullptr == hPower )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesPowerSetLimitsPrologue(
zes_pwr_handle_t hPower, ///< [in] Handle for the component.
const zes_power_sustained_limit_t* pSustained, ///< [in][optional] The sustained power limit. If this is null, no changes
///< will be made to the sustained power limits.
const zes_power_burst_limit_t* pBurst, ///< [in][optional] The burst power limit. If this is null, no changes will
///< be made to the burst power limits.
const zes_power_peak_limit_t* pPeak ///< [in][optional] The peak power limit. If this is null, no changes will
///< be made to the peak power limits.
)
{
if( nullptr == hPower )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesPowerGetEnergyThresholdPrologue(
zes_pwr_handle_t hPower, ///< [in] Handle for the component.
zes_energy_threshold_t* pThreshold ///< [in,out] Returns information about the energy threshold setting -
///< enabled/energy threshold/process ID.
)
{
if( nullptr == hPower )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pThreshold )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesPowerSetEnergyThresholdPrologue(
zes_pwr_handle_t hPower, ///< [in] Handle for the component.
double threshold ///< [in] The energy threshold to be set in joules.
)
{
if( nullptr == hPower )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumPsusPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_psu_handle_t* phPsu ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesPsuGetPropertiesPrologue(
zes_psu_handle_t hPsu, ///< [in] Handle for the component.
zes_psu_properties_t* pProperties ///< [in,out] Will contain the properties of the power supply.
)
{
if( nullptr == hPsu )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesPsuGetStatePrologue(
zes_psu_handle_t hPsu, ///< [in] Handle for the component.
zes_psu_state_t* pState ///< [in,out] Will contain the current state of the power supply.
)
{
if( nullptr == hPsu )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pState);
}
ze_result_t
ZESParameterValidation::zesDeviceEnumRasErrorSetsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_ras_handle_t* phRas ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesRasGetPropertiesPrologue(
zes_ras_handle_t hRas, ///< [in] Handle for the component.
zes_ras_properties_t* pProperties ///< [in,out] Structure describing RAS properties
)
{
if( nullptr == hRas )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesRasGetConfigPrologue(
zes_ras_handle_t hRas, ///< [in] Handle for the component.
zes_ras_config_t* pConfig ///< [in,out] Will be populed with the current RAS configuration -
///< thresholds used to trigger events
)
{
if( nullptr == hRas )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfig )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pConfig);
}
ze_result_t
ZESParameterValidation::zesRasSetConfigPrologue(
zes_ras_handle_t hRas, ///< [in] Handle for the component.
const zes_ras_config_t* pConfig ///< [in] Change the RAS configuration - thresholds used to trigger events
)
{
if( nullptr == hRas )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfig )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pConfig);
}
ze_result_t
ZESParameterValidation::zesRasGetStatePrologue(
zes_ras_handle_t hRas, ///< [in] Handle for the component.
ze_bool_t clear, ///< [in] Set to 1 to clear the counters of this type
zes_ras_state_t* pState ///< [in,out] Breakdown of where errors have occurred
)
{
if( nullptr == hRas )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pState )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pState);
}
ze_result_t
ZESParameterValidation::zesDeviceEnumSchedulersPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_sched_handle_t* phScheduler ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesSchedulerGetPropertiesPrologue(
zes_sched_handle_t hScheduler, ///< [in] Handle for the component.
zes_sched_properties_t* pProperties ///< [in,out] Structure that will contain property data.
)
{
if( nullptr == hScheduler )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesSchedulerGetCurrentModePrologue(
zes_sched_handle_t hScheduler, ///< [in] Sysman handle for the component.
zes_sched_mode_t* pMode ///< [in,out] Will contain the current scheduler mode.
)
{
if( nullptr == hScheduler )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pMode )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesSchedulerGetTimeoutModePropertiesPrologue(
zes_sched_handle_t hScheduler, ///< [in] Sysman handle for the component.
ze_bool_t getDefaults, ///< [in] If TRUE, the driver will return the system default properties for
///< this mode, otherwise it will return the current properties.
zes_sched_timeout_properties_t* pConfig ///< [in,out] Will contain the current parameters for this mode.
)
{
if( nullptr == hScheduler )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfig )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pConfig);
}
ze_result_t
ZESParameterValidation::zesSchedulerGetTimesliceModePropertiesPrologue(
zes_sched_handle_t hScheduler, ///< [in] Sysman handle for the component.
ze_bool_t getDefaults, ///< [in] If TRUE, the driver will return the system default properties for
///< this mode, otherwise it will return the current properties.
zes_sched_timeslice_properties_t* pConfig ///< [in,out] Will contain the current parameters for this mode.
)
{
if( nullptr == hScheduler )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfig )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pConfig);
}
ze_result_t
ZESParameterValidation::zesSchedulerSetTimeoutModePrologue(
zes_sched_handle_t hScheduler, ///< [in] Sysman handle for the component.
zes_sched_timeout_properties_t* pProperties, ///< [in] The properties to use when configurating this mode.
ze_bool_t* pNeedReload ///< [in,out] Will be set to TRUE if a device driver reload is needed to
///< apply the new scheduler mode.
)
{
if( nullptr == hScheduler )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pNeedReload )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesSchedulerSetTimesliceModePrologue(
zes_sched_handle_t hScheduler, ///< [in] Sysman handle for the component.
zes_sched_timeslice_properties_t* pProperties, ///< [in] The properties to use when configurating this mode.
ze_bool_t* pNeedReload ///< [in,out] Will be set to TRUE if a device driver reload is needed to
///< apply the new scheduler mode.
)
{
if( nullptr == hScheduler )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == pNeedReload )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesSchedulerSetExclusiveModePrologue(
zes_sched_handle_t hScheduler, ///< [in] Sysman handle for the component.
ze_bool_t* pNeedReload ///< [in,out] Will be set to TRUE if a device driver reload is needed to
///< apply the new scheduler mode.
)
{
if( nullptr == hScheduler )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pNeedReload )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesSchedulerSetComputeUnitDebugModePrologue(
zes_sched_handle_t hScheduler, ///< [in] Sysman handle for the component.
ze_bool_t* pNeedReload ///< [in,out] Will be set to TRUE if a device driver reload is needed to
///< apply the new scheduler mode.
)
{
if( nullptr == hScheduler )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pNeedReload )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumStandbyDomainsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_standby_handle_t* phStandby ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesStandbyGetPropertiesPrologue(
zes_standby_handle_t hStandby, ///< [in] Handle for the component.
zes_standby_properties_t* pProperties ///< [in,out] Will contain the standby hardware properties.
)
{
if( nullptr == hStandby )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesStandbyGetModePrologue(
zes_standby_handle_t hStandby, ///< [in] Handle for the component.
zes_standby_promo_mode_t* pMode ///< [in,out] Will contain the current standby mode.
)
{
if( nullptr == hStandby )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pMode )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesStandbySetModePrologue(
zes_standby_handle_t hStandby, ///< [in] Handle for the component.
zes_standby_promo_mode_t mode ///< [in] New standby mode.
)
{
if( nullptr == hStandby )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_STANDBY_PROMO_MODE_NEVER < mode )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumTemperatureSensorsPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_temp_handle_t* phTemperature ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesTemperatureGetPropertiesPrologue(
zes_temp_handle_t hTemperature, ///< [in] Handle for the component.
zes_temp_properties_t* pProperties ///< [in,out] Will contain the temperature sensor properties.
)
{
if( nullptr == hTemperature )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesTemperatureGetConfigPrologue(
zes_temp_handle_t hTemperature, ///< [in] Handle for the component.
zes_temp_config_t* pConfig ///< [in,out] Returns current configuration.
)
{
if( nullptr == hTemperature )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfig )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pConfig);
}
ze_result_t
ZESParameterValidation::zesTemperatureSetConfigPrologue(
zes_temp_handle_t hTemperature, ///< [in] Handle for the component.
const zes_temp_config_t* pConfig ///< [in] New configuration.
)
{
if( nullptr == hTemperature )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pConfig )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pConfig);
}
ze_result_t
ZESParameterValidation::zesTemperatureGetStatePrologue(
zes_temp_handle_t hTemperature, ///< [in] Handle for the component.
double* pTemperature ///< [in,out] Will contain the temperature read from the specified sensor
///< in degrees Celsius.
)
{
if( nullptr == hTemperature )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pTemperature )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesPowerGetLimitsExtPrologue(
zes_pwr_handle_t hPower, ///< [in] Power domain handle instance.
uint32_t* pCount, ///< [in,out] Pointer to the number of power limit descriptors. If count is
///< zero, then the driver shall update the value with the total number of
///< components of this type that are available. If count is greater than
///< the number of components of this type that are available, then the
///< driver shall update the value with the correct number of components.
zes_power_limit_ext_desc_t* pSustained ///< [in,out][optional][range(0, *pCount)] Array of query results for power
///< limit descriptors. If count is less than the number of components of
///< this type that are available, then the driver shall only retrieve that
///< number of components.
)
{
if( nullptr == hPower )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pSustained);
}
ze_result_t
ZESParameterValidation::zesPowerSetLimitsExtPrologue(
zes_pwr_handle_t hPower, ///< [in] Handle for the component.
uint32_t* pCount, ///< [in] Pointer to the number of power limit descriptors.
zes_power_limit_ext_desc_t* pSustained ///< [in][optional][range(0, *pCount)] Array of power limit descriptors.
)
{
if( nullptr == hPower )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pSustained);
}
ze_result_t
ZESParameterValidation::zesEngineGetActivityExtPrologue(
zes_engine_handle_t hEngine, ///< [in] Handle for the component.
uint32_t* pCount, ///< [in,out] Pointer to the number of VF engine stats descriptors.
///< - if count is zero, the driver shall update the value with the total
///< number of engine stats available.
///< - if count is greater than the total number of engine stats
///< available, the driver shall update the value with the correct number
///< of engine stats available.
///< - The count returned is the sum of number of VF instances currently
///< available and the PF instance.
zes_engine_stats_t* pStats ///< [in,out][optional][range(0, *pCount)] array of engine group activity counters.
///< - if count is less than the total number of engine stats available,
///< then driver shall only retrieve that number of stats.
///< - the implementation shall populate the vector with engine stat for
///< PF at index 0 of the vector followed by user provided pCount-1 number
///< of VF engine stats.
)
{
if( nullptr == hEngine )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesRasGetStateExpPrologue(
zes_ras_handle_t hRas, ///< [in] Handle for the component.
uint32_t* pCount, ///< [in,out] pointer to the number of RAS state structures that can be retrieved.
///< if count is zero, then the driver shall update the value with the
///< total number of error categories for which state can be retrieved.
///< if count is greater than the number of RAS states available, then the
///< driver shall update the value with the correct number of RAS states available.
zes_ras_state_exp_t* pState ///< [in,out][optional][range(0, *pCount)] array of query results for RAS
///< error states for different categories.
///< if count is less than the number of RAS states available, then driver
///< shall only retrieve that number of RAS states.
)
{
if( nullptr == hRas )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesRasClearStateExpPrologue(
zes_ras_handle_t hRas, ///< [in] Handle for the component.
zes_ras_error_category_exp_t category ///< [in] category for which error counter is to be cleared.
)
{
if( nullptr == hRas )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( ZES_RAS_ERROR_CATEGORY_EXP_L3FABRIC_ERRORS < category )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFirmwareGetSecurityVersionExpPrologue(
zes_firmware_handle_t hFirmware, ///< [in] Handle for the component.
char* pVersion ///< [in,out] NULL terminated string value. The string "unknown" will be
///< returned if this property cannot be determined.
)
{
if( nullptr == hFirmware )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pVersion )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesFirmwareSetSecurityVersionExpPrologue(
zes_firmware_handle_t hFirmware ///< [in] Handle for the component.
)
{
if( nullptr == hFirmware )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceGetSubDevicePropertiesExpPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of sub devices.
///< if count is zero, then the driver shall update the value with the
///< total number of sub devices currently attached to the device.
///< if count is greater than the number of sub devices currently attached
///< to the device, then the driver shall update the value with the correct
///< number of sub devices.
zes_subdevice_exp_properties_t* pSubdeviceProps ///< [in,out][optional][range(0, *pCount)] array of sub device property structures.
///< if count is less than the number of sysman sub devices available, then
///< the driver shall only retrieve that number of sub device property structures.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pSubdeviceProps);
}
ze_result_t
ZESParameterValidation::zesDriverGetDeviceByUuidExpPrologue(
zes_driver_handle_t hDriver, ///< [in] handle of the sysman driver instance
zes_uuid_t uuid, ///< [in] universal unique identifier.
zes_device_handle_t* phDevice, ///< [out] Sysman handle of the device.
ze_bool_t* onSubdevice, ///< [out] True if the UUID belongs to the sub-device; false means that
///< UUID belongs to the root device.
uint32_t* subdeviceId ///< [out] If onSubdevice is true, this gives the ID of the sub-device
)
{
if( nullptr == hDriver )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == phDevice )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == onSubdevice )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
if( nullptr == subdeviceId )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumActiveVFExpPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_vf_handle_t* phVFhandle ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesVFManagementGetVFPropertiesExpPrologue(
zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the VF component.
zes_vf_exp_properties_t* pProperties ///< [in,out] Will contain VF properties.
)
{
if( nullptr == hVFhandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pProperties )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pProperties);
}
ze_result_t
ZESParameterValidation::zesVFManagementGetVFMemoryUtilizationExpPrologue(
zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component.
uint32_t* pCount, ///< [in,out] Pointer to the number of VF memory stats descriptors.
///< - if count is zero, the driver shall update the value with the total
///< number of memory stats available.
///< - if count is greater than the total number of memory stats
///< available, the driver shall update the value with the correct number
///< of memory stats available.
///< - The count returned is the sum of number of VF instances currently
///< available and the PF instance.
zes_vf_util_mem_exp_t* pMemUtil ///< [in,out][optional][range(0, *pCount)] array of memory group activity counters.
///< - if count is less than the total number of memory stats available,
///< then driver shall only retrieve that number of stats.
///< - the implementation shall populate the vector pCount-1 number of VF
///< memory stats.
)
{
if( nullptr == hVFhandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesVFManagementGetVFEngineUtilizationExpPrologue(
zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component.
uint32_t* pCount, ///< [in,out] Pointer to the number of VF engine stats descriptors.
///< - if count is zero, the driver shall update the value with the total
///< number of engine stats available.
///< - if count is greater than the total number of engine stats
///< available, the driver shall update the value with the correct number
///< of engine stats available.
///< - The count returned is the sum of number of VF instances currently
///< available and the PF instance.
zes_vf_util_engine_exp_t* pEngineUtil ///< [in,out][optional][range(0, *pCount)] array of engine group activity counters.
///< - if count is less than the total number of engine stats available,
///< then driver shall only retrieve that number of stats.
///< - the implementation shall populate the vector pCount-1 number of VF
///< engine stats.
)
{
if( nullptr == hVFhandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesVFManagementSetVFTelemetryModeExpPrologue(
zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component.
zes_vf_info_util_exp_flags_t flags, ///< [in] utilization flags to enable or disable. May be 0 or a valid
///< combination of ::zes_vf_info_util_exp_flag_t.
ze_bool_t enable ///< [in] Enable utilization telemetry.
)
{
if( nullptr == hVFhandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( 0xf < flags )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesVFManagementSetVFTelemetrySamplingIntervalExpPrologue(
zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component.
zes_vf_info_util_exp_flags_t flag, ///< [in] utilization flags to set sampling interval. May be 0 or a valid
///< combination of ::zes_vf_info_util_exp_flag_t.
uint64_t samplingInterval ///< [in] Sampling interval value.
)
{
if( nullptr == hVFhandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( 0xf < flag )
return ZE_RESULT_ERROR_INVALID_ENUMERATION;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesDeviceEnumEnabledVFExpPrologue(
zes_device_handle_t hDevice, ///< [in] Sysman handle of the device.
uint32_t* pCount, ///< [in,out] pointer to the number of components of this type.
///< if count is zero, then the driver shall update the value with the
///< total number of components of this type that are available.
///< if count is greater than the number of components of this type that
///< are available, then the driver shall update the value with the correct
///< number of components.
zes_vf_handle_t* phVFhandle ///< [in,out][optional][range(0, *pCount)] array of handle of components of
///< this type.
///< if count is less than the number of components of this type that are
///< available, then the driver shall only retrieve that number of
///< component handles.
)
{
if( nullptr == hDevice )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesVFManagementGetVFCapabilitiesExpPrologue(
zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the VF component.
zes_vf_exp_capabilities_t* pCapability ///< [in,out] Will contain VF capability.
)
{
if( nullptr == hVFhandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCapability )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pCapability);
}
ze_result_t
ZESParameterValidation::zesVFManagementGetVFMemoryUtilizationExp2Prologue(
zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component.
uint32_t* pCount, ///< [in,out] Pointer to the number of VF memory stats descriptors.
///< - if count is zero, the driver shall update the value with the total
///< number of memory stats available.
///< - if count is greater than the total number of memory stats
///< available, the driver shall update the value with the correct number
///< of memory stats available.
zes_vf_util_mem_exp2_t* pMemUtil ///< [in,out][optional][range(0, *pCount)] array of memory group activity counters.
///< - if count is less than the total number of memory stats available,
///< then driver shall only retrieve that number of stats.
///< - the implementation shall populate the vector pCount-1 number of VF
///< memory stats.
)
{
if( nullptr == hVFhandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesVFManagementGetVFEngineUtilizationExp2Prologue(
zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the component.
uint32_t* pCount, ///< [in,out] Pointer to the number of VF engine stats descriptors.
///< - if count is zero, the driver shall update the value with the total
///< number of engine stats available.
///< - if count is greater than the total number of engine stats
///< available, the driver shall update the value with the correct number
///< of engine stats available.
zes_vf_util_engine_exp2_t* pEngineUtil ///< [in,out][optional][range(0, *pCount)] array of engine group activity counters.
///< - if count is less than the total number of engine stats available,
///< then driver shall only retrieve that number of stats.
///< - the implementation shall populate the vector pCount-1 number of VF
///< engine stats.
)
{
if( nullptr == hVFhandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCount )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ZE_RESULT_SUCCESS;
}
ze_result_t
ZESParameterValidation::zesVFManagementGetVFCapabilitiesExp2Prologue(
zes_vf_handle_t hVFhandle, ///< [in] Sysman handle for the VF component.
zes_vf_exp2_capabilities_t* pCapability ///< [in,out] Will contain VF capability.
)
{
if( nullptr == hVFhandle )
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
if( nullptr == pCapability )
return ZE_RESULT_ERROR_INVALID_NULL_POINTER;
return ParameterValidation::validateExtensions(pCapability);
}
}
|