VirtualBox

Ignore:
Timestamp:
Dec 26, 2015 3:24:08 PM (9 years ago)
Author:
vboxsync
Message:

bugref:8087: Additions/x11: support non-root X server: add knowledge of disconnected virtual monitors to the KMS driver.

Location:
trunk/src/VBox/Additions/linux/drm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r59221 r59222  
    134134        uint16_t cX;
    135135        uint16_t cY;
     136        bool fDisconnected;
    136137    } modeHint;
    137138};
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r58129 r59222  
    456456
    457457static enum drm_connector_status
    458 vbox_connector_detect(struct drm_connector *connector, bool force)
    459 {
    460     return connector_status_connected;
     458vbox_connector_detect(struct drm_connector *pConnector, bool fForce)
     459{
     460    struct vbox_connector *pVBoxConnector = NULL;
     461
     462    (void) fForce;
     463    LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, pConnector));
     464    pVBoxConnector = to_vbox_connector(pConnector);
     465    return !pVBoxConnector->modeHint.fDisconnected;
    461466}
    462467
     
    494499    if (sscanf(psz, "%5dx%5d\n%c", &cX, &cY, &ch) != 2)
    495500        return -EINVAL;
    496     if (   cX < 64 || cX > VBE_DISPI_MAX_XRES
    497         || cY < 64 || cY > VBE_DISPI_MAX_YRES)
    498         return -EINVAL;
    499     pVBoxConnector->modeHint.cX = (uint16_t)cX;
    500     pVBoxConnector->modeHint.cY = (uint16_t)cY;
     501    if (cX == -1 && cY == -1)
     502    {
     503        pVBoxConnector->modeHint.fDisconnected = true;
     504        pVBoxConnector->modeHint.cX = 0;
     505        pVBoxConnector->modeHint.cY = 0;
     506    }
     507    else
     508    {
     509        if (   cX < 64 || cX > VBE_DISPI_MAX_XRES
     510            || cY < 64 || cY > VBE_DISPI_MAX_YRES)
     511            return -EINVAL;
     512        pVBoxConnector->modeHint.fDisconnected = false;
     513        pVBoxConnector->modeHint.cX = (uint16_t)cX;
     514        pVBoxConnector->modeHint.cY = (uint16_t)cY;
     515    }
    501516    drm_helper_hpd_irq_event(pVBoxConnector->base.dev);
    502517    if (pVBox->fbdev)
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