xref: /netbsd-src/sys/external/bsd/drm2/dist/include/uapi/drm/sis_drm.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1 /*	$NetBSD: sis_drm.h,v 1.2 2021/12/18 23:45:46 riastradh Exp $	*/
2 
3 /* sis_drv.h -- Private header for sis driver -*- linux-c -*- */
4 /*
5  * Copyright 2005 Eric Anholt
6  * All Rights Reserved.
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a
9  * copy of this software and associated documentation files (the "Software"),
10  * to deal in the Software without restriction, including without limitation
11  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12  * and/or sell copies of the Software, and to permit persons to whom the
13  * Software is furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice (including the next
16  * paragraph) shall be included in all copies or substantial portions of the
17  * Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
22  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  * LIABILITY, 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 DEALINGS IN THE
25  * SOFTWARE.
26  *
27  */
28 
29 #ifndef __SIS_DRM_H__
30 #define __SIS_DRM_H__
31 
32 #include "drm.h"
33 
34 #if defined(__cplusplus)
35 extern "C" {
36 #endif
37 
38 /* SiS specific ioctls */
39 #define NOT_USED_0_3
40 #define DRM_SIS_FB_ALLOC	0x04
41 #define DRM_SIS_FB_FREE	        0x05
42 #define NOT_USED_6_12
43 #define DRM_SIS_AGP_INIT	0x13
44 #define DRM_SIS_AGP_ALLOC	0x14
45 #define DRM_SIS_AGP_FREE	0x15
46 #define DRM_SIS_FB_INIT	        0x16
47 
48 #define DRM_IOCTL_SIS_FB_ALLOC		DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_FB_ALLOC, drm_sis_mem_t)
49 #define DRM_IOCTL_SIS_FB_FREE		DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_FREE, drm_sis_mem_t)
50 #define DRM_IOCTL_SIS_AGP_INIT		DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_INIT, drm_sis_agp_t)
51 #define DRM_IOCTL_SIS_AGP_ALLOC		DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_ALLOC, drm_sis_mem_t)
52 #define DRM_IOCTL_SIS_AGP_FREE		DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_AGP_FREE, drm_sis_mem_t)
53 #define DRM_IOCTL_SIS_FB_INIT		DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_INIT, drm_sis_fb_t)
54 /*
55 #define DRM_IOCTL_SIS_FLIP		DRM_IOW( 0x48, drm_sis_flip_t)
56 #define DRM_IOCTL_SIS_FLIP_INIT		DRM_IO(  0x49)
57 #define DRM_IOCTL_SIS_FLIP_FINAL	DRM_IO(  0x50)
58 */
59 
60 typedef struct {
61 	int context;
62 	unsigned long offset;
63 	unsigned long size;
64 	unsigned long free;
65 } drm_sis_mem_t;
66 
67 typedef struct {
68 	unsigned long offset, size;
69 } drm_sis_agp_t;
70 
71 typedef struct {
72 	unsigned long offset, size;
73 } drm_sis_fb_t;
74 
75 #if defined(__cplusplus)
76 }
77 #endif
78 
79 #endif				/* __SIS_DRM_H__ */
80