VirtualBox

Changeset 59223 in vbox for trunk/src/VBox/Additions/linux


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

bugref:8087: Additions/x11: support non-root X server: remove old modes on a connector before we probe new ones, as the probe already detects everything we want to offer, and we do not want modes we no longer want kept around.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r59222 r59223  
    466466}
    467467
     468static int vbox_fill_modes(struct drm_connector *pConnector, uint32_t xMax, uint32_t yMax)
     469{
     470    struct vbox_connector *pVBoxConnector;
     471    struct drm_device *pDrmDev;
     472    struct drm_display_mode *pMode, *pIter;
     473
     474    LogFunc(("vboxvideo: %d: pConnector=%p, xMax=%lu, yMax = %lu\n", __LINE__,
     475             pConnector, (unsigned long)xMax, (unsigned long)yMax));
     476    pVBoxConnector = to_vbox_connector(pConnector);
     477    pDrmDev = pVBoxConnector->base.dev;
     478    list_for_each_entry_safe(pMode, pIter, &pConnector->modes, head)
     479    {
     480        list_del(&pMode->head);
     481        drm_mode_destroy(pDrmDev, pMode);
     482    }
     483    return drm_helper_probe_single_connector_modes(pConnector, xMax, yMax);
     484}
     485
    468486static const struct drm_connector_helper_funcs vbox_connector_helper_funcs =
    469487{
     
    477495    .dpms = drm_helper_connector_dpms,
    478496    .detect = vbox_connector_detect,
    479     .fill_modes = drm_helper_probe_single_connector_modes,
     497    .fill_modes = vbox_fill_modes,
    480498    .destroy = vbox_connector_destroy,
    481499};
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