VirtualBox

Changeset 43486 in vbox


Ignore:
Timestamp:
Oct 1, 2012 11:50:44 AM (12 years ago)
Author:
vboxsync
Message:

vga/3d: allow passing command VRAM offset with CrHGSMI command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp

    r41974 r43486  
    238238    int rc = VINF_NOT_SUPPORTED;
    239239
     240    cbDmaCmd = pCmdDr->cbBuf;
     241
    240242    if (pCmdDr->fFlags & VBOXVDMACBUF_FLAG_BUF_FOLLOWS_DR)
    241243    {
     
    246248        }
    247249
    248         cbDmaCmd = pCmdDr->cbBuf;
    249250        if (cbDmaCmd < cbCmdDr - sizeof (*pCmdDr) - VBOXVDMACMD_HEADER_SIZE())
    250251        {
     
    254255
    255256        pDmaCmd = VBOXVDMACBUF_DR_TAIL(pCmdDr, VBOXVDMACMD);
     257    }
     258    else if (pCmdDr->fFlags & VBOXVDMACBUF_FLAG_BUF_VRAM_OFFSET)
     259    {
     260        VBOXVIDEOOFFSET offBuf = pCmdDr->Location.offVramBuf;
     261        if (offBuf + cbDmaCmd > pVdma->pVGAState->vram_size)
     262        {
     263            AssertMsgFailed(("invalid command buffer data from offset!"));
     264            return VERR_INVALID_PARAMETER;
     265        }
     266        pDmaCmd = (VBOXVDMACMD*)(pvRam + offBuf);
    256267    }
    257268
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