Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (C) 2019  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
0012  * in all copies or substantial portions of the Software.
0013  *
0014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
0015  * OR 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) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020  */
0021 #ifndef __AMDGPU_MMHUB_H__
0022 #define __AMDGPU_MMHUB_H__
0023 
0024 struct amdgpu_mmhub_ras {
0025     struct amdgpu_ras_block_object ras_block;
0026 };
0027 
0028 struct amdgpu_mmhub_funcs {
0029     u64 (*get_fb_location)(struct amdgpu_device *adev);
0030     u64 (*get_mc_fb_offset)(struct amdgpu_device *adev);
0031     void (*init)(struct amdgpu_device *adev);
0032     int (*gart_enable)(struct amdgpu_device *adev);
0033     void (*set_fault_enable_default)(struct amdgpu_device *adev,
0034             bool value);
0035     void (*gart_disable)(struct amdgpu_device *adev);
0036     int (*set_clockgating)(struct amdgpu_device *adev,
0037                    enum amd_clockgating_state state);
0038     void (*get_clockgating)(struct amdgpu_device *adev, u64 *flags);
0039     void (*setup_vm_pt_regs)(struct amdgpu_device *adev, uint32_t vmid,
0040                 uint64_t page_table_base);
0041     void (*update_power_gating)(struct amdgpu_device *adev,
0042                                 bool enable);
0043 };
0044 
0045 struct amdgpu_mmhub {
0046     struct ras_common_if *ras_if;
0047     const struct amdgpu_mmhub_funcs *funcs;
0048     struct amdgpu_mmhub_ras  *ras;
0049 };
0050 
0051 #endif
0052