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