VirtualBox

Changeset 35305 in vbox


Ignore:
Timestamp:
Dec 22, 2010 4:37:14 PM (14 years ago)
Author:
vboxsync
Message:

Main/Display: removed obsolete code.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r35303 r35305  
    357357VBOX_WITH_VDMA = 1
    358358VBOX_WITH_CRHGSMI = 1
    359 # Enable VBVA lock
    360 VBOX_WITH_OLD_VBVA_LOCK = 1
    361359# Disable the Intel PXE ROM (uses Etherboot).
    362360VBOX_WITH_INTEL_PXE =
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r35304 r35305  
    116116    mLastHeight = 0;
    117117
    118 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    119118    int rc = RTCritSectInit(&mVBVALock);
    120119    AssertRC(rc);
    121120    mfu32PendingVideoAccelDisable = false;
    122 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    123121
    124122#ifdef VBOX_WITH_HGSMI
     
    133131    uninit();
    134132
    135 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    136133    if (RTCritSectIsInitialized (&mVBVALock))
    137134    {
     
    139136        memset (&mVBVALock, 0, sizeof (mVBVALock));
    140137    }
    141 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    142138}
    143139
     
    232228
    233229        /* SSM code is executed on EMT(0), therefore no need to use VMR3ReqCallWait. */
    234 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    235230        int rc = Display::displayTakeScreenshotEMT(that, VBOX_VIDEO_PRIMARY_SCREEN, &pu8Data, &cbData, &cx, &cy);
    236 #else
    237         int rc = that->mpDrv->pUpPort->pfnTakeScreenshot (that->mpDrv->pUpPort, &pu8Data, &cbData, &cx, &cy);
    238 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    239231
    240232        /*
     
    892884void Display::handleDisplayUpdate (unsigned uScreenId, int x, int y, int w, int h)
    893885{
    894 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    895886    /*
    896887     * Always runs under either VBVA lock or, for HGSMI, DevVGA lock.
    897888     * Safe to use VBVA vars and take the framebuffer lock.
    898889     */
    899 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    900890
    901891#ifdef DEBUG_sunlover
     
    12991289}
    13001290
    1301 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    13021291int Display::vbvaLock(void)
    13031292{
     
    13091298    RTCritSectLeave(&mVBVALock);
    13101299}
    1311 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    13121300
    13131301/**
    13141302 * @thread EMT
    13151303 */
    1316 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    13171304int Display::VideoAccelEnable (bool fEnable, VBVAMEMORY *pVbvaMemory)
    13181305{
     
    13231310    return rc;
    13241311}
    1325 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    1326 
    1327 #ifdef VBOX_WITH_OLD_VBVA_LOCK
     1312
    13281313int Display::videoAccelEnable (bool fEnable, VBVAMEMORY *pVbvaMemory)
    1329 #else
    1330 int Display::VideoAccelEnable (bool fEnable, VBVAMEMORY *pVbvaMemory)
    1331 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    13321314{
    13331315    int rc = VINF_SUCCESS;
     
    13781360    {
    13791361        /* Process any pending orders and empty the VBVA ring buffer. */
    1380 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    13811362        videoAccelFlush ();
    1382 #else
    1383         VideoAccelFlush ();
    1384 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    13851363    }
    13861364
     
    14231401        mpVbvaMemory->indexRecordFree = 0;
    14241402
    1425 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    14261403        mfu32PendingVideoAccelDisable = false;
    1427 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    14281404
    14291405        LogRel(("VBVA: Enabled.\n"));
     
    14451421    LogFlowFunc(("fEnable = %d\n", fEnable));
    14461422
    1447 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    14481423    vbvaLock();
    1449 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    14501424
    14511425    int c = fEnable?
     
    14991473        Assert (mfVideoAccelVRDP == true);
    15001474    }
    1501 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    15021475    vbvaUnlock();
    1503 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    15041476}
    15051477
     
    17751747 * @thread EMT
    17761748 */
    1777 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    17781749void Display::VideoAccelFlush (void)
    17791750{
     
    17821753    vbvaUnlock();
    17831754}
    1784 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    1785 
    1786 #ifdef VBOX_WITH_OLD_VBVA_LOCK
     1755
    17871756/* Under VBVA lock. DevVGA is not taken. */
    17881757void Display::videoAccelFlush (void)
    1789 #else
    1790 void Display::VideoAccelFlush (void)
    1791 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    17921758{
    17931759#ifdef DEBUG_sunlover_2
     
    18171783    /* Process the ring buffer */
    18181784    unsigned uScreenId;
    1819 #ifndef VBOX_WITH_OLD_VBVA_LOCK
    1820     for (uScreenId = 0; uScreenId < mcMonitors; uScreenId++)
    1821     {
    1822         if (!maFramebuffers[uScreenId].pFramebuffer.isNull())
    1823         {
    1824             maFramebuffers[uScreenId].pFramebuffer->Lock ();
    1825         }
    1826     }
    1827 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    18281785
    18291786    /* Initialize dirty rectangles accumulator. */
     
    18431800
    18441801            /* Disable VBVA on those processing errors. */
    1845 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    18461802            videoAccelEnable (false, NULL);
    1847 #else
    1848             VideoAccelEnable (false, NULL);
    1849 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    18501803
    18511804            break;
     
    19101863    for (uScreenId = 0; uScreenId < mcMonitors; uScreenId++)
    19111864    {
    1912 #ifndef VBOX_WITH_OLD_VBVA_LOCK
    1913         if (!maFramebuffers[uScreenId].pFramebuffer.isNull())
    1914         {
    1915             maFramebuffers[uScreenId].pFramebuffer->Unlock ();
    1916         }
    1917 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    1918 
    19191865        if (maFramebuffers[uScreenId].u32ResizeStatus == ResizeStatus_Void)
    19201866        {
     
    19251871}
    19261872
    1927 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    19281873int Display::videoAccelRefreshProcess(void)
    19291874{
     
    19771922    return rc;
    19781923}
    1979 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    19801924
    19811925
     
    21942138}
    21952139
    2196 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    21972140int Display::displayTakeScreenshotEMT(Display *pDisplay, ULONG aScreenId, uint8_t **ppu8Data, size_t *pcbData, uint32_t *pu32Width, uint32_t *pu32Height)
    21982141{
     
    22762219    return rc;
    22772220}
    2278 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    2279 
    2280 #ifdef VBOX_WITH_OLD_VBVA_LOCK
     2221
    22812222static int displayTakeScreenshot(PVM pVM, Display *pDisplay, struct DRVMAINDISPLAY *pDrv, ULONG aScreenId, BYTE *address, ULONG width, ULONG height)
    2282 #else
    2283 static int displayTakeScreenshot(PVM pVM, struct DRVMAINDISPLAY *pDrv, BYTE *address, ULONG width, ULONG height)
    2284 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    22852223{
    22862224    uint8_t *pu8Data = NULL;
     
    22902228    int vrc = VINF_SUCCESS;
    22912229
    2292 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    22932230    int cRetries = 5;
    22942231
     
    23042241        RTThreadSleep(10);
    23052242    }
    2306 #else
    2307     /* @todo pfnTakeScreenshot is probably callable from any thread, because it uses the VGA device lock. */
    2308     vrc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)pDrv->pUpPort->pfnTakeScreenshot, 5,
    2309                               pDrv->pUpPort, &pu8Data, &cbData, &cx, &cy);
    2310 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    23112243
    23122244    if (RT_SUCCESS(vrc) && pu8Data)
     
    23812313    alock.leave();
    23822314
    2383 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    23842315    int vrc = displayTakeScreenshot(pVM, this, mpDrv, aScreenId, address, width, height);
    2385 #else
    2386     int vrc = displayTakeScreenshot(pVM, mpDrv, address, width, height);
    2387 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    23882316
    23892317    if (vrc == VERR_NOT_IMPLEMENTED)
     
    24402368        return E_OUTOFMEMORY;
    24412369
    2442 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    24432370    int vrc = displayTakeScreenshot(pVM, this, mpDrv, aScreenId, pu8Data, width, height);
    2444 #else
    2445     int vrc = displayTakeScreenshot(pVM, mpDrv, pu8Data, width, height);
    2446 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    24472371
    24482372    if (RT_SUCCESS(vrc))
     
    25172441        return E_OUTOFMEMORY;
    25182442
    2519 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    25202443    int vrc = displayTakeScreenshot(pVM, this, mpDrv, aScreenId, pu8Data, width, height);
    2521 #else
    2522     int vrc = displayTakeScreenshot(pVM, mpDrv, pu8Data, width, height);
    2523 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    25242444
    25252445    if (RT_SUCCESS(vrc))
     
    25532473
    25542474
    2555 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    25562475int Display::drawToScreenEMT(Display *pDisplay, ULONG aScreenId, BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height)
    25572476{
     
    26472566    return rc;
    26482567}
    2649 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    26502568
    26512569STDMETHODIMP Display::DrawToScreen (ULONG aScreenId, BYTE *address, ULONG x, ULONG y,
     
    26802598     * dirty conversion work.
    26812599     */
    2682 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    26832600    int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)Display::drawToScreenEMT, 7,
    26842601                                 this, aScreenId, address, x, y, width, height);
    2685 #else
    2686     int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)mpDrv->pUpPort->pfnDisplayBlt, 6,
    2687                                  mpDrv->pUpPort, address, x, y, width, height);
    2688 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    26892602
    26902603    /*
     
    27132626}
    27142627
    2715 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    27162628void Display::InvalidateAndUpdateEMT(Display *pDisplay)
    27172629{
     
    27782690    pDisplay->vbvaUnlock();
    27792691}
    2780 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    27812692
    27822693/**
     
    28082719
    28092720    /* pdm.h says that this has to be called from the EMT thread */
    2810 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    28112721    int rcVBox = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY, (PFNRT)Display::InvalidateAndUpdateEMT,
    28122722                                     1, this);
    2813 #else
    2814     int rcVBox = VMR3ReqCallVoidWait(pVM, VMCPUID_ANY,
    2815                                      (PFNRT)mpDrv->pUpPort->pfnUpdateDisplayAll, 1, mpDrv->pUpPort);
    2816 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    28172723    alock.enter ();
    28182724
     
    31113017                /* Repaint the display because VM continued to run during the framebuffer resize. */
    31123018                if (!pFBInfo->pFramebuffer.isNull())
    3113 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    31143019                {
    31153020                    pDisplay->vbvaLock();
    3116 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    31173021                    pDrv->pUpPort->pfnUpdateDisplayAll(pDrv->pUpPort);
    3118 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    31193022                    pDisplay->vbvaUnlock();
    31203023                }
    3121 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    31223024            }
    31233025        }
     
    31333035    if (!fNoUpdate)
    31343036    {
    3135 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    31363037        int rc = pDisplay->videoAccelRefreshProcess();
    31373038
     
    31683069            }
    31693070        }
    3170 #else
    3171         if (pDisplay->mfPendingVideoAccelEnable)
    3172         {
    3173             /* Acceleration was enabled while machine was not yet running
    3174              * due to restoring from saved state. Update entire display and
    3175              * actually enable acceleration.
    3176              */
    3177             Assert(pDisplay->mpPendingVbvaMemory);
    3178 
    3179             /* Acceleration can not be yet enabled.*/
    3180             Assert(pDisplay->mpVbvaMemory == NULL);
    3181             Assert(!pDisplay->mfVideoAccelEnabled);
    3182 
    3183             if (pDisplay->mfMachineRunning)
    3184             {
    3185                 pDisplay->VideoAccelEnable (pDisplay->mfPendingVideoAccelEnable,
    3186                                             pDisplay->mpPendingVbvaMemory);
    3187 
    3188                 /* Reset the pending state. */
    3189                 pDisplay->mfPendingVideoAccelEnable = false;
    3190                 pDisplay->mpPendingVbvaMemory = NULL;
    3191             }
    3192         }
    3193         else
    3194         {
    3195             Assert(pDisplay->mpPendingVbvaMemory == NULL);
    3196 
    3197             if (pDisplay->mfVideoAccelEnabled)
    3198             {
    3199                 Assert(pDisplay->mpVbvaMemory);
    3200                 pDisplay->VideoAccelFlush ();
    3201             }
    3202             else
    3203             {
    3204                 DISPLAYFBINFO *pFBInfo = &pDisplay->maFramebuffers[VBOX_VIDEO_PRIMARY_SCREEN];
    3205                 if (!pFBInfo->pFramebuffer.isNull())
    3206                 {
    3207                     Assert(pDrv->IConnector.pu8Data);
    3208                     Assert(pFBInfo->u32ResizeStatus == ResizeStatus_Void);
    3209                     pDrv->pUpPort->pfnUpdateDisplay(pDrv->pUpPort);
    3210                 }
    3211             }
    3212 
    3213             /* Inform the VRDP server that the current display update sequence is
    3214              * completed. At this moment the framebuffer memory contains a definite
    3215              * image, that is synchronized with the orders already sent to VRDP client.
    3216              * The server can now process redraw requests from clients or initial
    3217              * fullscreen updates for new clients.
    3218              */
    3219             for (uScreenId = 0; uScreenId < pDisplay->mcMonitors; uScreenId++)
    3220             {
    3221                 DISPLAYFBINFO *pFBInfo = &pDisplay->maFramebuffers[uScreenId];
    3222 
    3223                 if (!pFBInfo->pFramebuffer.isNull() && pFBInfo->u32ResizeStatus == ResizeStatus_Void)
    3224                 {
    3225                     Assert (pDisplay->mParent && pDisplay->mParent->consoleVRDPServer());
    3226                     pDisplay->mParent->consoleVRDPServer()->SendUpdate (uScreenId, NULL, 0);
    3227                 }
    3228             }
    3229         }
    3230 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    32313071    }
    32323072
     
    32683108
    32693109    /* Disable VBVA mode in any case. The guest driver reenables VBVA mode if necessary. */
    3270 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    3271     /* This is called under DevVGA lock. Postpone disabling VBVA, do it in the refresh timer. */
     3110    /* The LFBModeChange function is called under DevVGA lock. Postpone disabling VBVA, do it in the refresh timer. */
    32723111    ASMAtomicWriteU32(&pDrv->pDisplay->mfu32PendingVideoAccelDisable, true);
    3273 #else
    3274     pDrv->pDisplay->VideoAccelEnable (false, NULL);
    3275 #endif /* !VBOX_WITH_OLD_VBVA_LOCK */
    32763112}
    32773113
  • trunk/src/VBox/Main/Makefile.kmk

    r35304 r35305  
    582582        $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \
    583583        $(if $(VBOX_WITH_VUSB),VBOX_WITH_VUSB,) \
    584         $(if $(VBOX_WITH_OLD_VBVA_LOCK),VBOX_WITH_OLD_VBVA_LOCK,) \
    585584        $(if $(VBOX_WITH_HGSMI),VBOX_WITH_HGSMI,) \
    586585        $(if $(VBOX_WITH_VIDEOHWACCEL),VBOX_WITH_VIDEOHWACCEL,) \
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r35304 r35305  
    272272    void handleResizeCompletedEMT (void);
    273273
    274 #ifdef VBOX_WITH_OLD_VBVA_LOCK
    275274    RTCRITSECT mVBVALock;
    276275    volatile uint32_t mfu32PendingVideoAccelDisable;
     
    291290    int videoAccelEnable (bool fEnable, VBVAMEMORY *pVbvaMemory);
    292291    void videoAccelFlush (void);
    293 #endif /* VBOX_WITH_OLD_VBVA_LOCK */
    294292
    295293#ifdef VBOX_WITH_HGSMI
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette