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