Changeset 59947 in vbox for trunk/src/VBox/Additions/linux/drm
- Timestamp:
- Mar 7, 2016 6:59:38 PM (9 years ago)
- Location:
- trunk/src/VBox/Additions/linux/drm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/drm/vbox_drv.h
r59936 r59947 117 117 } ttm; 118 118 119 s pinlock_t dev_lock;119 struct mutex hw_mutex; 120 120 bool isr_installed; 121 121 struct work_struct hotplug_work; … … 171 171 struct ttm_bo_kmap_obj mapping; 172 172 int x1, y1, x2, y2; /* dirty rect */ 173 spinlock_t dirty_lock; 173 174 }; 174 175 -
trunk/src/VBox/Additions/linux/drm/vbox_fb.c
r59697 r59947 131 131 x2 = x + width - 1; 132 132 y2 = y + height - 1; 133 spin_lock_irqsave(& vbox->dev_lock, flags);133 spin_lock_irqsave(&fbdev->dirty_lock, flags); 134 134 135 135 if (fbdev->y1 < y) … … 147 147 fbdev->y1 = y; 148 148 fbdev->y2 = y2; 149 spin_unlock_irqrestore(& vbox->dev_lock, flags);149 spin_unlock_irqrestore(&fbdev->dirty_lock, flags); 150 150 LogFunc(("vboxvideo: %d\n", __LINE__)); 151 151 return; … … 154 154 fbdev->x1 = fbdev->y1 = INT_MAX; 155 155 fbdev->x2 = fbdev->y2 = 0; 156 spin_unlock_irqrestore(& vbox->dev_lock, flags);156 spin_unlock_irqrestore(&fbdev->dirty_lock, flags); 157 157 158 158 if (!bo->kmap.virtual) { … … 418 418 419 419 vbox->fbdev = fbdev; 420 spin_lock_init(&fbdev->dirty_lock); 421 420 422 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) 421 423 fbdev->helper.funcs = &vbox_fb_helper_funcs; -
trunk/src/VBox/Additions/linux/drm/vbox_main.c
r59697 r59947 117 117 num_rects, vbox)); 118 118 vbox_enable_accel(vbox); 119 spin_lock_irqsave(&vbox->dev_lock, flags);119 mutex_lock(&vbox->hw_mutex); 120 120 for (i = 0; i < num_rects; ++i) 121 121 { … … 147 147 } 148 148 } 149 spin_unlock_irqrestore(&vbox->dev_lock, flags);149 mutex_unlock(&vbox->hw_mutex); 150 150 LogFunc(("vboxvideo: %d\n", __LINE__)); 151 151 } … … 348 348 vbox->dev = dev; 349 349 350 spin_lock_init(&vbox->dev_lock);350 mutex_init(&vbox->hw_mutex); 351 351 /* I hope this won't interfere with the memory manager. */ 352 352 vbox->vram = pci_iomap(dev->pdev, 0, 0); -
trunk/src/VBox/Additions/linux/drm/vbox_mode.c
r59936 r59947 146 146 struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); 147 147 struct vbox_private *vbox = crtc->dev->dev_private; 148 unsigned long flags;149 148 150 149 LogFunc(("vboxvideo: %d: vbox_crtc=%p, mode=%d\n", __LINE__, vbox_crtc, … … 160 159 break; 161 160 } 162 spin_lock_irqsave(&vbox->dev_lock, flags);161 mutex_lock(&vbox->hw_mutex); 163 162 vbox_do_modeset(crtc, &crtc->hwmode); 164 spin_unlock_irqrestore(&vbox->dev_lock, flags);163 mutex_unlock(&vbox->hw_mutex); 165 164 LogFunc(("vboxvideo: %d\n", __LINE__)); 166 165 } … … 249 248 { 250 249 struct vbox_private *vbox = crtc->dev->dev_private; 251 unsigned long flags;252 250 int rc = 0; 253 251 254 252 LogFunc(("vboxvideo: %d: vbox=%p\n", __LINE__, vbox)); 255 253 vbox_crtc_mode_set_base(crtc, x, y, old_fb); 256 spin_lock_irqsave(&vbox->dev_lock, flags);254 mutex_lock(&vbox->hw_mutex); 257 255 rc = vbox_set_view(crtc); 258 256 if (!rc) 259 257 vbox_do_modeset(crtc, mode); 260 spin_unlock_irqrestore(&vbox->dev_lock, flags);258 mutex_unlock(&vbox->hw_mutex); 261 259 LogFunc(("vboxvideo: %d\n", __LINE__)); 262 260 return rc; … … 567 565 struct vbox_private *vbox = dev->dev_private; 568 566 struct drm_crtc *crtci; 569 unsigned long flags; 570 571 LogFunc(("vboxvideo: %d\n", __LINE__)); 572 spin_lock_irqsave(&vbox->dev_lock, flags); 567 568 LogFunc(("vboxvideo: %d\n", __LINE__)); 569 mutex_lock(&vbox->hw_mutex); 573 570 list_for_each_entry(crtci, &dev->mode_config.crtc_list, head) 574 571 vbox_do_modeset(crtci, &crtci->hwmode); 575 spin_unlock_irqrestore(&vbox->dev_lock, flags);572 mutex_unlock(&vbox->hw_mutex); 576 573 LogFunc(("vboxvideo: %d\n", __LINE__)); 577 574 }
Note:
See TracChangeset
for help on using the changeset viewer.