]> Git Repo - linux.git/commitdiff
Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <[email protected]>
Mon, 23 Nov 2020 23:29:03 +0000 (15:29 -0800)
committerLinus Torvalds <[email protected]>
Mon, 23 Nov 2020 23:29:03 +0000 (15:29 -0800)
Pull Hyper-V fix from Wei Liu:
 "One patch from Dexuan to fix VRAM cache type in Hyper-V framebuffer
  driver"

* tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
  video: hyperv_fb: Fix the cache type when mapping the VRAM

1  2 
drivers/video/fbdev/hyperv_fb.c

index 5bc86f481a78ebff10ef04f51fbb8a2c30387cb3,58c74d2356baf5cb25e8fef156106d6993f879ec..c8b0ae676809ba041e954ad876ec71e76da8b0ba
@@@ -47,7 -47,6 +47,7 @@@
  
  #include <linux/module.h>
  #include <linux/kernel.h>
 +#include <linux/vmalloc.h>
  #include <linux/init.h>
  #include <linux/completion.h>
  #include <linux/fb.h>
@@@ -1093,7 -1092,12 +1093,12 @@@ static int hvfb_getmem(struct hv_devic
                goto err1;
        }
  
-       fb_virt = ioremap(par->mem->start, screen_fb_size);
+       /*
+        * Map the VRAM cacheable for performance. This is also required for
+        * VM Connect to display properly for ARM64 Linux VM, as the host also
+        * maps the VRAM cacheable.
+        */
+       fb_virt = ioremap_cache(par->mem->start, screen_fb_size);
        if (!fb_virt)
                goto err2;
  
  getmem_done:
        remove_conflicting_framebuffers(info->apertures,
                                        KBUILD_MODNAME, false);
 -      if (!gen2vm)
 +
 +      if (gen2vm) {
 +              /* framebuffer is reallocated, clear screen_info to avoid misuse from kexec */
 +              screen_info.lfb_size = 0;
 +              screen_info.lfb_base = 0;
 +              screen_info.orig_video_isVGA = 0;
 +      } else {
                pci_dev_put(pdev);
 +      }
        kfree(info->apertures);
  
        return 0;
This page took 0.065947 seconds and 4 git commands to generate.