VirtualBox

Changeset 59936 in vbox for trunk


Ignore:
Timestamp:
Mar 5, 2016 5:00:20 PM (9 years ago)
Author:
vboxsync
Message:

bugref:8087: Additions/x11: support non-root X server: remove sysfs nodes which we were using to notify the driver from user space about a monitor hot-plug event. We can now get IRQ notification instead.

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

Legend:

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

    r59697 r59936  
    137137    char name[32];
    138138    unsigned crtc_id;
    139     /** Device attribute for sysfs file used for receiving mode hints from user
    140      * space. */
    141     struct device_attribute sysfs_node;
    142139    struct {
    143140        uint16_t width;
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r59914 r59936  
    447447    LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector));
    448448    vbox_connector = to_vbox_connector(connector);
    449     device_remove_file(connector->dev->dev, &vbox_connector->sysfs_node);
    450449#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
    451450    drm_sysfs_connector_remove(connector);
     
    499498};
    500499
    501 ssize_t vbox_connector_write_sysfs(struct device *dev,
    502                                    struct device_attribute *pAttr,
    503                                    const char *psz, size_t cch)
    504 {
    505     struct vbox_connector *vbox_connector;
    506     struct vbox_private *vbox;
    507 
    508     LogFunc(("vboxvideo: %d: dev=%p, pAttr=%p, psz=%s, cch=%llu\n", __LINE__,
    509              dev, pAttr, psz, (unsigned long long)cch));
    510     vbox_connector = container_of(pAttr, struct vbox_connector,
    511                                   sysfs_node);
    512     vbox = vbox_connector->base.dev->dev_private;
    513     drm_kms_helper_hotplug_event(vbox_connector->base.dev);
    514     if (vbox->fbdev)
    515         drm_fb_helper_hotplug_event(&vbox->fbdev->helper);
    516     return cch;
    517 }
    518 
    519500static int vbox_connector_init(struct drm_device *dev, unsigned cScreen,
    520501                               struct drm_encoder *encoder)
     
    533514    vbox_connector->crtc_id = cScreen;
    534515
    535     /*
    536      * Set up the sysfs file we use for getting video mode hints from user
    537      * space.
    538      */
    539     snprintf(vbox_connector->name, sizeof(vbox_connector->name),
    540              "vbox_screen_%u", cScreen);
    541     vbox_connector->sysfs_node.attr.name = vbox_connector->name;
    542     vbox_connector->sysfs_node.attr.mode = S_IWUSR;
    543     vbox_connector->sysfs_node.show      = NULL;
    544     vbox_connector->sysfs_node.store     = vbox_connector_write_sysfs;
    545     rc = device_create_file(dev->dev, &vbox_connector->sysfs_node);
    546     if (rc < 0)
    547     {
    548         kfree(vbox_connector);
    549         return rc;
    550     }
    551516    drm_connector_init(dev, connector, &vbox_connector_funcs,
    552517                       DRM_MODE_CONNECTOR_VGA);
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