Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 952d751a authored by Dave Airlie's avatar Dave Airlie Committed by Dave Airlie
Browse files

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: default avatarDave Airlie <airlied@linux.ie>
parent 443448d0
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
/* 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__
+2 −2
Original line number Diff line number Diff line
/* 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.
+4 −3
Original line number Diff line number Diff line
/* 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.
 *
@@ -35,7 +36,7 @@

#define SET_SIZE 5000

typedef unsigned int ITEM_TYPE;
typedef unsigned long ITEM_TYPE;

typedef struct {
	ITEM_TYPE val;
+9 −9
Original line number Diff line number Diff line
@@ -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));
@@ -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;
}
@@ -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;
}
@@ -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;
@@ -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;
@@ -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);
@@ -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
@@ -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);
		}
+2 −1
Original line number Diff line number Diff line
/* 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.
 *