1 /* 2 * SPDX-FileCopyrightText: Copyright (c) 2016-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 * SPDX-License-Identifier: MIT 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included in 13 * all copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * DEALINGS IN THE SOFTWARE. 22 */ 23 24 #include "kernel/gpu/sw_test.h" 25 26 NV_STATUS 27 swtestConstruct_IMPL 28 ( 29 SoftwareMethodTest *pSwTest, 30 CALL_CONTEXT *pCallContext, 31 RS_RES_ALLOC_PARAMS_INTERNAL *pParams 32 ) 33 { 34 return NV_OK; 35 } 36 37 void 38 swtestDestruct_IMPL 39 ( 40 SoftwareMethodTest *pSwTest 41 ) 42 { 43 ChannelDescendant *pChannelDescendant = staticCast(pSwTest, ChannelDescendant); 44 45 chandesIsolateOnDestruct(pChannelDescendant); 46 } 47 48 static const METHOD Nv04SoftwareTestMethods[] = 49 { 50 {mthdNoOperation, 0x0100, 0x0103}, 51 }; 52 53 NV_STATUS swtestGetSwMethods_IMPL 54 ( 55 SoftwareMethodTest *pSwTest, 56 const METHOD **ppMethods, 57 NvU32 *pNumMethods 58 ) 59 { 60 *ppMethods = Nv04SoftwareTestMethods; 61 *pNumMethods = NV_ARRAY_ELEMENTS32(Nv04SoftwareTestMethods); 62 return NV_OK; 63 } 64 65