[PATCH xf86-video-dummy 1/6] Remove pointless empty functions

Aaron Plattner aplattner at nvidia.com
Sat Jan 24 17:08:08 PST 2015


These functions might be useful in a real driver, but with no
hardware, they're pointless.  Get rid of them.

Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
---
 src/dummy_driver.c | 56 ------------------------------------------------------
 1 file changed, 56 deletions(-)

diff --git a/src/dummy_driver.c b/src/dummy_driver.c
index 6062c39d2a4d..e5ff4dae34f3 100644
--- a/src/dummy_driver.c
+++ b/src/dummy_driver.c
@@ -65,9 +65,6 @@ static ModeStatus DUMMYValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
 static Bool	DUMMYSaveScreen(ScreenPtr pScreen, int mode);
 
 /* Internally used functions */
-static Bool     dummyModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
-static void	dummySave(ScrnInfoPtr pScrn);
-static void	dummyRestore(ScrnInfoPtr pScrn, Bool restoreText);
 static Bool	dummyDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op,
 				pointer ptr);
 
@@ -463,10 +460,6 @@ DUMMYEnterVT(VT_FUNC_ARGS_DECL)
 {
     SCRN_INFO_PTR(arg);
     
-    /* Should we re-save the text mode on each VT enter? */
-    if(!dummyModeInit(pScrn, pScrn->currentMode))
-      return FALSE;
-
     DUMMYAdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
 
     return TRUE;
@@ -476,8 +469,6 @@ DUMMYEnterVT(VT_FUNC_ARGS_DECL)
 static void
 DUMMYLeaveVT(VT_FUNC_ARGS_DECL)
 {
-    SCRN_INFO_PTR(arg);
-    dummyRestore(pScrn, TRUE);
 }
 
 static void
@@ -536,13 +527,6 @@ DUMMYScreenInit(SCREEN_INIT_ARGS_DECL)
     if (!(dPtr->FBBase = malloc(pScrn->videoRam * 1024)))
 	return FALSE;
     
-    /*
-     * next we save the current state and setup the first mode
-     */
-    dummySave(pScrn);
-    
-    if (!dummyModeInit(pScrn,pScrn->currentMode))
-	return FALSE;
     DUMMYAdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
 
     /*
@@ -665,33 +649,12 @@ DUMMYScreenInit(SCREEN_INIT_ARGS_DECL)
 Bool
 DUMMYSwitchMode(SWITCH_MODE_ARGS_DECL)
 {
-    SCRN_INFO_PTR(arg);
-    return dummyModeInit(pScrn, mode);
 }
 
 /* Mandatory */
 void
 DUMMYAdjustFrame(ADJUST_FRAME_ARGS_DECL)
 {
-    SCRN_INFO_PTR(arg);
-    int Base; 
-
-    Base = (y * pScrn->displayWidth + x) >> 2;
-
-    /* Scale Base by the number of bytes per pixel. */
-    switch (pScrn->depth) {
-    case  8 :
-	break;
-    case 15 :
-    case 16 :
-	Base *= 2;
-	break;
-    case 24 :
-	Base *= 3;
-	break;
-    default :
-	break;
-    }
 }
 
 /* Mandatory */
@@ -702,7 +665,6 @@ DUMMYCloseScreen(CLOSE_SCREEN_ARGS_DECL)
     DUMMYPtr dPtr = DUMMYPTR(pScrn);
 
     if(pScrn->vtSema){
- 	dummyRestore(pScrn, TRUE);
 	free(dPtr->FBBase);
     }
 
@@ -744,24 +706,6 @@ DUMMYValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
     return(MODE_OK);
 }
 
-static void
-dummySave(ScrnInfoPtr pScrn)
-{
-}
-
-static void 
-dummyRestore(ScrnInfoPtr pScrn, Bool restoreText)
-{
-}
-    
-static Bool
-dummyModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
-{
-    dummyRestore(pScrn, FALSE);
-    
-    return(TRUE);
-}
-
 Atom VFB_PROP  = 0;
 #define  VFB_PROP_NAME  "VFB_IDENT"
 
-- 
2.2.2



More information about the xorg-devel mailing list