Dear James, thank you for your work of extending and actualizing the openchrome driver and the via drm kernel module. I'm currently testing the new openchrome driver (revision 1020) without any drm kernel module on my Samsung NC20 (VIA VX800 chipset). To be able to use it successfully, I am using the attached small patch which I want to share with you.
It contains following (small) modifications: 1. Remove "static" from VIAFreeRec() The function VIAFreeRec() is used in several C-Files, so it should not be "static". 2. Remove "Bool ret" from VIAEnterVT() The return value "ret" is never assigned, so depending on the old stack contents, the function VIAEnterVT() may return FALSE accidently. 3. Directly use VIALeaveVT() in VIACloseScreen() I get a NULL-pointer dereference in VIACloseScreen() without this change. Maybe the function pointer is already set to NULL when VIACloseScreen() is called? Unfortunately here I don't exactly know why the current code does not work... ;-( 4. Remove call to VIAUnmapMem() in VIACloseScreen() If this function would be called, a subsequent VIAScreenInit() crashes. This happens on KDE logout without having "TerminateServer" set in kdmrc. 5. Do not call via_dp_init() in ViaOutputsDetect() for VX800 Without this change, Xorg would hang on startup. I think at least modification 1, 2, and 4 are correct fixes, whereas modifications 3 and 5 may just be workarounds for deeper problems I didn't find. Hopefully this may help you to further improve the openchrome driver. Kind regards, Thomas
Index: src/via_panel.c
===================================================================
--- src/via_panel.c (Revision 1020)
+++ src/via_panel.c (Arbeitskopie)
@@ -107,7 +107,7 @@ VIAGetRec(ScrnInfoPtr pScrn)
} /* VIAGetRec */
-static void
+void
VIAFreeRec(ScrnInfoPtr pScrn)
{
VIAPtr pVia = VIAPTR(pScrn);
Index: src/via_driver.c
===================================================================
--- src/via_driver.c (Revision 1020)
+++ src/via_driver.c (Arbeitskopie)
@@ -328,7 +328,6 @@ VIAEnterVT(int scrnIndex, int flags)
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
VIAPtr pVia = VIAPTR(pScrn);
- Bool ret;
int i;
DEBUG(xf86DrvMsg(scrnIndex, X_INFO, "VIAEnterVT\n"));
@@ -386,7 +385,7 @@ VIAEnterVT(int scrnIndex, int flags)
DRIUnlock(screenInfo.screens[scrnIndex]);
#endif
}
- return ret;
+ return TRUE;
}
static void
@@ -1618,10 +1617,8 @@ VIACloseScreen(int scrnIndex, ScreenPtr pScreen)
/* Is the display currently visible? */
if (pScrn->vtSema)
- pScrn->LeaveVT(scrnIndex, 0);
+ VIALeaveVT(scrnIndex, 0);
- VIAUnmapMem(pScrn);
-
xf86_cursors_fini(pScreen);
#ifdef XF86DRI
Index: src/via_outputs.c
===================================================================
--- src/via_outputs.c (Revision 1020)
+++ src/via_outputs.c (Arbeitskopie)
@@ -726,7 +726,6 @@ ViaOutputsDetect(ScrnInfoPtr pScrn)
switch (pVia->Chipset) {
case VIA_CX700:
- case VIA_VX800:
case VIA_VX855:
case VIA_VX900:
via_dp_init(pScrn);
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Openchrome-devel mailing list [email protected] http://wiki.openchrome.org/mailman/listinfo/openchrome-devel
