1 /* r600.h -- Private header for radeon driver -*- linux-c -*-
2  *
3  * Copyright 2008 Advanced Micro Devices, Inc.
4  * Copyright 2008 Red Hat Inc.
5  * Copyright 2009 Jerome Glisse.
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining a
8  * copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation
10  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11  * and/or sell copies of the Software, and to permit persons to whom the
12  * Software is furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice (including the next
15  * paragraph) shall be included in all copies or substantial portions of the
16  * Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21  * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
22  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24  * DEALINGS IN THE SOFTWARE.
25  *
26  */
27 
28 #ifndef __R600_H__
29 #define __R600_H__
30 
31 struct radeon_bo_list;
32 struct radeon_cs_parser;
33 struct r600_audio_pin;
34 struct radeon_crtc;
35 struct radeon_device;
36 struct radeon_hdmi_acr;
37 
38 u32 r600_gpu_check_soft_reset(struct radeon_device *rdev);
39 int r600_ih_ring_alloc(struct radeon_device *rdev);
40 void r600_ih_ring_fini(struct radeon_device *rdev);
41 
42 void r600_audio_enable(struct radeon_device *rdev, struct r600_audio_pin *pin,
43 		       u8 enable_mask);
44 void r600_set_audio_packet(struct drm_encoder *encoder, u32 offset);
45 void r600_set_mute(struct drm_encoder *encoder, u32 offset, bool mute);
46 void r600_hdmi_audio_set_dto(struct radeon_device *rdev,
47 			     struct radeon_crtc *crtc, unsigned int clock);
48 void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
49 			 unsigned char *buffer, size_t size);
50 void r600_hdmi_update_acr(struct drm_encoder *encoder, long offset,
51 			  const struct radeon_hdmi_acr *acr);
52 void r600_set_vbi_packet(struct drm_encoder *encoder, u32 offset);
53 void r600_hdmi_enable(struct drm_encoder *encoder, bool enable);
54 
55 int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
56 			   struct radeon_bo_list **cs_reloc);
57 
58 #endif				/* __R600_H__ */
59