VirtualBox

Changeset 35775 in vbox for trunk


Ignore:
Timestamp:
Jan 30, 2011 12:05:05 AM (14 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: add EDID

Location:
trunk/src/VBox/Additions/x11/vboxvideo
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/Makefile.kmk

    r35398 r35775  
    141141        $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0
    142142vboxvideo_drv_13_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
    143 vboxvideo_drv_13_SOURCES = $(vboxvideo_drv_SOURCES)
     143vboxvideo_drv_13_SOURCES = $(vboxvideo_drv_SOURCES) edid.c
    144144
    145145
     
    160160        $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0
    161161vboxvideo_drv_14_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
    162 vboxvideo_drv_14_SOURCES  = $(vboxvideo_drv_SOURCES)
     162vboxvideo_drv_14_SOURCES  = $(vboxvideo_drv_13_SOURCES)
    163163
    164164
     
    183183        $(VBOX_PATH_X11_ROOT)/xorg-server-1.5.3
    184184vboxvideo_drv_15_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
    185 vboxvideo_drv_15_SOURCES  = $(vboxvideo_drv_SOURCES)
     185vboxvideo_drv_15_SOURCES  = $(vboxvideo_drv_13_SOURCES)
    186186if1of ($(KBUILD_TARGET), linux solaris)
    187187 vboxvideo_drv_15_SOURCES += \
  • trunk/src/VBox/Additions/x11/vboxvideo/undefined_13

    r34914 r35775  
    187187xf86SetDesiredModes
    188188xf86SetDpi
     189xf86OutputSetEDID
    189190xf86SetGamma
    190191xf86SetModeDefaultName
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c

    r35398 r35775  
    10351035 * @param    pcBits  where to store the mode's BPP
    10361036 */
    1037 static unsigned vboxNextStandardMode(ScrnInfoPtr pScrn, unsigned cIndex,
    1038                                      uint32_t *pcx, uint32_t *pcy,
    1039                                      uint32_t *pcBits)
     1037unsigned vboxNextStandardMode(ScrnInfoPtr pScrn, unsigned cIndex,
     1038                              uint32_t *pcx, uint32_t *pcy,
     1039                              uint32_t *pcBits)
    10401040{
    10411041    XF86ASSERT(cIndex < vboxNumStdModes,
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r35616 r35775  
    404404}
    405405
    406 static void
     406static DisplayModePtr
    407407vbox_output_add_mode (VBOXPtr pVBox, DisplayModePtr *pModes,
    408408                      const char *pszName, int x, int y,
     
    438438    }
    439439    *pModes = xf86ModesAdd(*pModes, pMode);
     440    return pMode;
    440441}
    441442
     
    443444vbox_output_get_modes (xf86OutputPtr output)
    444445{
    445     unsigned i;
    446     DisplayModePtr pModes = NULL;
     446    unsigned i, cIndex = 0;
     447    DisplayModePtr pModes = NULL, pMode;
    447448    ScrnInfoPtr pScrn = output->scrn;
    448449    VBOXPtr pVBox = VBOXGetRec(pScrn);
     
    452453    iScreen = (uintptr_t)output->driver_private;
    453454    vboxGetPreferredMode(pScrn, iScreen, &x, &y, &bpp);
    454     vbox_output_add_mode(pVBox, &pModes, NULL, x, y, TRUE, FALSE);
     455    pMode = vbox_output_add_mode(pVBox, &pModes, NULL, x, y, TRUE, FALSE);
     456    VBOXEDIDSet(output, pMode);
     457    /* Add standard modes supported by the host */
     458    for ( ; ; )
     459    {
     460        cIndex = vboxNextStandardMode(pScrn, cIndex, &x, &y, NULL);
     461        if (cIndex == 0)
     462            break;
     463        vbox_output_add_mode(pVBox, &pModes, NULL, x, y, FALSE, FALSE);
     464    }
    455465
    456466    /* Also report any modes the user may have requested in the xorg.conf
     
    470480vboxAtomVBoxMode(void)
    471481{
    472     static Atom rc = 0;
    473     if (!rc)
    474         rc = MakeAtom("VBOX_MODE", sizeof("VBOX_MODE") - 1, TRUE);
    475     return rc;
     482    return MakeAtom("VBOX_MODE", sizeof("VBOX_MODE") - 1, TRUE);
     483}
     484
     485static Atom
     486vboxAtomEDID(void)
     487{
     488    return MakeAtom("EDID", sizeof("EDID") - 1, TRUE);
    476489}
    477490
     
    504517        return TRUE;
    505518    }
     519    if (property == vboxAtomEDID())
     520        return TRUE;
    506521    return FALSE;
    507522}
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h

    r35616 r35775  
    257257extern Bool vboxSaveVideoMode(ScrnInfoPtr pScrn, uint32_t cx, uint32_t cy, uint32_t cBits);
    258258extern Bool vboxRetrieveVideoMode(ScrnInfoPtr pScrn, uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits);
     259extern unsigned vboxNextStandardMode(ScrnInfoPtr pScrn, unsigned cIndex,
     260                                     uint32_t *pcx, uint32_t *pcy,
     261                                     uint32_t *pcBits);
    259262extern void vboxGetPreferredMode(ScrnInfoPtr pScrn, uint32_t iScreen,
    260263                                 uint32_t *pcx, uint32_t *pcy,
     
    270273extern void VBOXDRICloseScreen(ScreenPtr pScreen, VBOXPtr pVBox);
    271274
    272 /* Xinerama stuff */
    273 #define VBOXRAMA_MAJOR_VERSION 1
    274 #define VBOXRAMA_MINOR_VERSION 0
     275/* EDID generation */
     276extern Bool VBOXEDIDSet(struct _xf86Output *output, DisplayModePtr pmode);
    275277
    276278#endif /* _VBOXVIDEO_H_ */
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