radeon_dri2.h revision 2f39173d
1/*
2 * Copyright 2008 Jerome Glisse
3 *
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation on the rights to use, copy, modify, merge,
10 * publish, distribute, sublicense, and/or sell copies of the Software,
11 * and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial
16 * portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 * NON-INFRINGEMENT.  IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR
22 * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 * DEALINGS IN THE SOFTWARE.
26 */
27#ifndef RADEON_DRI2_H
28#define RADEON_DRI2_H
29
30struct radeon_dri2 {
31    int         drm_fd;
32    Bool        enabled;
33    char	*device_name;
34};
35
36#ifdef RADEON_DRI2
37#include "dri2.h"
38Bool radeon_dri2_screen_init(ScreenPtr pScreen);
39void radeon_dri2_close_screen(ScreenPtr pScreen);
40#endif
41
42int drmmode_get_crtc_id(xf86CrtcPtr crtc);
43xf86CrtcPtr radeon_covering_crtc(ScrnInfoPtr pScrn, BoxPtr box,
44                                 xf86CrtcPtr desired, BoxPtr crtc_box_ret);
45void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,
46                                     unsigned int tv_usec, void *event_data);
47
48#endif
49