Skip to content

Commit

Permalink
drm: bring sis + tdfx up to latest CVS
Browse files Browse the repository at this point in the history
Cleanup SIS + TDFX drivers with latest changes from CVS.

From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Jan 2, 2006
1 parent 443448d commit 952d751
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 15 deletions.
25 changes: 25 additions & 0 deletions drivers/char/drm/sis_drm.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
/* sis_drv.h -- Private header for sis driver -*- linux-c -*- */
/*
* Copyright 2005 Eric Anholt
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/

#ifndef __SIS_DRM_H__
#define __SIS_DRM_H__
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/drm/sis_drv.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* sis_drv.h -- Private header for sis driver -*- linux-c -*-
*
/* sis_drv.h -- Private header for sis driver -*- linux-c -*- */
/*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
Expand Down
7 changes: 4 additions & 3 deletions drivers/char/drm/sis_ds.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* sis_ds.h -- Private header for Direct Rendering Manager -*- linux-c -*-
/* sis_ds.h -- Private header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by sclin@sis.com.tw
*
*/
/*
* Copyright 2000 Silicon Integrated Systems Corp, Inc., HsinChu, Taiwan.
* All rights reserved.
*
Expand Down Expand Up @@ -35,7 +36,7 @@

#define SET_SIZE 5000

typedef unsigned int ITEM_TYPE;
typedef unsigned long ITEM_TYPE;

typedef struct {
ITEM_TYPE val;
Expand Down
18 changes: 9 additions & 9 deletions drivers/char/drm/sis_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static int sis_fb_alloc(DRM_IOCTL_ARGS)
{
drm_sis_mem_t fb;
struct sis_memreq req;
drm_sis_mem_t __user *argp = (void __user *)data;
drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data;
int retval = 0;

DRM_COPY_FROM_USER_IOCTL(fb, argp, sizeof(fb));
Expand All @@ -110,7 +110,7 @@ static int sis_fb_alloc(DRM_IOCTL_ARGS)

DRM_COPY_TO_USER_IOCTL(argp, fb, sizeof(fb));

DRM_DEBUG("alloc fb, size = %d, offset = %d\n", fb.size, req.offset);
DRM_DEBUG("alloc fb, size = %d, offset = %ld\n", fb.size, req.offset);

return retval;
}
Expand All @@ -127,9 +127,9 @@ static int sis_fb_free(DRM_IOCTL_ARGS)

if (!del_alloc_set(fb.context, VIDEO_TYPE, fb.free))
retval = DRM_ERR(EINVAL);
sis_free((u32) fb.free);
sis_free(fb.free);

DRM_DEBUG("free fb, offset = %lu\n", fb.free);
DRM_DEBUG("free fb, offset = 0x%lx\n", fb.free);

return retval;
}
Expand Down Expand Up @@ -176,7 +176,7 @@ static int sis_fb_alloc(DRM_IOCTL_ARGS)
{
DRM_DEVICE;
drm_sis_private_t *dev_priv = dev->dev_private;
drm_sis_mem_t __user *argp = (void __user *)data;
drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data;
drm_sis_mem_t fb;
PMemBlock block;
int retval = 0;
Expand Down Expand Up @@ -267,7 +267,7 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS)
{
DRM_DEVICE;
drm_sis_private_t *dev_priv = dev->dev_private;
drm_sis_mem_t __user *argp = (void __user *)data;
drm_sis_mem_t __user *argp = (drm_sis_mem_t __user *)data;
drm_sis_mem_t agp;
PMemBlock block;
int retval = 0;
Expand Down Expand Up @@ -367,7 +367,7 @@ int sis_final_context(struct drm_device *dev, int context)

if (i < MAX_CONTEXT) {
set_t *set;
unsigned int item;
ITEM_TYPE item;
int retval;

DRM_DEBUG("find socket %d, context = %d\n", i, context);
Expand All @@ -376,7 +376,7 @@ int sis_final_context(struct drm_device *dev, int context)
set = global_ppriv[i].sets[0];
retval = setFirst(set, &item);
while (retval) {
DRM_DEBUG("free video memory 0x%x\n", item);
DRM_DEBUG("free video memory 0x%lx\n", item);
#if defined(__linux__) && defined(CONFIG_FB_SIS)
sis_free(item);
#else
Expand All @@ -390,7 +390,7 @@ int sis_final_context(struct drm_device *dev, int context)
set = global_ppriv[i].sets[1];
retval = setFirst(set, &item);
while (retval) {
DRM_DEBUG("free agp memory 0x%x\n", item);
DRM_DEBUG("free agp memory 0x%lx\n", item);
mmFreeMem((PMemBlock) item);
retval = setNext(set, &item);
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/char/drm/tdfx_drv.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* tdfx.h -- 3dfx DRM template customization -*- linux-c -*-
* Created: Wed Feb 14 12:32:32 2001 by gareth@valinux.com
*
*/
/*
* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
Expand Down

0 comments on commit 952d751

Please sign in to comment.