- Timestamp:
- Mar 5, 2016 5:00:20 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
r59697 r59936 137 137 char name[32]; 138 138 unsigned crtc_id; 139 /** Device attribute for sysfs file used for receiving mode hints from user140 * space. */141 struct device_attribute sysfs_node;142 139 struct { 143 140 uint16_t width; -
trunk/src/VBox/Additions/linux/drm/vbox_mode.c
r59914 r59936 447 447 LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector)); 448 448 vbox_connector = to_vbox_connector(connector); 449 device_remove_file(connector->dev->dev, &vbox_connector->sysfs_node);450 449 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) 451 450 drm_sysfs_connector_remove(connector); … … 499 498 }; 500 499 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 519 500 static int vbox_connector_init(struct drm_device *dev, unsigned cScreen, 520 501 struct drm_encoder *encoder) … … 533 514 vbox_connector->crtc_id = cScreen; 534 515 535 /*536 * Set up the sysfs file we use for getting video mode hints from user537 * 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 }551 516 drm_connector_init(dev, connector, &vbox_connector_funcs, 552 517 DRM_MODE_CONNECTOR_VGA);
Note:
See TracChangeset
for help on using the changeset viewer.