diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2006-01-01 22:44:12 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-01-01 22:44:12 -0500 |
commit | 952d751a140e961f7ac67f743cf94d1a37c736e8 (patch) | |
tree | 023b9e97bdd5364043f1cddf0f68a4a2f8643e8f | |
parent | 443448d05468277abe99c9b24b9df538dd840f35 (diff) |
drm: bring sis + tdfx up to latest CVS
Cleanup SIS + TDFX drivers with latest changes from CVS.
From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
-rw-r--r-- | drivers/char/drm/sis_drm.h | 25 | ||||
-rw-r--r-- | drivers/char/drm/sis_drv.h | 4 | ||||
-rw-r--r-- | drivers/char/drm/sis_ds.h | 7 | ||||
-rw-r--r-- | drivers/char/drm/sis_mm.c | 18 | ||||
-rw-r--r-- | drivers/char/drm/tdfx_drv.h | 3 |
5 files changed, 42 insertions, 15 deletions
diff --git a/drivers/char/drm/sis_drm.h b/drivers/char/drm/sis_drm.h index 8f273da76ddb..30f7b3827466 100644 --- a/drivers/char/drm/sis_drm.h +++ b/drivers/char/drm/sis_drm.h | |||
@@ -1,3 +1,28 @@ | |||
1 | /* sis_drv.h -- Private header for sis driver -*- linux-c -*- */ | ||
2 | /* | ||
3 | * Copyright 2005 Eric Anholt | ||
4 | * All Rights Reserved. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the "Software"), | ||
8 | * to deal in the Software without restriction, including without limitation | ||
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
11 | * Software is furnished to do so, subject to the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice (including the next | ||
14 | * paragraph) shall be included in all copies or substantial portions of the | ||
15 | * Software. | ||
16 | * | ||
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
20 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
23 | * SOFTWARE. | ||
24 | * | ||
25 | */ | ||
1 | 26 | ||
2 | #ifndef __SIS_DRM_H__ | 27 | #ifndef __SIS_DRM_H__ |
3 | #define __SIS_DRM_H__ | 28 | #define __SIS_DRM_H__ |
diff --git a/drivers/char/drm/sis_drv.h b/drivers/char/drm/sis_drv.h index b1fddad83a93..e218e5269503 100644 --- a/drivers/char/drm/sis_drv.h +++ b/drivers/char/drm/sis_drv.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* sis_drv.h -- Private header for sis driver -*- linux-c -*- | 1 | /* sis_drv.h -- Private header for sis driver -*- linux-c -*- */ |
2 | * | 2 | /* |
3 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. | 3 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. |
4 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. | 4 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. |
5 | * All rights reserved. | 5 | * All rights reserved. |
diff --git a/drivers/char/drm/sis_ds.h b/drivers/char/drm/sis_ds.h index da850b4f5440..94f2b4728b63 100644 --- a/drivers/char/drm/sis_ds.h +++ b/drivers/char/drm/sis_ds.h | |||
@@ -1,6 +1,7 @@ | |||
1 | /* sis_ds.h -- Private header for Direct Rendering Manager -*- linux-c -*- | 1 | /* sis_ds.h -- Private header for Direct Rendering Manager -*- linux-c -*- |
2 | * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw | 2 | * Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw |
3 | * | 3 | */ |
4 | /* | ||
4 | * Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. | 5 | * Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan. |
5 | * All rights reserved. | 6 | * All rights reserved. |
6 | * | 7 | * |
@@ -35,7 +36,7 @@ | |||
35 | 36 | ||
36 | #define SET_SIZE 5000 | 37 | #define SET_SIZE 5000 |
37 | 38 | ||
38 | typedef unsigned int ITEM_TYPE; | 39 | typedef unsigned long ITEM_TYPE; |
39 | 40 | ||
40 | typedef struct { | 41 | typedef struct { |
41 | ITEM_TYPE val; | 42 | ITEM_TYPE val; |
diff --git a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c index f0488db001a4..6774d2fe3452 100644 --- a/drivers/char/drm/sis_mm.c +++ b/drivers/char/drm/sis_mm.c | |||
@@ -86,7 +86,7 @@ static int sis_fb_alloc(DRM_IOCTL_ARGS) | |||
86 | { | 86 | { |
87 | drm_sis_mem_t fb; | 87 | drm_sis_mem_t fb; |
88 | struct sis_memreq req; | 88 | struct sis_memreq req; |
89 | drm_sis_mem_t __user *argp = (void __user *)data; | 89 | drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data; |
90 | int retval = 0; | 90 | int retval = 0; |
91 | 91 | ||
92 | DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb)); | 92 | DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb)); |
@@ -110,7 +110,7 @@ static int sis_fb_alloc(DRM_IOCTL_ARGS) | |||
110 | 110 | ||
111 | DRM_COPY_TO_USER_IOCTL(argp, fb, sizeof(fb)); | 111 | DRM_COPY_TO_USER_IOCTL(argp, fb, sizeof(fb)); |
112 | 112 | ||
113 | DRM_DEBUG("alloc fb, size = %d, offset = %d\n", fb.size, req.offset); | 113 | DRM_DEBUG("alloc fb, size = %d, offset = %ld\n", fb.size, req.offset); |
114 | 114 | ||
115 | return retval; | 115 | return retval; |
116 | } | 116 | } |
@@ -127,9 +127,9 @@ static int sis_fb_free(DRM_IOCTL_ARGS) | |||
127 | 127 | ||
128 | if (!del_alloc_set(fb.context, VIDEO_TYPE, fb.free)) | 128 | if (!del_alloc_set(fb.context, VIDEO_TYPE, fb.free)) |
129 | retval = DRM_ERR(EINVAL); | 129 | retval = DRM_ERR(EINVAL); |
130 | sis_free((u32) fb.free); | 130 | sis_free(fb.free); |
131 | 131 | ||
132 | DRM_DEBUG("free fb, offset = %lu\n", fb.free); | 132 | DRM_DEBUG("free fb, offset = 0x%lx\n", fb.free); |
133 | 133 | ||
134 | return retval; | 134 | return retval; |
135 | } | 135 | } |
@@ -176,7 +176,7 @@ static int sis_fb_alloc(DRM_IOCTL_ARGS) | |||
176 | { | 176 | { |
177 | DRM_DEVICE; | 177 | DRM_DEVICE; |
178 | drm_sis_private_t *dev_priv = dev->dev_private; | 178 | drm_sis_private_t *dev_priv = dev->dev_private; |
179 | drm_sis_mem_t __user *argp = (void __user *)data; | 179 | drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data; |
180 | drm_sis_mem_t fb; | 180 | drm_sis_mem_t fb; |
181 | PMemBlock block; | 181 | PMemBlock block; |
182 | int retval = 0; | 182 | int retval = 0; |
@@ -267,7 +267,7 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS) | |||
267 | { | 267 | { |
268 | DRM_DEVICE; | 268 | DRM_DEVICE; |
269 | drm_sis_private_t *dev_priv = dev->dev_private; | 269 | drm_sis_private_t *dev_priv = dev->dev_private; |
270 | drm_sis_mem_t __user *argp = (void __user *)data; | 270 | drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data; |
271 | drm_sis_mem_t agp; | 271 | drm_sis_mem_t agp; |
272 | PMemBlock block; | 272 | PMemBlock block; |
273 | int retval = 0; | 273 | int retval = 0; |
@@ -367,7 +367,7 @@ int sis_final_context(struct drm_device *dev, int context) | |||
367 | 367 | ||
368 | if (i < MAX_CONTEXT) { | 368 | if (i < MAX_CONTEXT) { |
369 | set_t *set; | 369 | set_t *set; |
370 | unsigned int item; | 370 | ITEM_TYPE item; |
371 | int retval; | 371 | int retval; |
372 | 372 | ||
373 | DRM_DEBUG("find socket %d, context = %d\n", i, context); | 373 | DRM_DEBUG("find socket %d, context = %d\n", i, context); |
@@ -376,7 +376,7 @@ int sis_final_context(struct drm_device *dev, int context) | |||
376 | set = global_ppriv[i].sets[0]; | 376 | set = global_ppriv[i].sets[0]; |
377 | retval = setFirst(set, &item); | 377 | retval = setFirst(set, &item); |
378 | while (retval) { | 378 | while (retval) { |
379 | DRM_DEBUG("free video memory 0x%x\n", item); | 379 | DRM_DEBUG("free video memory 0x%lx\n", item); |
380 | #if defined(__linux__) && defined(CONFIG_FB_SIS) | 380 | #if defined(__linux__) && defined(CONFIG_FB_SIS) |
381 | sis_free(item); | 381 | sis_free(item); |
382 | #else | 382 | #else |
@@ -390,7 +390,7 @@ int sis_final_context(struct drm_device *dev, int context) | |||
390 | set = global_ppriv[i].sets[1]; | 390 | set = global_ppriv[i].sets[1]; |
391 | retval = setFirst(set, &item); | 391 | retval = setFirst(set, &item); |
392 | while (retval) { | 392 | while (retval) { |
393 | DRM_DEBUG("free agp memory 0x%x\n", item); | 393 | DRM_DEBUG("free agp memory 0x%lx\n", item); |
394 | mmFreeMem((PMemBlock) item); | 394 | mmFreeMem((PMemBlock) item); |
395 | retval = setNext(set, &item); | 395 | retval = setNext(set, &item); |
396 | } | 396 | } |
diff --git a/drivers/char/drm/tdfx_drv.h b/drivers/char/drm/tdfx_drv.h index 857be434379f..84204ec1b046 100644 --- a/drivers/char/drm/tdfx_drv.h +++ b/drivers/char/drm/tdfx_drv.h | |||
@@ -1,6 +1,7 @@ | |||
1 | /* tdfx.h -- 3dfx DRM template customization -*- linux-c -*- | 1 | /* tdfx.h -- 3dfx DRM template customization -*- linux-c -*- |
2 | * Created: Wed Feb 14 12:32:32 2001 by gareth@valinux.com | 2 | * Created: Wed Feb 14 12:32:32 2001 by gareth@valinux.com |
3 | * | 3 | */ |
4 | /* | ||
4 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. | 5 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. |
5 | * All Rights Reserved. | 6 | * All Rights Reserved. |
6 | * | 7 | * |