The following commit has been merged in the master branch: commit d5beb3140f91b1c8a3d41b14d729aefa4dcc58bc Merge: 418baf2c28f3473039f2f7377760bd8f6897ae18 5f1251a48c17b54939d7477305e39679a565382c Author: Linus Torvalds torvalds@linux-foundation.org Date: Mon Nov 23 15:29:03 2020 -0800
Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
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
diff --combined drivers/video/fbdev/hyperv_fb.c index 5bc86f481a78,58c74d2356ba..c8b0ae676809 --- a/drivers/video/fbdev/hyperv_fb.c +++ b/drivers/video/fbdev/hyperv_fb.c @@@ -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;
@@@ -1115,15 -1119,8 +1120,15 @@@ 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;