VirtualBox

Changeset 64192 in vbox


Ignore:
Timestamp:
Oct 10, 2016 7:06:55 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111180
Message:

bugref:8614: Additions/common/VBoxVideo: make the code more self-contained: break new dependency of VMMDev.h on VBoxVideo.h again, by including a couple of definitions in both places with slightly different names, and by having places which actually need VMMDev.h and video definitions include both.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VMMDev.h

    r64185 r64192  
    2727#define ___VBox_VMMDev_h
    2828
    29 #include <VBox/VBoxVideo.h>             /* For VBVA definitions. */
    3029#include <VBox/cdefs.h>
    3130#include <VBox/param.h>                 /* for the PCI IDs. */
     
    20572056}
    20582057
     2058/** @name VBVA ring defines.
     2059 *
     2060 * The VBVA ring buffer is suitable for transferring large (< 2GB) amount of
     2061 * data. For example big bitmaps which do not fit to the buffer.
     2062 *
     2063 * Guest starts writing to the buffer by initializing a record entry in the
     2064 * aRecords queue. VBVA_F_RECORD_PARTIAL indicates that the record is being
     2065 * written. As data is written to the ring buffer, the guest increases off32End
     2066 * for the record.
     2067 *
     2068 * The host reads the aRecords on flushes and processes all completed records.
     2069 * When host encounters situation when only a partial record presents and
     2070 * cbRecord & ~VBVA_F_RECORD_PARTIAL >= VBVA_RING_BUFFER_SIZE -
     2071 * VBVA_RING_BUFFER_THRESHOLD, the host fetched all record data and updates
     2072 * off32Head. After that on each flush the host continues fetching the data
     2073 * until the record is completed.
     2074 *
     2075 */
     2076#define VMMDEV_VBVA_RING_BUFFER_SIZE        (_4M - _1K)
     2077#define VMMDEV_VBVA_RING_BUFFER_THRESHOLD   (4 * _1K)
     2078
     2079#define VMMDEV_VBVA_MAX_RECORDS (64)
    20592080/** @} */
     2081
     2082/**
     2083 * VBVA record.
     2084 */
     2085typedef struct VMMDEVVBVARECORD
     2086{
     2087    /** The length of the record. Changed by guest. */
     2088    uint32_t cbRecord;
     2089} VMMDEVVBVARECORD;
     2090AssertCompileSize(VMMDEVVBVARECORD, 4);
    20602091
    20612092
     
    20762107
    20772108    /** The ring buffer for data. */
    2078     uint8_t  au8RingBuffer[VBVA_RING_BUFFER_SIZE];
     2109    uint8_t  au8RingBuffer[VMMDEV_VBVA_RING_BUFFER_SIZE];
    20792110
    20802111    /** The queue of record descriptions. */
    2081     VBVARECORD aRecords[VBVA_MAX_RECORDS];
     2112    VMMDEVVBVARECORD aRecords[VMMDEV_VBVA_MAX_RECORDS];
    20822113    uint32_t indexRecordFirst;
    20832114    uint32_t indexRecordFree;
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp

    r62521 r64192  
    6666    vmmdevInitRequest(&Req.header, VMMDevReq_VideoAccelEnable);
    6767    Req.u32Enable = fEnable;
    68     Req.cbRingBuffer = VBVA_RING_BUFFER_SIZE;
     68    Req.cbRingBuffer = VMMDEV_VBVA_RING_BUFFER_SIZE;
    6969    Req.fu32Status = 0;
    7070    return vbglR3GRPerform(&Req.header);
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r64115 r64192  
    8383/* Enable dev_vmm Log3 statements to get IRQ-related logging. */
    8484#define LOG_GROUP LOG_GROUP_DEV_VMM
     85#include <VBox/VBoxVideo.h>  /* For VBVA definitions. */
    8586#include <VBox/VMMDev.h>
    8687#include <VBox/vmm/mm.h>
     
    17951796    }
    17961797
    1797     if (pReq->cbRingBuffer != VBVA_RING_BUFFER_SIZE)
     1798    if (pReq->cbRingBuffer != VMMDEV_VBVA_RING_BUFFER_SIZE)
    17981799    {
    17991800        /* The guest driver seems compiled with different headers. */
    1800         LogRelMax(16,("VMMDevReq_VideoAccelEnable guest ring buffer size %#x, should be %#x!!\n", pReq->cbRingBuffer, VBVA_RING_BUFFER_SIZE));
     1801        LogRelMax(16,("VMMDevReq_VideoAccelEnable guest ring buffer size %#x, should be %#x!!\n", pReq->cbRingBuffer, VMMDEV_VBVA_RING_BUFFER_SIZE));
    18011802        return VERR_INVALID_PARAMETER;
    18021803    }
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