summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-11-18 16:02:48 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-11-18 16:02:48 +0000
commit6e4b2da84f235d686234ccec866b7862309769a3 (patch)
tree3215a1df364874de6690f2608ac25c320fd9a324
parentb92394f72367ddb7fb48535365c302481e62a499 (diff)
Remove a bunch of #ifdef __linux__ code that only serves to confuse me.
-rw-r--r--sys/dev/pci/drm/sis_mm.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/sys/dev/pci/drm/sis_mm.c b/sys/dev/pci/drm/sis_mm.c
index f014805f786..5f4412cb34c 100644
--- a/sys/dev/pci/drm/sis_mm.c
+++ b/sys/dev/pci/drm/sis_mm.c
@@ -28,13 +28,6 @@
*
*/
-#if defined(__linux__) && defined(CONFIG_FB_SIS)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-#include <video/sisfb.h>
-#else
-#include <linux/sisfb.h>
-#endif
-#endif
#include "drmP.h"
#include "sis_drm.h"
#include "sis_drv.h"
@@ -79,59 +72,6 @@ static int del_alloc_set(int context, int type, unsigned int val)
}
/* fb management via fb device */
-#if defined(__linux__) && defined(CONFIG_FB_SIS)
-
-int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file_priv)
-{
- return 0;
-}
-
-int sis_fb_alloc(struct drm_device *dev, void *data, struct drm_file *file_priv)
-{
- drm_sis_mem_t *fb = data;
- struct sis_memreq req;
- int retval = 0;
-
- req.size = fb->size;
- sis_malloc(&req);
- if (req.offset) {
- /* TODO */
- fb->offset = req.offset;
- fb->free = req.offset;
- if (!add_alloc_set(fb->context, VIDEO_TYPE, fb->free)) {
- DRM_DEBUG("adding to allocation set fails\n");
- sis_free(req.offset);
- retval = EINVAL;
- }
- } else {
- fb->offset = 0;
- fb->size = 0;
- fb->free = 0;
- }
-
- DRM_DEBUG("alloc fb, size = %d, offset = %ld\n", fb->size, req.offset);
-
- return retval;
-}
-
-int sis_fb_free(struct drm_device *dev, void *data, struct drm_file *file_priv)
-{
- drm_sis_mem_t fb;
- int retval = 0;
-
- if (!fb->free)
- return EINVAL;
-
- if (!del_alloc_set(fb->context, VIDEO_TYPE, fb->free))
- retval = EINVAL;
- sis_free(fb->free);
-
- DRM_DEBUG("free fb, offset = 0x%lx\n", fb->free);
-
- return retval;
-}
-
-#else
/* Called by the X Server to initialize the FB heap. Allocations will fail
* unless this is called. Offset is the beginning of the heap from the
@@ -217,8 +157,6 @@ int sis_fb_free(struct drm_device *dev, void *data, struct drm_file *file_priv)
return 0;
}
-#endif
-
/* agp memory management */
int sis_ioctl_agp_init(struct drm_device *dev, void *data, struct drm_file *file_priv)
@@ -349,11 +287,7 @@ int sis_final_context(struct drm_device *dev, int context)
retval = setFirst(set, &item);
while (retval) {
DRM_DEBUG("free video memory 0x%lx\n", item);
-#if defined(__linux__) && defined(CONFIG_FB_SIS)
- sis_free(item);
-#else
mmFreeMem((PMemBlock) item);
-#endif
retval = setNext(set, &item);
}
setDestroy(set);