Merge tag 'hyperv-next-signed-20220528' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/kernel/linux-rpi.git] / drivers / video / fbdev / hyperv_fb.c
index 7563d54..18dc2fc 100644 (file)
@@ -415,11 +415,10 @@ static void hvfb_docopy(struct hvfb_par *par,
 }
 
 /* Deferred IO callback */
-static void synthvid_deferred_io(struct fb_info *p,
-                                struct list_head *pagelist)
+static void synthvid_deferred_io(struct fb_info *p, struct list_head *pagereflist)
 {
        struct hvfb_par *par = p->par;
-       struct page *page;
+       struct fb_deferred_io_pageref *pageref;
        unsigned long start, end;
        int y1, y2, miny, maxy;
 
@@ -432,8 +431,8 @@ static void synthvid_deferred_io(struct fb_info *p,
         * in synthvid_update function by clamping the y2
         * value to yres.
         */
-       list_for_each_entry(page, pagelist, lru) {
-               start = page->index << PAGE_SHIFT;
+       list_for_each_entry(pageref, pagereflist, list) {
+               start = pageref->offset;
                end = start + PAGE_SIZE - 1;
                y1 = start / p->fix.line_length;
                y2 = end / p->fix.line_length;
@@ -894,6 +893,7 @@ static const struct fb_ops hvfb_ops = {
        .fb_copyarea = hvfb_cfb_copyarea,
        .fb_imageblit = hvfb_cfb_imageblit,
        .fb_blank = hvfb_blank,
+       .fb_mmap = fb_deferred_io_mmap,
 };