From owner-svn-ports-all@freebsd.org Thu Feb 16 14:34:08 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34A16CE1576; Thu, 16 Feb 2017 14:34:08 +0000 (UTC) (envelope-from rezny@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC40913AD; Thu, 16 Feb 2017 14:34:07 +0000 (UTC) (envelope-from rezny@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1GEY7TD061110; Thu, 16 Feb 2017 14:34:07 GMT (envelope-from rezny@FreeBSD.org) Received: (from rezny@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1GEY79M061108; Thu, 16 Feb 2017 14:34:07 GMT (envelope-from rezny@FreeBSD.org) Message-Id: <201702161434.v1GEY79M061108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rezny set sender to rezny@FreeBSD.org using -f From: Matthew Rezny Date: Thu, 16 Feb 2017 14:34:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r434214 - in head/x11-drivers/xf86-video-scfb: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2017 14:34:08 -0000 Author: rezny Date: Thu Feb 16 14:34:06 2017 New Revision: 434214 URL: https://svnweb.freebsd.org/changeset/ports/434214 Log: Add a check in the Probe function to verify we have a usable framebuffer before claiming the device. This allows fallback to vesa to work correctly. Assign this port to x11@ after discussion with ray@ on IRC. Approved by: swills (mentor) Differential Revision: https://reviews.freebsd.org/D9629 Modified: head/x11-drivers/xf86-video-scfb/Makefile head/x11-drivers/xf86-video-scfb/files/patch-src_scfb__driver.c Modified: head/x11-drivers/xf86-video-scfb/Makefile ============================================================================== --- head/x11-drivers/xf86-video-scfb/Makefile Thu Feb 16 14:29:02 2017 (r434213) +++ head/x11-drivers/xf86-video-scfb/Makefile Thu Feb 16 14:34:06 2017 (r434214) @@ -3,10 +3,10 @@ PORTNAME= xf86-video-scfb PORTVERSION= 0.0.4 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers -MAINTAINER= ray@FreeBSD.org +MAINTAINER= x11@FreeBSD.org COMMENT= X.Org syscons display driver USE_GITHUB= yes Modified: head/x11-drivers/xf86-video-scfb/files/patch-src_scfb__driver.c ============================================================================== --- head/x11-drivers/xf86-video-scfb/files/patch-src_scfb__driver.c Thu Feb 16 14:29:02 2017 (r434213) +++ head/x11-drivers/xf86-video-scfb/files/patch-src_scfb__driver.c Thu Feb 16 14:34:06 2017 (r434214) @@ -58,7 +58,25 @@ #endif return mapaddr; } -@@ -366,8 +367,8 @@ ScfbPreInit(ScrnInfoPtr pScrn, int flags +@@ -314,6 +315,7 @@ ScfbProbe(DriverPtr drv, int flags) + GDevPtr *devSections; + int numDevSections; + const char *dev; ++ struct fbtype fb; + Bool foundScreen = FALSE; + + TRACE("probe start"); +@@ -330,7 +332,8 @@ ScfbProbe(DriverPtr drv, int flags) + for (i = 0; i < numDevSections; i++) { + ScrnInfoPtr pScrn = NULL; + dev = xf86FindOptionValue(devSections[i]->options, "device"); +- if ((fd = xf86Info.consoleFd) >= 0) { ++ if ((fd = xf86Info.consoleFd) >= 0 && ++ ioctl(fd, FBIOGTYPE, &fb) != -1) { + entity = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE); + pScrn = xf86ConfigFbEntity(NULL,0,entity, + NULL,NULL,NULL,NULL); +@@ -366,8 +369,8 @@ ScfbPreInit(ScrnInfoPtr pScrn, int flags struct fbtype fb; int default_depth, wstype; const char *dev; @@ -69,7 +87,7 @@ Gamma zeros = {0.0, 0.0, 0.0}; DisplayModePtr mode; -@@ -633,9 +634,9 @@ ScfbShadowInit(ScreenPtr pScreen) +@@ -633,9 +636,9 @@ ScfbShadowInit(ScreenPtr pScreen) } static Bool @@ -81,7 +99,7 @@ ScfbPtr fPtr = SCFBPTR(pScrn); VisualPtr visual; int ret, flags, ncolors; -@@ -792,7 +793,7 @@ ScfbScreenInit(int scrnIndex, ScreenPtr +@@ -792,7 +795,7 @@ ScfbScreenInit(int scrnIndex, ScreenPtr "RENDER extension initialisation failed."); } if (fPtr->shadowFB && !ScfbShadowInit(pScreen)) { @@ -90,7 +108,7 @@ "shadow framebuffer initialization failed\n"); return FALSE; } -@@ -801,20 +802,19 @@ ScfbScreenInit(int scrnIndex, ScreenPtr +@@ -801,20 +804,19 @@ ScfbScreenInit(int scrnIndex, ScreenPtr if (!fPtr->rotate) ScfbDGAInit(pScrn, pScreen); else @@ -114,7 +132,7 @@ xf86SetBackingStore(pScreen); /* Software cursor. */ -@@ -858,9 +858,9 @@ ScfbScreenInit(int scrnIndex, ScreenPtr +@@ -858,9 +860,9 @@ ScfbScreenInit(int scrnIndex, ScreenPtr } static Bool @@ -126,7 +144,7 @@ PixmapPtr pPixmap; ScfbPtr fPtr = SCFBPTR(pScrn); -@@ -892,7 +892,7 @@ ScfbCloseScreen(int scrnIndex, ScreenPtr +@@ -892,7 +894,7 @@ ScfbCloseScreen(int scrnIndex, ScreenPtr /* Unwrap CloseScreen. */ pScreen->CloseScreen = fPtr->CloseScreen; TRACE_EXIT("ScfbCloseScreen"); @@ -135,7 +153,7 @@ } static void * -@@ -907,9 +907,9 @@ ScfbWindowLinear(ScreenPtr pScreen, CARD +@@ -907,9 +909,9 @@ ScfbWindowLinear(ScreenPtr pScreen, CARD } static void @@ -147,7 +165,7 @@ ScfbPtr fPtr = SCFBPTR(pScrn); int newX, newY; -@@ -941,13 +941,13 @@ ScfbPointerMoved(int index, int x, int y +@@ -941,13 +943,13 @@ ScfbPointerMoved(int index, int x, int y } /* Pass adjusted pointer coordinates to wrapped PointerMoved function. */ @@ -164,7 +182,7 @@ TRACE_ENTER("EnterVT"); pScrn->vtSema = TRUE; -@@ -956,20 +956,20 @@ ScfbEnterVT(int scrnIndex, int flags) +@@ -956,20 +958,20 @@ ScfbEnterVT(int scrnIndex, int flags) } static void @@ -189,7 +207,7 @@ #endif TRACE_ENTER("SwitchMode"); -@@ -978,10 +978,10 @@ ScfbSwitchMode(int scrnIndex, DisplayMod +@@ -978,10 +980,10 @@ ScfbSwitchMode(int scrnIndex, DisplayMod } static int @@ -202,7 +220,7 @@ #endif TRACE_ENTER("ValidMode"); -@@ -1067,7 +1067,6 @@ static Bool +@@ -1067,7 +1069,6 @@ static Bool ScfbDGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode) { DisplayModePtr pMode; @@ -210,7 +228,7 @@ int frameX0, frameY0; if (pDGAMode) { -@@ -1081,9 +1080,9 @@ ScfbDGASetMode(ScrnInfoPtr pScrn, DGAMod +@@ -1081,9 +1082,9 @@ ScfbDGASetMode(ScrnInfoPtr pScrn, DGAMod frameY0 = pScrn->frameY0; } @@ -222,7 +240,7 @@ return TRUE; } -@@ -1091,7 +1090,7 @@ ScfbDGASetMode(ScrnInfoPtr pScrn, DGAMod +@@ -1091,7 +1092,7 @@ ScfbDGASetMode(ScrnInfoPtr pScrn, DGAMod static void ScfbDGASetViewport(ScrnInfoPtr pScrn, int x, int y, int flags) {