Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54882
b: refs/heads/master
c: 5e841b8
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt authored and Linus Torvalds committed May 8, 2007
1 parent c7c4265 commit 9ed1170
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7bf1ea33ad70cf49638092367d52859fbbc44fee
refs/heads/master: 5e841b88d23d0ea0a6ee4e76c489899d4d23ce25
12 changes: 12 additions & 0 deletions trunk/drivers/video/fb_defio.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ static struct page* fb_deferred_io_nopage(struct vm_area_struct *vma,
return page;
}

int fb_deferred_io_fsync(struct file *file, struct dentry *dentry, int datasync)
{
struct fb_info *info = file->private_data;

/* Kill off the delayed work */
cancel_rearming_delayed_work(&info->deferred_work);

/* Run it immediately */
return schedule_delayed_work(&info->deferred_work, 0);
}
EXPORT_SYMBOL_GPL(fb_deferred_io_fsync);

/* vm_ops->page_mkwrite handler */
static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
struct page *page)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,9 @@ static const struct file_operations fb_fops = {
#ifdef HAVE_ARCH_FB_UNMAPPED_AREA
.get_unmapped_area = get_fb_unmapped_area,
#endif
#ifdef CONFIG_FB_DEFERRED_IO
.fsync = fb_deferred_io_fsync,
#endif
};

struct class *fb_class;
Expand Down
6 changes: 4 additions & 2 deletions trunk/include/linux/fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <asm/types.h>
#include <linux/i2c.h>

struct dentry;

/* Definitions of frame buffers */

#define FB_MAJOR 29
Expand Down Expand Up @@ -927,11 +929,11 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
}
}

#ifdef CONFIG_FB_DEFERRED_IO
/* drivers/video/fb_defio.c */
extern void fb_deferred_io_init(struct fb_info *info);
extern void fb_deferred_io_cleanup(struct fb_info *info);
#endif
extern int fb_deferred_io_fsync(struct file *file, struct dentry *dentry,
int datasync);

/* drivers/video/fbsysfs.c */
extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
Expand Down

0 comments on commit 9ed1170

Please sign in to comment.