11573Srgrimes/* 21573Srgrimes * Copyright 2020 Advanced Micro Devices, Inc. 31573Srgrimes * 41573Srgrimes * Permission is hereby granted, free of charge, to any person obtaining a 51573Srgrimes * copy of this software and associated documentation files (the "Software"), 61573Srgrimes * to deal in the Software without restriction, including without limitation 71573Srgrimes * the rights to use, copy, modify, merge, publish, distribute, sublicense, 81573Srgrimes * and/or sell copies of the Software, and to permit persons to whom the 91573Srgrimes * Software is furnished to do so, subject to the following conditions: 101573Srgrimes * 111573Srgrimes * The above copyright notice and this permission notice shall be included in 121573Srgrimes * all copies or substantial portions of the Software. 131573Srgrimes * 141573Srgrimes * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 151573Srgrimes * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 161573Srgrimes * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 171573Srgrimes * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 181573Srgrimes * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 191573Srgrimes * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 201573Srgrimes * OTHER DEALINGS IN THE SOFTWARE. 211573Srgrimes * 221573Srgrimes */ 231573Srgrimes#ifndef __AMDGPU_GFXHUB_H__ 241573Srgrimes#define __AMDGPU_GFXHUB_H__ 251573Srgrimes 261573Srgrimesstruct amdgpu_gfxhub_funcs { 271573Srgrimes u64 (*get_fb_location)(struct amdgpu_device *adev); 281573Srgrimes u64 (*get_mc_fb_offset)(struct amdgpu_device *adev); 291573Srgrimes void (*setup_vm_pt_regs)(struct amdgpu_device *adev, uint32_t vmid, 301573Srgrimes uint64_t page_table_base); 311573Srgrimes int (*gart_enable)(struct amdgpu_device *adev); 321573Srgrimes 331573Srgrimes void (*gart_disable)(struct amdgpu_device *adev); 341573Srgrimes void (*set_fault_enable_default)(struct amdgpu_device *adev, bool value); 351573Srgrimes void (*init)(struct amdgpu_device *adev); 361573Srgrimes int (*get_xgmi_info)(struct amdgpu_device *adev); 3792986Sobrien void (*utcl2_harvest)(struct amdgpu_device *adev); 3892986Sobrien void (*mode2_save_regs)(struct amdgpu_device *adev); 391573Srgrimes void (*mode2_restore_regs)(struct amdgpu_device *adev); 401573Srgrimes void (*halt)(struct amdgpu_device *adev); 411573Srgrimes}; 421573Srgrimes 431573Srgrimesstruct amdgpu_gfxhub { 441573Srgrimes const struct amdgpu_gfxhub_funcs *funcs; 451573Srgrimes}; 461573Srgrimes 471573Srgrimes#endif 481573Srgrimes