1152909Sanholt/* sis_drv.h -- Private header for sis driver -*- linux-c -*- */ 2152909Sanholt/*- 3152909Sanholt * Copyright 2005 Eric Anholt 4152909Sanholt * All Rights Reserved. 5152909Sanholt * 6152909Sanholt * Permission is hereby granted, free of charge, to any person obtaining a 7152909Sanholt * copy of this software and associated documentation files (the "Software"), 8152909Sanholt * to deal in the Software without restriction, including without limitation 9152909Sanholt * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10152909Sanholt * and/or sell copies of the Software, and to permit persons to whom the 11152909Sanholt * Software is furnished to do so, subject to the following conditions: 12152909Sanholt * 13152909Sanholt * The above copyright notice and this permission notice (including the next 14152909Sanholt * paragraph) shall be included in all copies or substantial portions of the 15152909Sanholt * Software. 16152909Sanholt * 17152909Sanholt * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18152909Sanholt * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19152909Sanholt * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20152909Sanholt * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21152909Sanholt * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22152909Sanholt * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23152909Sanholt * SOFTWARE. 24152909Sanholt * 25119895Sanholt */ 26119895Sanholt 27152909Sanholt#include <sys/cdefs.h> 28152909Sanholt__FBSDID("$FreeBSD: releng/11.0/sys/dev/drm/sis_drm.h 152909 2005-11-28 23:13:57Z anholt $"); 29152909Sanholt 30119895Sanholt#ifndef __SIS_DRM_H__ 31119895Sanholt#define __SIS_DRM_H__ 32119895Sanholt 33119895Sanholt/* SiS specific ioctls */ 34145132Sanholt#define NOT_USED_0_3 35145132Sanholt#define DRM_SIS_FB_ALLOC 0x04 36145132Sanholt#define DRM_SIS_FB_FREE 0x05 37145132Sanholt#define NOT_USED_6_12 38145132Sanholt#define DRM_SIS_AGP_INIT 0x13 39145132Sanholt#define DRM_SIS_AGP_ALLOC 0x14 40145132Sanholt#define DRM_SIS_AGP_FREE 0x15 41145132Sanholt#define DRM_SIS_FB_INIT 0x16 42145132Sanholt 43145132Sanholt#define DRM_IOCTL_SIS_FB_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_FB_ALLOC, drm_sis_mem_t) 44145132Sanholt#define DRM_IOCTL_SIS_FB_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_FREE, drm_sis_mem_t) 45145132Sanholt#define DRM_IOCTL_SIS_AGP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_INIT, drm_sis_agp_t) 46145132Sanholt#define DRM_IOCTL_SIS_AGP_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_ALLOC, drm_sis_mem_t) 47145132Sanholt#define DRM_IOCTL_SIS_AGP_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_AGP_FREE, drm_sis_mem_t) 48145132Sanholt#define DRM_IOCTL_SIS_FB_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_SIS_FB_INIT, drm_sis_fb_t) 49119895Sanholt/* 50119895Sanholt#define DRM_IOCTL_SIS_FLIP DRM_IOW( 0x48, drm_sis_flip_t) 51119895Sanholt#define DRM_IOCTL_SIS_FLIP_INIT DRM_IO( 0x49) 52119895Sanholt#define DRM_IOCTL_SIS_FLIP_FINAL DRM_IO( 0x50) 53119895Sanholt*/ 54119895Sanholt 55119895Sanholttypedef struct { 56119895Sanholt int context; 57119895Sanholt unsigned int offset; 58119895Sanholt unsigned int size; 59119895Sanholt unsigned long free; 60119895Sanholt} drm_sis_mem_t; 61119895Sanholt 62119895Sanholttypedef struct { 63119895Sanholt unsigned int offset, size; 64119895Sanholt} drm_sis_agp_t; 65119895Sanholt 66119895Sanholttypedef struct { 67119895Sanholt unsigned int offset, size; 68119895Sanholt} drm_sis_fb_t; 69119895Sanholt 70145132Sanholt#endif /* __SIS_DRM_H__ */ 71