From dd8f135e0223f6ee8b2ff2bb0369d7ce22bea417 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 28 May 2024 12:23:33 +0200 Subject: [PATCH] drop dead code --- saa/saa.c | 18 ------------------ src/vmware.c | 27 +-------------------------- vmwgfx/vmwgfx_drmi.c | 6 ------ vmwgfx/vmwgfx_output.c | 10 ---------- vmwgfx/vmwgfx_saa.c | 23 ----------------------- 5 files changed, 1 insertion(+), 83 deletions(-) diff --git a/saa/saa.c b/saa/saa.c index 640a600..723e565 100644 --- a/saa/saa.c +++ b/saa/saa.c @@ -687,21 +687,6 @@ saa_driver_init(ScreenPtr screen, struct saa_driver * saa_driver) saa_driver->saa_minor, SAA_VERSION_MAJOR, SAA_VERSION_MINOR); return FALSE; } -#if 0 - if (!saa_driver->prepare_solid) { - LogMessage(X_ERROR, - "SAA(%d): saa_driver_t::prepare_solid must be " - "non-NULL\n", screen->myNum); - return FALSE; - } - - if (!saa_driver->prepare_copy) { - LogMessage(X_ERROR, - "SAA(%d): saa_driver_t::prepare_copy must be " - "non-NULL\n", screen->myNum); - return FALSE; - } -#endif if (!dixRegisterPrivateKey(&saa_screen_index, PRIVATE_SCREEN, 0)) { LogMessage(X_ERROR, "Failed to register SAA screen private.\n"); return FALSE; @@ -770,8 +755,5 @@ saa_driver_init(ScreenPtr screen, struct saa_driver * saa_driver) Bool saa_resources_init(ScreenPtr screen) { -/* if (!saa_glyphs_init(screen)) - return FALSE; -*/ return TRUE; } diff --git a/src/vmware.c b/src/vmware.c index bfd067c..7ccbec2 100644 --- a/src/vmware.c +++ b/src/vmware.c @@ -497,12 +497,6 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags) } xf86PrintDepthBpp(pScrn); -#if 0 - if (pScrn->depth == 24 && pix24bpp == 0) { - pix24bpp = xf86GetBppFromDepth(pScrn, 24); - } -#endif - if (pScrn->depth > 8) { rgb zeros = { 0, 0, 0 }; @@ -520,17 +514,8 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags) pScrn->defaultVisual, pVMWARE->defaultVisual); return FALSE; } -#if 0 - bytesPerPixel = pScrn->bitsPerPixel / 8; -#endif - pScrn->progClock = TRUE; -#if 0 /* MGA does not do this */ - if (pScrn->visual != 0) { /* FIXME */ - /* print error message */ - return FALSE; - } -#endif + pScrn->progClock = TRUE; xf86CollectOptions(pScrn, NULL); if (!(options = VMWARECopyOptions())) @@ -593,16 +578,6 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags) return FALSE; } } -#if 0 - if ((i = xf86GetPciInfoForScreen(pScrn->scrnIndex, &pciList, NULL)) != 1) { - /* print error message */ - VMWAREFreeRec(pScrn); - if (i > 0) { - free(pciList); - } - return FALSE; - } -#endif clockRanges = XNFcallocarray(sizeof(ClockRange), 1); clockRanges->next = NULL; clockRanges->minClock = 1; diff --git a/vmwgfx/vmwgfx_drmi.c b/vmwgfx/vmwgfx_drmi.c index ec26129..487c65b 100644 --- a/vmwgfx/vmwgfx_drmi.c +++ b/vmwgfx/vmwgfx_drmi.c @@ -371,12 +371,6 @@ vmwgfx_dma(int host_x, int host_y, cb->w = (uint16_t) (clips->x2 - clips->x1); cb->h = (uint16_t) (clips->y2 - clips->y1); cb->d = 1; -#if 0 - LogMessage(X_INFO, "DMA! x: %u y: %u srcx: %u srcy: %u w: %u h: %u %s\n", - cb->x, cb->y, cb->srcx, cb->srcy, cb->w, cb->h, - to_surface ? "to" : "from"); -#endif - } memset(&arg, 0, sizeof(arg)); diff --git a/vmwgfx/vmwgfx_output.c b/vmwgfx/vmwgfx_output.c index 5d9828d..fba1037 100644 --- a/vmwgfx/vmwgfx_output.c +++ b/vmwgfx/vmwgfx_output.c @@ -342,16 +342,6 @@ output_get_modes(xf86OutputPtr output) static int output_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) { - // modesettingPtr ms = modesettingPTR(output->scrn); - // CustomizerPtr cust = ms->cust; - -#if 0 - if (cust && cust->winsys_check_fb_size && - !cust->winsys_check_fb_size(cust, pMode->HDisplay * - output->scrn->bitsPerPixel / 8, - pMode->VDisplay)) - return MODE_BAD; -#endif return MODE_OK; } diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c index 6799bfb..edcb62d 100644 --- a/vmwgfx/vmwgfx_saa.c +++ b/vmwgfx/vmwgfx_saa.c @@ -386,8 +386,6 @@ vmwgfx_upload_to_hw(struct saa_driver *driver, PixmapPtr pixmap, static void vmwgfx_release_from_cpu(struct saa_driver *driver, PixmapPtr pixmap, saa_access_t access) { - // LogMessage(X_INFO, "Release 0x%08lx access 0x%08x\n", - // (unsigned long) pixmap, (unsigned) access); } static void * @@ -423,10 +421,6 @@ vmwgfx_unmap(struct saa_driver *driver, PixmapPtr pixmap, saa_access_t access) if (vpix->gmr) return vmwgfx_dmabuf_unmap(vpix->gmr); - -// LogMessage(X_INFO, "Unmap 0x%08lx access 0x%08x\n", - // (unsigned long) pixmap, (unsigned) access); - ; } static Bool @@ -1312,23 +1306,6 @@ vmwgfx_dirty(struct saa_driver *driver, PixmapPtr pixmap, if (WSBMLISTEMPTY(&vpix->scanout_list)) return TRUE; -#if 0 - /* - * This code can be enabled to immediately upload scanout sw - * contents to the hw surface. Otherwise this is done - * just before we call the kms update function for the hw - * surface. - */ - if (vpix->scanout_hw) { - if (!hw && !vmwgfx_upload_to_hw(&vsaa->driver, pixmap, damage)) - return FALSE; - - REGION_SUBTRACT(&vsaa->pScreen, &spix->dirty_shadow, - &spix->dirty_shadow, damage); - hw = TRUE; - } -#endif - /* * Is the new scanout damage hw or sw? */