Commit e80eec1b authored by Thomas Zimmermann's avatar Thomas Zimmermann
Browse files

fbdev: Rename pagelist to pagereflist for deferred I/O



Rename various instances of pagelist to pagereflist. The list now
stores pageref structures, so the new name is more appropriate.

In their write-back helpers, several fbdev drivers refer to the
pageref list in struct fb_deferred_io instead of using the one
supplied as argument to the function. Convert them over to the
supplied one. It's the same instance, so no change of behavior
occurs.

v4:
	* fix commit message (Javier)

Suggested-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220429100834.18898-5-tzimmermann@suse.de
parent 3ed38112
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -708,13 +708,12 @@ static void drm_fb_helper_memory_range_to_clip(struct fb_info *info, off_t off,
/**
 * drm_fb_helper_deferred_io() - fbdev deferred_io callback function
 * @info: fb_info struct pointer
 * @pagelist: list of mmap framebuffer pages that have to be flushed
 * @pagereflist: list of mmap framebuffer pages that have to be flushed
 *
 * This function is used as the &fb_deferred_io.deferred_io
 * callback function for flushing the fbdev mmap writes.
 */
void drm_fb_helper_deferred_io(struct fb_info *info,
			       struct list_head *pagelist)
void drm_fb_helper_deferred_io(struct fb_info *info, struct list_head *pagereflist)
{
	unsigned long start, end, min, max;
	struct fb_deferred_io_pageref *pageref;
@@ -722,7 +721,7 @@ void drm_fb_helper_deferred_io(struct fb_info *info,

	min = ULONG_MAX;
	max = 0;
	list_for_each_entry(pageref, pagelist, list) {
	list_for_each_entry(pageref, pagereflist, list) {
		start = pageref->offset;
		end = start + PAGE_SIZE;
		min = min(min, start);
+2 −3
Original line number Diff line number Diff line
@@ -316,8 +316,7 @@ static int vmw_fb_pan_display(struct fb_var_screeninfo *var,
	return 0;
}

static void vmw_deferred_io(struct fb_info *info,
			    struct list_head *pagelist)
static void vmw_deferred_io(struct fb_info *info, struct list_head *pagereflist)
{
	struct vmw_fb_par *par = info->par;
	unsigned long start, end, min, max;
@@ -327,7 +326,7 @@ static void vmw_deferred_io(struct fb_info *info,

	min = ULONG_MAX;
	max = 0;
	list_for_each_entry(pageref, pagelist, list) {
	list_for_each_entry(pageref, pagereflist, list) {
		struct page *page = pageref->page;
		start = page->index << PAGE_SHIFT;
		end = start + PAGE_SIZE - 1;
+1 −1
Original line number Diff line number Diff line
@@ -433,7 +433,7 @@ static const struct fb_ops picolcdfb_ops = {


/* Callback from deferred IO workqueue */
static void picolcd_fb_deferred_io(struct fb_info *info, struct list_head *pagelist)
static void picolcd_fb_deferred_io(struct fb_info *info, struct list_head *pagereflist)
{
	picolcd_fb_update(info);
}
+5 −5
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ static void fbtft_mkdirty(struct fb_info *info, int y, int height)
	schedule_delayed_work(&info->deferred_work, fbdefio->delay);
}

static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagelist)
static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagereflist)
{
	struct fbtft_par *par = info->par;
	unsigned int dirty_lines_start, dirty_lines_end;
@@ -340,7 +340,7 @@ static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagelist)
	spin_unlock(&par->dirty_lock);

	/* Mark display lines as dirty */
	list_for_each_entry(pageref, pagelist, list) {
	list_for_each_entry(pageref, pagereflist, list) {
		struct page *page = pageref->page;
		count++;
		index = page->index << PAGE_SHIFT;
@@ -656,7 +656,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
	fbops->fb_mmap      =      fb_deferred_io_mmap;

	fbdefio->delay =            HZ / fps;
	fbdefio->sort_pagelist =   true;
	fbdefio->sort_pagereflist = true;
	fbdefio->deferred_io =      fbtft_deferred_io;
	fb_deferred_io_init(info);

+5 −7
Original line number Diff line number Diff line
@@ -929,13 +929,11 @@ static void broadsheetfb_dpy_update(struct broadsheetfb_par *par)
}

/* this is called back from the deferred io workqueue */
static void broadsheetfb_dpy_deferred_io(struct fb_info *info,
				struct list_head *pagelist)
static void broadsheetfb_dpy_deferred_io(struct fb_info *info, struct list_head *pagereflist)
{
	u16 y1 = 0, h = 0;
	int prev_index = -1;
	struct fb_deferred_io_pageref *pageref;
	struct fb_deferred_io *fbdefio = info->fbdefio;
	int h_inc;
	u16 yres = info->var.yres;
	u16 xres = info->var.xres;
@@ -944,7 +942,7 @@ static void broadsheetfb_dpy_deferred_io(struct fb_info *info,
	h_inc = DIV_ROUND_UP(PAGE_SIZE , xres);

	/* walk the written page list and swizzle the data */
	list_for_each_entry(pageref, &fbdefio->pagelist, list) {
	list_for_each_entry(pageref, pagereflist, list) {
		struct page *cur = pageref->page;
		if (prev_index < 0) {
			/* just starting so assign first page */
@@ -1061,7 +1059,7 @@ static const struct fb_ops broadsheetfb_ops = {

static struct fb_deferred_io broadsheetfb_defio = {
	.delay			= HZ/4,
	.sort_pagelist	= true,
	.sort_pagereflist	= true,
	.deferred_io		= broadsheetfb_dpy_deferred_io,
};

Loading