VirtualBox

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


Ignore:
Timestamp:
Nov 18, 2017 8:56:56 PM (7 years ago)
Author:
vboxsync
Message:

Additions/linux/drm: set up fbdev fix information correctly.
bugref:4567: Linux kernel driver maintenance

For historical reasons we were setting up the fbdev fix information
completely wrongly, and too late to boot. I discovered this when we started
having occasional oopses at boot, and hope that I fixed both problems in this
change.

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

Legend:

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

    r69083 r69748  
    253253void vbox_fbdev_fini(struct drm_device *dev);
    254254void vbox_fbdev_set_suspend(struct drm_device *dev, int state);
    255 void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr);
    256255
    257256struct vbox_bo {
  • trunk/src/VBox/Additions/linux/drm/vbox_fb.c

    r69143 r69748  
    315315        info->apertures->ranges[0].base = pci_resource_start(dev->pdev, 0);
    316316        info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0);
     317        info->fix.smem_start = 0;
     318        info->fix.smem_len = size;
    317319
    318320#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     
    452454        fb_set_suspend(vbox->fbdev->helper.fbdev, state);
    453455}
    454 
    455 void vbox_fbdev_set_base(struct vbox_private *vbox, unsigned long gpu_addr)
    456 {
    457         vbox->fbdev->helper.fbdev->fix.smem_start =
    458             vbox->fbdev->helper.fbdev->apertures->ranges[0].base + gpu_addr;
    459         vbox->fbdev->helper.fbdev->fix.smem_len =
    460             vbox->available_vram_size - gpu_addr;
    461 }
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r69525 r69748  
    275275
    276276        ret = vbox_bo_pin(bo, TTM_PL_FLAG_VRAM, &gpu_addr);
    277         if (ret) {
    278                 vbox_bo_unreserve(bo);
     277        vbox_bo_unreserve(bo);
     278        if (ret)
    279279                return ret;
    280         }
    281 
    282         if (&vbox->fbdev->afb == vbox_fb)
    283                 vbox_fbdev_set_base(vbox, gpu_addr);
    284         vbox_bo_unreserve(bo);
    285 
    286         /* vbox_set_start_address_crt1(crtc, (u32)gpu_addr); */
     280
    287281        vbox_crtc->fb_offset = gpu_addr;
    288282        if (vbox_set_up_input_mapping(vbox)) {
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