Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2017 Advanced Micro Devices, Inc.
0003  *
0004  * Permission is hereby granted, free of charge, to any person obtaining a
0005  * copy of this software and associated documentation files (the "Software"),
0006  * to deal in the Software without restriction, including without limitation
0007  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0008  * and/or sell copies of the Software, and to permit persons to whom the
0009  * Software is furnished to do so, subject to the following conditions:
0010  *
0011  * The above copyright notice and this permission notice shall be included in
0012  * all copies or substantial portions of the Software.
0013  *
0014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0017  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
0018  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0020  * OTHER DEALINGS IN THE SOFTWARE.
0021  *
0022  */
0023 
0024 #ifndef __VF_ERROR_H__
0025 #define __VF_ERROR_H__
0026 
0027 #define AMDGIM_ERROR_CODE_FLAGS_TO_MAILBOX(c,f)    (((c & 0xFFFF) << 16) | (f & 0xFFFF))
0028 #define AMDGIM_ERROR_CODE(t,c)       (((t&0xF)<<12)|(c&0xFFF))
0029 
0030 /* Please keep enum same as AMD GIM driver */
0031 enum AMDGIM_ERROR_VF {
0032     AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL = 0,
0033     AMDGIM_ERROR_VF_NO_VBIOS,
0034     AMDGIM_ERROR_VF_GPU_POST_ERROR,
0035     AMDGIM_ERROR_VF_ATOMBIOS_GET_CLOCK_FAIL,
0036     AMDGIM_ERROR_VF_FENCE_INIT_FAIL,
0037 
0038     AMDGIM_ERROR_VF_AMDGPU_INIT_FAIL,
0039     AMDGIM_ERROR_VF_IB_INIT_FAIL,
0040     AMDGIM_ERROR_VF_AMDGPU_LATE_INIT_FAIL,
0041     AMDGIM_ERROR_VF_ASIC_RESUME_FAIL,
0042     AMDGIM_ERROR_VF_GPU_RESET_FAIL,
0043 
0044     AMDGIM_ERROR_VF_TEST,
0045     AMDGIM_ERROR_VF_MAX
0046 };
0047 
0048 enum AMDGIM_ERROR_CATEGORY {
0049     AMDGIM_ERROR_CATEGORY_NON_USED = 0,
0050     AMDGIM_ERROR_CATEGORY_GIM,
0051     AMDGIM_ERROR_CATEGORY_PF,
0052     AMDGIM_ERROR_CATEGORY_VF,
0053     AMDGIM_ERROR_CATEGORY_VBIOS,
0054     AMDGIM_ERROR_CATEGORY_MONITOR,
0055 
0056     AMDGIM_ERROR_CATEGORY_MAX
0057 };
0058 
0059 void amdgpu_vf_error_put(struct amdgpu_device *adev,
0060              uint16_t sub_error_code,
0061              uint16_t error_flags,
0062              uint64_t error_data);
0063 void amdgpu_vf_error_trans_all (struct amdgpu_device *adev);
0064 
0065 #endif /* __VF_ERROR_H__ */