VirtualBox

Changeset 67145 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 30, 2017 3:11:29 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115821
Message:

bugref:8524: Additions/linux: play nicely with distribution-installed Additions
Rename HGSMIBufferAlloc.cpp to HGSMIBuffers.cpp and move VBoxHGSMIBufferSubmit() there.

Location:
trunk/src/VBox/Additions
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/Makefile.kmk

    r67066 r67145  
    5656        xpdm/VBoxDisp.rc \
    5757        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp \
    58         $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBufferAlloc.cpp \
     58        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp \
    5959        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIHostCmd.cpp \
    6060        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp \
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/Makefile.kmk

    r67066 r67145  
    4949        common/VBoxMPVidModes.cpp \
    5050        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp \
    51         $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBufferAlloc.cpp \
     51        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp \
    5252        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIHostCmd.cpp \
    5353        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
     
    122122        common/VBoxMPHGSMI.cpp \
    123123        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp \
    124         $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBufferAlloc.cpp \
     124        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp \
    125125        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIHostCmd.cpp \
    126126        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp \
  • trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp

    r67066 r67145  
    2929#include <VBoxVideoVBE.h>
    3030#include <VBoxVideoIPRT.h>
    31 
    32 /**
    33  * Submit a command descriptor allocated by @a VBoxHGSMIBufferAlloc.
    34  *
    35  * @param  pCtx      the context containing the heap used
    36  * @param  pvBuffer  the pointer returned by @a VBoxHGSMIBufferAlloc
    37  */
    38 DECLHIDDEN(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,
    39                                       void *pvBuffer)
    40 {
    41     /* Initialize the buffer and get the offset for port IO. */
    42     HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer);
    43 
    44     Assert(offBuffer != HGSMIOFFSET_VOID);
    45     if (offBuffer != HGSMIOFFSET_VOID)
    46     {
    47         /* Submit the buffer to the host. */
    48         VBVO_PORT_WRITE_U32(pCtx->port, offBuffer);
    49         /* Make the compiler aware that the host has changed memory. */
    50         ASMCompilerBarrier();
    51         return VINF_SUCCESS;
    52     }
    53 
    54     return VERR_INVALID_PARAMETER;
    55 }
    56 
    5731
    5832/** Detect whether HGSMI is supported by the host. */
  • trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp

    r67144 r67145  
    9797#endif
    9898}
     99
     100/**
     101 * Submit a command descriptor allocated by @a VBoxHGSMIBufferAlloc.
     102 *
     103 * @param  pCtx      the context containing the heap used
     104 * @param  pvBuffer  the pointer returned by @a VBoxHGSMIBufferAlloc
     105 */
     106DECLHIDDEN(int) VBoxHGSMIBufferSubmit(PHGSMIGUESTCOMMANDCONTEXT pCtx,
     107                                      void *pvBuffer)
     108{
     109    /* Initialize the buffer and get the offset for port IO. */
     110    HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer);
     111
     112    Assert(offBuffer != HGSMIOFFSET_VOID);
     113    if (offBuffer != HGSMIOFFSET_VOID)
     114    {
     115        /* Submit the buffer to the host. */
     116        VBVO_PORT_WRITE_U32(pCtx->port, offBuffer);
     117        /* Make the compiler aware that the host has changed memory. */
     118        ASMCompilerBarrier();
     119        return VINF_SUCCESS;
     120    }
     121
     122    return VERR_INVALID_PARAMETER;
     123}
  • trunk/src/VBox/Additions/haiku/VBoxVideo/driver/Makefile.kmk

    r67066 r67145  
    7474        driver.cpp \
    7575        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp \
    76         $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBufferAlloc.cpp \
     76        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp \
    7777        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp \
    7878        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp \
  • trunk/src/VBox/Additions/linux/drm/files_vboxvideo_drv

    r67066 r67145  
    3737    ${PATH_ROOT}/include/VBox/Graphics/VBoxVideoVBE.h=>include/VBoxVideoVBE.h \
    3838    ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp=>HGSMIBase.c \
    39     ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/HGSMIBufferAlloc.cpp=>HGSMIBufferAlloc.c \
     39    ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp=>HGSMIBuffers.c \
    4040    ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp=>Modesetting.c \
    4141    ${PATH_ROOT}/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp=>VBVABase.c \
  • trunk/src/VBox/Additions/x11/vboxvideo/Makefile.kmk

    r67066 r67145  
    105105        vbva.c \
    106106        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp \
    107         $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBufferAlloc.cpp \
     107        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/HGSMIBuffers.cpp \
    108108        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp \
    109109        $(PATH_ROOT)/src/VBox/Additions/common/VBoxVideo/VBVABase.cpp \
Note: See TracChangeset for help on using the changeset viewer.

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