VirtualBox

Ignore:
Timestamp:
Jun 11, 2009 4:54:19 PM (16 years ago)
Author:
vboxsync
Message:

video hw accel: guest driver -> host framebuffer commands processing impl

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Miniport
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r19844 r20478  
    18951895            HGSMIQUERYCALLBACKS *pInfo = (HGSMIQUERYCALLBACKS *)RequestPacket->OutputBuffer;
    18961896
    1897             pInfo->hContext = pDevExt->pPrimary;
    1898             pInfo->pfnCompletionHandler = hgsmiHostCmdHandlerComplete;
     1897            pInfo->hContext = pDevExt;
     1898            pInfo->pfnCompletionHandler = hgsmiHostCmdComplete;
     1899            pInfo->pfnRequestCommandsHandler = hgsmiHostCmdRequest;
    18991900
    19001901            RequestPacket->StatusBlock->Information = sizeof(HGSMIQUERYCALLBACKS);
     
    19021903            break;
    19031904        }
    1904         case IOCTL_VIDEO_HGSMI_HANDLER_REGISTER:
    1905         {
    1906             dprintf(("VBoxVideo::VBoxVideoStartIO: IOCTL_VIDEO_HGSMI_HANDLER_REGISTER\n"));
    1907 
    1908             if (RequestPacket->InputBufferLength< sizeof(HGSMIHANDLERREGISTER))
     1905        case IOCTL_VIDEO_HGSMI_HANDLER_ENABLE:
     1906        {
     1907            dprintf(("VBoxVideo::VBoxVideoStartIO: IOCTL_VIDEO_HGSMI_HANDLER_ENABLE\n"));
     1908
     1909            if (RequestPacket->InputBufferLength< sizeof(HGSMIHANDLERENABLE))
    19091910            {
    19101911                dprintf(("VBoxVideo::VBoxVideoStartIO: Output buffer too small: %d needed: %d!!!\n",
    1911                          RequestPacket->InputBufferLength, sizeof(HGSMIHANDLERREGISTER)));
     1912                         RequestPacket->InputBufferLength, sizeof(HGSMIHANDLERENABLE)));
    19121913                RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
    19131914                return FALSE;
     
    19201921            }
    19211922
    1922             HGSMIHANDLERREGISTER *pInfo = (HGSMIHANDLERREGISTER *)RequestPacket->InputBuffer;
    1923 
    1924             int rc = vboxHGSMIChannelDisplayRegister (pDevExt->pPrimary,
    1925                     pDevExt->iDevice, /* negative would mean this is a miniport handler */
    1926                     pInfo->u8Channel,
    1927                     pInfo->pfnHandler,
    1928                     pInfo->pvHandler);
     1923            HGSMIHANDLERENABLE *pInfo = (HGSMIHANDLERENABLE *)RequestPacket->InputBuffer;
     1924
     1925            int rc = vboxVBVAChannelDisplayEnable(pDevExt->pPrimary,
     1926                    pDevExt->iDevice,
     1927                    pInfo->u8Channel);
    19291928            if(RT_FAILURE(rc))
    19301929            {
     
    19341933            break;
    19351934        }
    1936         case IOCTL_VIDEO_HGSMI_HANDLER_DEREGISTER:
     1935        case IOCTL_VIDEO_HGSMI_HANDLER_DISABLE:
    19371936        {
    19381937            /* TODO: implement */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r20374 r20478  
    258258                                uint32_t cbLength);
    259259
    260 DECLCALLBACK(void) hgsmiHostCmdHandlerComplete (HVBOXVIDEOHGSMI hHGSMI, void * pvMem);
    261 
    262 int vboxHGSMIChannelDisplayRegister (PDEVICE_EXTENSION PrimaryExtension,
     260DECLCALLBACK(void) hgsmiHostCmdComplete (HVBOXVIDEOHGSMI hHGSMI, struct _VBVAHOSTCMD * pCmd);
     261DECLCALLBACK(int) hgsmiHostCmdRequest (HVBOXVIDEOHGSMI hHGSMI, uint8_t u8Channel, struct _VBVAHOSTCMD ** ppCmd);
     262
     263
     264int vboxVBVAChannelDisplayEnable(PDEVICE_EXTENSION PrimaryExtension,
    263265        int iDisplay, /* negative would mean this is a miniport handler */
    264         uint8_t u8Channel,
    265         PFNHGSMICHANNELHANDLER pfnChannelHandler,
    266         void *pvChannelHandler);
     266        uint8_t u8Channel);
    267267#endif /* VBOX_WITH_HGSMI */
    268268} /* extern "C" */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/vboxioctl.h

    r19844 r20478  
    5353    CTL_CODE(FILE_DEVICE_VIDEO, 0x431, METHOD_BUFFERED, FILE_ANY_ACCESS)
    5454
    55 #define IOCTL_VIDEO_HGSMI_HANDLER_REGISTER \
     55#define IOCTL_VIDEO_HGSMI_HANDLER_ENABLE \
    5656    CTL_CODE(FILE_DEVICE_VIDEO, 0x432, METHOD_BUFFERED, FILE_ANY_ACCESS)
    5757
    58 #define IOCTL_VIDEO_HGSMI_HANDLER_DEREGISTER \
     58#define IOCTL_VIDEO_HGSMI_HANDLER_DISABLE \
    5959    CTL_CODE(FILE_DEVICE_VIDEO, 0x433, METHOD_BUFFERED, FILE_ANY_ACCESS)
    6060
     
    129129    HVBOXVIDEOHGSMI hContext;
    130130    PFNVBOXVIDEOHGSMICOMPLETION pfnCompletionHandler;
     131    PFNVBOXVIDEOHGSMICOMMANDS   pfnRequestCommandsHandler;
    131132} HGSMIQUERYCALLBACKS;
    132133
    133134/**
    134  * Data returned by IOCTL_VIDEO_HGSMI_HANDLER_REGISTER.
     135 * Data returned by IOCTL_VIDEO_HGSMI_HANDLER_ENABLE.
    135136 *
    136137 */
    137 typedef struct _HGSMIHANDLERREGISTER
     138typedef struct _HGSMIHANDLERENABLE
    138139{
    139     PFNHGSMICHANNELHANDLER pfnHandler;
    140     void * pvHandler;
    141140    uint8_t u8Channel;
    142 } HGSMIHANDLERREGISTER;
     141} HGSMIHANDLERENABLE;
    143142
    144143/**
    145  * Data passed by IOCTL_VIDEO_HGSMI_HANDLER_DEREGISTER.
     144 * Data passed by IOCTL_VIDEO_HGSMI_HANDLER_DISABLE.
    146145 *
    147146 */
    148 typedef struct _HGSMIHANDLERDEREGISTER
     147typedef struct _HGSMIHANDLERDISABLE
    149148{
    150     PFNHGSMICHANNELHANDLER pfnHandler;
    151149    uint8_t u8Channel;
    152 } HGSMIHANDLERDEREGISTER;
     150} HGSMIHANDLERDISABLE;
    153151
    154152#endif /* 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