xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_mmhub.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1*41ec0267Sriastradh /*	$NetBSD: amdgpu_mmhub.h,v 1.2 2021/12/18 23:44:58 riastradh Exp $	*/
24e390cabSriastradh 
34e390cabSriastradh /*
44e390cabSriastradh  * Copyright (C) 2019  Advanced Micro Devices, Inc.
54e390cabSriastradh  *
64e390cabSriastradh  * Permission is hereby granted, free of charge, to any person obtaining a
74e390cabSriastradh  * copy of this software and associated documentation files (the "Software"),
84e390cabSriastradh  * to deal in the Software without restriction, including without limitation
94e390cabSriastradh  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
104e390cabSriastradh  * and/or sell copies of the Software, and to permit persons to whom the
114e390cabSriastradh  * Software is furnished to do so, subject to the following conditions:
124e390cabSriastradh  *
134e390cabSriastradh  * The above copyright notice and this permission notice shall be included
144e390cabSriastradh  * in all copies or substantial portions of the Software.
154e390cabSriastradh  *
164e390cabSriastradh  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
174e390cabSriastradh  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
184e390cabSriastradh  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
194e390cabSriastradh  * THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
204e390cabSriastradh  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
214e390cabSriastradh  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
224e390cabSriastradh  */
234e390cabSriastradh #ifndef __AMDGPU_MMHUB_H__
244e390cabSriastradh #define __AMDGPU_MMHUB_H__
254e390cabSriastradh 
264e390cabSriastradh struct amdgpu_mmhub_funcs {
274e390cabSriastradh 	void (*ras_init)(struct amdgpu_device *adev);
284e390cabSriastradh 	int (*ras_late_init)(struct amdgpu_device *adev);
294e390cabSriastradh 	void (*query_ras_error_count)(struct amdgpu_device *adev,
304e390cabSriastradh 					void *ras_error_status);
314e390cabSriastradh };
324e390cabSriastradh 
334e390cabSriastradh struct amdgpu_mmhub {
344e390cabSriastradh 	struct ras_common_if *ras_if;
354e390cabSriastradh 	const struct amdgpu_mmhub_funcs *funcs;
364e390cabSriastradh };
374e390cabSriastradh 
384e390cabSriastradh int amdgpu_mmhub_ras_late_init(struct amdgpu_device *adev);
394e390cabSriastradh void amdgpu_mmhub_ras_fini(struct amdgpu_device *adev);
404e390cabSriastradh #endif
414e390cabSriastradh 
42