sis_mm.c (152909) | sis_mm.c (157617) |
---|---|
1/* sis_mm.c -- Private header for Direct Rendering Manager -*- linux-c -*- 2 * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw 3 * 4 * Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. 5 * All rights reserved. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * copy of this software and associated documentation files (the "Software"), --- 15 unchanged lines hidden (view full) --- 24 * DEALINGS IN THE SOFTWARE. 25 * 26 * Authors: 27 * Sung-Ching Lin <sclin@sis.com.tw> 28 * 29 */ 30 31#include <sys/cdefs.h> | 1/* sis_mm.c -- Private header for Direct Rendering Manager -*- linux-c -*- 2 * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw 3 * 4 * Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. 5 * All rights reserved. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * copy of this software and associated documentation files (the "Software"), --- 15 unchanged lines hidden (view full) --- 24 * DEALINGS IN THE SOFTWARE. 25 * 26 * Authors: 27 * Sung-Ching Lin <sclin@sis.com.tw> 28 * 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/drm/sis_mm.c 152909 2005-11-28 23:13:57Z anholt $"); | 32__FBSDID("$FreeBSD: head/sys/dev/drm/sis_mm.c 157617 2006-04-09 20:45:45Z anholt $"); |
33 34#if defined(__linux__) && defined(CONFIG_FB_SIS) 35#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) 36#include <video/sisfb.h> 37#else 38#include <linux/sisfb.h> 39#endif 40#endif --- 47 unchanged lines hidden (view full) --- 88{ 89 return 0; 90} 91 92static int sis_fb_alloc(DRM_IOCTL_ARGS) 93{ 94 drm_sis_mem_t fb; 95 struct sis_memreq req; | 33 34#if defined(__linux__) && defined(CONFIG_FB_SIS) 35#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) 36#include <video/sisfb.h> 37#else 38#include <linux/sisfb.h> 39#endif 40#endif --- 47 unchanged lines hidden (view full) --- 88{ 89 return 0; 90} 91 92static int sis_fb_alloc(DRM_IOCTL_ARGS) 93{ 94 drm_sis_mem_t fb; 95 struct sis_memreq req; |
96 drm_sis_mem_t __user *argp = (void __user *)data; | 96 drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data; |
97 int retval = 0; 98 99 DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb)); 100 101 req.size = fb.size; 102 sis_malloc(&req); 103 if (req.offset) { 104 /* TODO */ --- 73 unchanged lines hidden (view full) --- 178 179 return 0; 180} 181 182static int sis_fb_alloc(DRM_IOCTL_ARGS) 183{ 184 DRM_DEVICE; 185 drm_sis_private_t *dev_priv = dev->dev_private; | 97 int retval = 0; 98 99 DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb)); 100 101 req.size = fb.size; 102 sis_malloc(&req); 103 if (req.offset) { 104 /* TODO */ --- 73 unchanged lines hidden (view full) --- 178 179 return 0; 180} 181 182static int sis_fb_alloc(DRM_IOCTL_ARGS) 183{ 184 DRM_DEVICE; 185 drm_sis_private_t *dev_priv = dev->dev_private; |
186 drm_sis_mem_t __user *argp = (void __user *)data; | 186 drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data; |
187 drm_sis_mem_t fb; 188 PMemBlock block; 189 int retval = 0; 190 191 if (dev_priv == NULL || dev_priv->FBHeap == NULL) 192 return DRM_ERR(EINVAL); 193 194 DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb)); --- 227 unchanged lines hidden --- | 187 drm_sis_mem_t fb; 188 PMemBlock block; 189 int retval = 0; 190 191 if (dev_priv == NULL || dev_priv->FBHeap == NULL) 192 return DRM_ERR(EINVAL); 193 194 DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb)); --- 227 unchanged lines hidden --- |