On Mon, Dec 10, 2001 at 11:45:40PM +0100, Rene Rebe wrote:
> On Mon, 10 Dec 2001 23:00:05 +0100
> Thomas Winischhofer <[EMAIL PROTECTED]> wrote:
>
> > I read about some people actually using DRM/DRI on the SiS630. I
> > assume that these people are using DRM module from Xfree CVS (since
> > there's no such module in the kernel tree).
> >
> > Are you people using this on an LCD panel (as well)?
> >
> > Does this require including sisfb into the kernel? (Bad because this
> > oopes my machine)
>
> Oopses here, too.
>
> > Why is the DRM module for SiS chipset not included in the main kernel?
> > (And why is it not mentioned on DRI website?)
>
> It is included. Since 2.4.16 (or was it a 2.4.17-pre?)!
>
> > What's the status of this module? Does it actually work?
>
> Doesn't work for me. It fails not in a sis specific method - but in
> a normal framebuffer one (was it register_fb or s.th). I mailed some
> oopses to the kernel / fb people - but got no positive feedback ...
>
Attached is a patch that came in to the patches list for the drm
kernel modules.
It'd be nice if those who have SiS 300/530/630 chipsets could test this.
Alan.
--- drm.orig/sis.h Tue Jun 12 15:25:57 2001
+++ drm/sis.h Sun Nov 18 22:26:39 2001
@@ -47,4 +47,10 @@
#define DRIVER_AGP_BUFFERS_MAP( dev ) \
((drm_sis_private_t *)((dev)->dev_private))->buffers
+extern int sis_init_context(int context);
+extern int sis_final_context(int context);
+
+#define DRIVER_CTX_CTOR sis_init_context
+#define DRIVER_CTX_DTOR sis_final_context
+
#endif
--- drm.orig/drm_context.h Tue Jun 12 15:25:57 2001
+++ drm/drm_context.h Sun Nov 18 22:45:49 2001
@@ -27,6 +27,10 @@
* Authors:
* Rickard E. (Rik) Faith <[EMAIL PROTECTED]>
* Gareth Hughes <[EMAIL PROTECTED]>
+ * ChangeLog:
+ * 2001-11-16 Torsten Duwe <[EMAIL PROTECTED]>
+ * added context constructor/destructor hooks,
+ * needed by SiS driver's memory management.
*/
#define __NO_VERSION__
@@ -306,6 +310,10 @@
/* Should this return -EBUSY instead? */
return -ENOMEM;
}
+#ifdef DRIVER_CTX_CTOR
+ if ( ctx.handle != DRM_KERNEL_CONTEXT )
+ DRIVER_CTX_CTOR(ctx.handle); /* XXX: also pass dev ? */
+#endif
if ( copy_to_user( (drm_ctx_t *)arg, &ctx, sizeof(ctx) ) )
return -EFAULT;
@@ -380,6 +388,9 @@
priv->remove_auth_on_close = 1;
}
if ( ctx.handle != DRM_KERNEL_CONTEXT ) {
+#ifdef DRIVER_CTX_DTOR
+ DRIVER_CTX_DTOR(ctx.handle); /* XXX: also pass dev ? */
+#endif
DRM(ctxbitmap_free)( dev, ctx.handle );
}
--- drm.orig/sis_mm.c Tue Jun 12 15:25:57 2001
+++ drm/sis_mm.c Sun Nov 18 22:30:04 2001
@@ -72,7 +72,7 @@
}
/* fb management via fb device */
-#if 0
+#if 1
int sis_fb_alloc(struct inode *inode, struct file *filp, unsigned int cmd,
unsigned long arg)
{
@@ -90,7 +90,7 @@
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");
+ DRM_DEBUG("adding to allocation set fails\n");
sis_free(req.offset);
retval = -1;
}
@@ -185,7 +185,7 @@
agp.offset = block->ofs;
agp.free = (unsigned int)block;
if(!add_alloc_set(agp.context, AGP_TYPE, agp.free)){
- DRM_DEBUG("adding to allocation set fails");
+ DRM_DEBUG("adding to allocation set fails\n");
mmFreeMem((PMemBlock)agp.free);
retval = -1;
}
@@ -279,9 +279,7 @@
retval = setFirst(set, &item);
while(retval){
DRM_DEBUG("free video memory 0x%x\n", item);
-#if 0
sis_free(item);
-#endif
retval = setNext(set, &item);
}
setDestroy(set);
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert