Module Name:    xsrc
Committed By:   macallan
Date:           Tue Oct 24 15:43:45 UTC 2017

Modified Files:
        xsrc/external/mit/xf86-video-suntcx/dist/src: tcx_driver.c

Log Message:
deal with firmware that does not set the 'vram' property on the tcx's node


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
    xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c
diff -u xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.13 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.14
--- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.13	Tue Sep 27 19:11:51 2016
+++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c	Tue Oct 24 15:43:45 2017
@@ -359,7 +359,8 @@ TCXPreInit(ScrnInfoPtr pScrn, int flags)
 
     	/* see if we have more than 1MB vram */
 	pTcx->vramsize = 0x100000;
-	if ((b = sparcPromGetProperty(&psdp->node, "vram", &len)) != NULL) {
+	if (((b = sparcPromGetProperty(&psdp->node, "vram", &len)) != NULL)  &&
+	     (len == 4)) {
 	    memcpy(&v, b, 4);
 	    if ((v > 0) && (v < 3))
 	    	pTcx->vramsize = 0x100000 * v;

Reply via email to