Changeset 61597 in vbox for trunk/src/VBox/Additions/linux/drm
- Timestamp:
- Jun 9, 2016 6:24:00 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/drm/vbox_fb.c
r61596 r61597 69 69 #include "vbox_drv.h" 70 70 71 #define VBOX_DIRTY_DELAY (HZ / 30) 71 72 /** 72 73 * Tell the host about dirty rectangles to update. … … 161 162 vbox_bo_unreserve(bo); 162 163 } 164 165 static void vbox_deferred_io(struct fb_info *info, 166 struct list_head *pagelist) 167 { 168 struct vbox_fbdev *fbdev = info->par; 169 unsigned long start, end, min, max; 170 struct page *page; 171 int y1, y2; 172 173 min = ULONG_MAX; 174 max = 0; 175 list_for_each_entry(page, pagelist, lru) { 176 start = page->index << PAGE_SHIFT; 177 end = start + PAGE_SIZE - 1; 178 min = min(min, start); 179 max = max(max, end); 180 } 181 182 if (min < max) { 183 y1 = min / info->fix.line_length; 184 y2 = (max / info->fix.line_length) + 1; 185 printk(KERN_INFO "%s: Calling dirty update: 0, %d, %d, %d\n", 186 __func__, y1, info->var.xres, y2 - y1 - 1); 187 vbox_dirty_update(fbdev, 0, y1, info->var.xres, y2 - y1 - 1); 188 } 189 } 190 191 static struct fb_deferred_io vbox_defio = 192 { 193 .delay = VBOX_DIRTY_DELAY, 194 .deferred_io = vbox_deferred_io, 195 }; 163 196 164 197 static void vbox_fillrect(struct fb_info *info, … … 324 357 info->screen_size = size; 325 358 359 info->fbdefio = &vbox_defio; 360 fb_deferred_io_init(info); 361 326 362 info->pixmap.flags = FB_PIXMAP_SYSTEM; 327 363
Note:
See TracChangeset
for help on using the changeset viewer.