Changeset 59222 in vbox for trunk/src/VBox/Additions/linux/drm
- Timestamp:
- Dec 26, 2015 3:24:08 PM (9 years ago)
- 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 134 134 uint16_t cX; 135 135 uint16_t cY; 136 bool fDisconnected; 136 137 } modeHint; 137 138 }; -
trunk/src/VBox/Additions/linux/drm/vbox_mode.c
r58129 r59222 456 456 457 457 static enum drm_connector_status 458 vbox_connector_detect(struct drm_connector *connector, bool force) 459 { 460 return connector_status_connected; 458 vbox_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; 461 466 } 462 467 … … 494 499 if (sscanf(psz, "%5dx%5d\n%c", &cX, &cY, &ch) != 2) 495 500 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 } 501 516 drm_helper_hpd_irq_event(pVBoxConnector->base.dev); 502 517 if (pVBox->fbdev)
Note:
See TracChangeset
for help on using the changeset viewer.