xref: /openbmc/linux/drivers/gpu/drm/radeon/evergreen.h (revision 762f99f4f3cb41a775b5157dd761217beba65873)
14fe1999eSLee Jones /* radeon_evergreen.h -- Private header for radeon driver -*- linux-c -*-
24fe1999eSLee Jones  *
34fe1999eSLee Jones  * Copyright 2010 Advanced Micro Devices, Inc.
44fe1999eSLee Jones  *
54fe1999eSLee Jones  * Permission is hereby granted, free of charge, to any person obtaining a
64fe1999eSLee Jones  * copy of this software and associated documentation files (the "Software"),
74fe1999eSLee Jones  * to deal in the Software without restriction, including without limitation
84fe1999eSLee Jones  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
94fe1999eSLee Jones  * and/or sell copies of the Software, and to permit persons to whom the
104fe1999eSLee Jones  * Software is furnished to do so, subject to the following conditions:
114fe1999eSLee Jones  *
124fe1999eSLee Jones  * The above copyright notice and this permission notice (including the next
134fe1999eSLee Jones  * paragraph) shall be included in all copies or substantial portions of the
144fe1999eSLee Jones  * Software.
154fe1999eSLee Jones  *
164fe1999eSLee Jones  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
174fe1999eSLee Jones  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
184fe1999eSLee Jones  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
194fe1999eSLee Jones  * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
204fe1999eSLee Jones  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
214fe1999eSLee Jones  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
224fe1999eSLee Jones  * DEALINGS IN THE SOFTWARE.
234fe1999eSLee Jones  *
244fe1999eSLee Jones  */
254fe1999eSLee Jones 
264fe1999eSLee Jones #ifndef __RADEON_EVERGREEN_H__
274fe1999eSLee Jones #define __RADEON_EVERGREEN_H__
284fe1999eSLee Jones 
294fe1999eSLee Jones struct evergreen_mc_save;
30*1c5ae3baSLee Jones struct evergreen_power_info;
314fe1999eSLee Jones struct radeon_device;
324fe1999eSLee Jones 
334fe1999eSLee Jones bool evergreen_is_display_hung(struct radeon_device *rdev);
344fe1999eSLee Jones void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
354fe1999eSLee Jones void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save);
364fe1999eSLee Jones void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save);
374fe1999eSLee Jones int evergreen_mc_wait_for_idle(struct radeon_device *rdev);
384fe1999eSLee Jones void evergreen_mc_program(struct radeon_device *rdev);
394fe1999eSLee Jones void evergreen_irq_suspend(struct radeon_device *rdev);
404fe1999eSLee Jones int evergreen_mc_init(struct radeon_device *rdev);
414fe1999eSLee Jones void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev);
424fe1999eSLee Jones void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
434fe1999eSLee Jones void evergreen_program_aspm(struct radeon_device *rdev);
444fe1999eSLee Jones void sumo_rlc_fini(struct radeon_device *rdev);
454fe1999eSLee Jones int sumo_rlc_init(struct radeon_device *rdev);
464fe1999eSLee Jones void evergreen_gpu_pci_config_reset(struct radeon_device *rdev);
474fe1999eSLee Jones u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
486a86ecdeSLee Jones u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev);
495bacdf06SLee Jones int evergreen_rlc_resume(struct radeon_device *rdev);
50*1c5ae3baSLee Jones struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev);
514fe1999eSLee Jones 
524fe1999eSLee Jones #endif				/* __RADEON_EVERGREEN_H__ */
53