Skip to content

Commit eae6fa9

Browse files
committed
Merge branch 'xen/fbdev' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
* 'xen/fbdev' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: xen pvfb: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers. fb-defio: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers. fb-defio: If FBINFO_VIRTFB is defined, do not set VM_IO flag. Fix toogle whether xenbus driver should be built as module or part of kernel.
2 parents 02412f4 + df11303 commit eae6fa9

8 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎drivers/input/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ config XEN_KBDDEV_FRONTEND
165165
tristate "Xen virtual keyboard and mouse support"
166166
depends on XEN_FBDEV_FRONTEND
167167
default y
168+
select XEN_XENBUS_FRONTEND
168169
help
169170
This driver implements the front-end of the Xen virtual
170171
keyboard and mouse device driver. It communicates with a back-end

‎drivers/video/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,6 +2066,7 @@ config XEN_FBDEV_FRONTEND
20662066
select FB_SYS_IMAGEBLIT
20672067
select FB_SYS_FOPS
20682068
select FB_DEFERRED_IO
2069+
select XEN_XENBUS_FRONTEND
20692070
default y
20702071
help
20712072
This driver implements the front-end of the Xen virtual

‎drivers/video/broadsheetfb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ static int __devinit broadsheetfb_probe(struct platform_device *dev)
470470
par->read_reg = broadsheet_read_reg;
471471
init_waitqueue_head(&par->waitq);
472472

473-
info->flags = FBINFO_FLAG_DEFAULT;
473+
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
474474

475475
info->fbdefio = &broadsheetfb_defio;
476476
fb_deferred_io_init(info);

‎drivers/video/fb_defio.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ static const struct address_space_operations fb_deferred_io_aops = {
144144
static int fb_deferred_io_mmap(struct fb_info *info, struct vm_area_struct *vma)
145145
{
146146
vma->vm_ops = &fb_deferred_io_vm_ops;
147-
vma->vm_flags |= ( VM_IO | VM_RESERVED | VM_DONTEXPAND );
147+
vma->vm_flags |= ( VM_RESERVED | VM_DONTEXPAND );
148+
if (!(info->flags & FBINFO_VIRTFB))
149+
vma->vm_flags |= VM_IO;
148150
vma->vm_private_data = info;
149151
return 0;
150152
}

‎drivers/video/hecubafb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ static int __devinit hecubafb_probe(struct platform_device *dev)
253253
par->send_command = apollo_send_command;
254254
par->send_data = apollo_send_data;
255255

256-
info->flags = FBINFO_FLAG_DEFAULT;
256+
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
257257

258258
info->fbdefio = &hecubafb_defio;
259259
fb_deferred_io_init(info);

‎drivers/video/metronomefb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
700700
if (retval < 0)
701701
goto err_free_irq;
702702

703-
info->flags = FBINFO_FLAG_DEFAULT;
703+
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
704704

705705
info->fbdefio = &metronomefb_defio;
706706
fb_deferred_io_init(info);

‎drivers/video/xen-fbfront.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
440440
fb_info->fix.type = FB_TYPE_PACKED_PIXELS;
441441
fb_info->fix.accel = FB_ACCEL_NONE;
442442

443-
fb_info->flags = FBINFO_FLAG_DEFAULT;
443+
fb_info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;
444444

445445
ret = fb_alloc_cmap(&fb_info->cmap, 256, 0);
446446
if (ret < 0) {

‎include/linux/fb.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ struct fb_tile_ops {
763763
* takes over; acceleration engine should be in a quiescent state */
764764

765765
/* hints */
766+
#define FBINFO_VIRTFB 0x0004 /* FB is System RAM, not device. */
766767
#define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */
767768
#define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */
768769

0 commit comments

Comments
 (0)