Hello Both, 12.10.2017 22:53, Gianfranco Costamagna wrote: > Hello, > >> Attached is a fix, which I've already submitted for inclusion into the >> mainline kernel. I believe this fix should also be applied to the VirtualBox >> 5.2 Guest Additions version of the driver too, as the bug seems to originally > >> come from there and to be present there too. > > I'm already building an Ubuntu kernel, will test it tomorrow and report back! > > thanks a lot,
Hans was faster than me. Here is the same fix against our internal tree in case you are interested in sanity testing that. Regards Michael -- Michael Thayer | VirtualBox engineer ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt ORACLE Deutschland B.V. & Co. KG Hauptverwaltung: Riesstraße 25, D-80992 München Registergericht: Amtsgericht München, HRA 95603 Komplementärin: ORACLE Deutschland Verwaltung B.V. Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697 Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
Index: src/VBox/Additions/linux/drm/vbox_drv.h =================================================================== --- src/VBox/Additions/linux/drm/vbox_drv.h (revision 118326) +++ src/VBox/Additions/linux/drm/vbox_drv.h (working copy) @@ -178,8 +178,8 @@ char name[32]; struct vbox_crtc *vbox_crtc; struct { - u16 width; - u16 height; + u32 width; + u32 height; bool disconnected; } mode_hint; }; @@ -191,8 +191,8 @@ unsigned int crtc_id; u32 fb_offset; bool cursor_enabled; - u16 x_hint; - u16 y_hint; + u32 x_hint; + u32 y_hint; }; struct vbox_encoder { Index: src/VBox/Additions/linux/drm/vbox_irq.c =================================================================== --- src/VBox/Additions/linux/drm/vbox_irq.c (revision 118326) +++ src/VBox/Additions/linux/drm/vbox_irq.c (working copy) @@ -160,8 +160,8 @@ flags = VBVA_SCREEN_F_ACTIVE | (disconnected ? VBVA_SCREEN_F_DISABLED : VBVA_SCREEN_F_BLANK); - vbox_connector->mode_hint.width = hints->cx & 0x8fff; - vbox_connector->mode_hint.height = hints->cy & 0x8fff; + vbox_connector->mode_hint.width = hints->cx; + vbox_connector->mode_hint.height = hints->cy; vbox_connector->vbox_crtc->x_hint = hints->dx; vbox_connector->vbox_crtc->y_hint = hints->dy; vbox_connector->mode_hint.disconnected = disconnected; Index: src/VBox/Additions/linux/drm/vbox_mode.c =================================================================== --- src/VBox/Additions/linux/drm/vbox_mode.c (revision 118326) +++ src/VBox/Additions/linux/drm/vbox_mode.c (working copy) @@ -592,13 +592,23 @@ ++num_modes; } vbox_set_edid(connector, preferred_width, preferred_height); + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) || defined(RHEL_73) - drm_object_property_set_value( - &connector->base, vbox->dev->mode_config.suggested_x_property, - vbox_connector->vbox_crtc->x_hint); - drm_object_property_set_value( - &connector->base, vbox->dev->mode_config.suggested_y_property, - vbox_connector->vbox_crtc->y_hint); + if (vbox_connector->vbox_crtc->x_hint != -1) + drm_object_property_set_value(&connector->base, + vbox->dev->mode_config.suggested_x_property, + vbox_connector->vbox_crtc->x_hint); + else + drm_object_property_set_value(&connector->base, + vbox->dev->mode_config.suggested_x_property, 0); + + if (vbox_connector->vbox_crtc->y_hint != -1) + drm_object_property_set_value(&connector->base, + vbox->dev->mode_config.suggested_y_property, + vbox_connector->vbox_crtc->y_hint); + else + drm_object_property_set_value(&connector->base, + vbox->dev->mode_config.suggested_y_property, 0); #endif return num_modes; @@ -690,9 +700,9 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) || defined(RHEL_73) drm_mode_create_suggested_offset_properties(dev); drm_object_attach_property(&connector->base, - dev->mode_config.suggested_x_property, -1); + dev->mode_config.suggested_x_property, 0); drm_object_attach_property(&connector->base, - dev->mode_config.suggested_y_property, -1); + dev->mode_config.suggested_y_property, 0); #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && !defined(RHEL_73) drm_sysfs_connector_add(connector);
_______________________________________________ vbox-dev mailing list vbox-dev@virtualbox.org https://www.virtualbox.org/mailman/listinfo/vbox-dev