diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-05-30 12:46:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-05-30 12:46:49 -0700 |
commit | 8ab2afa23bd197df47819a87f0265c0ac95c5b6a (patch) | |
tree | 64888c0e59cc28e4e3905c2c6a52ad96da89bda5 /drivers/video/fbdev/hyperv_fb.c | |
parent | e11a93567d3f1e843300ed98ff049a4335db8015 (diff) | |
parent | 79b66128f13f5c22dea03a2197495c4b96ab31f5 (diff) | |
download | lwn-8ab2afa23bd197df47819a87f0265c0ac95c5b6a.tar.gz lwn-8ab2afa23bd197df47819a87f0265c0ac95c5b6a.zip |
Merge tag 'for-5.19/fbdev-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
Pull fbdev fixes and updates from Helge Deller:
"A buch of small fixes and cleanups, including:
- vesafb: Fix a use-after-free due early fb_info cleanup
- clcdfb: Fix refcount leak in clcdfb_of_vram_setup
- hyperv_fb: Allow resolutions with size > 64 MB for Gen1
- pxa3xx-gcu: release the resources correctly in
pxa3xx_gcu_probe/remove()
- omapfb: Prevent compiler warning regarding
hwa742_update_window_async()"
* tag 'for-5.19/fbdev-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
video: fbdev: omap: Add prototype for hwa742_update_window_async()
video: fbdev: vesafb: Fix a use-after-free due early fb_info cleanup
video: fbdev: radeon: Fix spelling typo in comment
video: fbdev: xen: remove setting of 'transp' parameter
video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()
video: fbdev: omapfb: simplify the return expression of nec_8048_connect()
video: fbdev: omapfb: simplify the return expression of dsi_init_pll_data()
video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup
video: fbdev: hyperv_fb: Allow resolutions with size > 64 MB for Gen1
Diffstat (limited to 'drivers/video/fbdev/hyperv_fb.c')
-rw-r--r-- | drivers/video/fbdev/hyperv_fb.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c index 18dc2fce649d..886c564787f1 100644 --- a/drivers/video/fbdev/hyperv_fb.c +++ b/drivers/video/fbdev/hyperv_fb.c @@ -992,7 +992,6 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) struct pci_dev *pdev = NULL; void __iomem *fb_virt; int gen2vm = efi_enabled(EFI_BOOT); - resource_size_t pot_start, pot_end; phys_addr_t paddr; int ret; @@ -1043,23 +1042,7 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) dio_fb_size = screen_width * screen_height * screen_depth / 8; - if (gen2vm) { - pot_start = 0; - pot_end = -1; - } else { - if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM) || - pci_resource_len(pdev, 0) < screen_fb_size) { - pr_err("Resource not available or (0x%lx < 0x%lx)\n", - (unsigned long) pci_resource_len(pdev, 0), - (unsigned long) screen_fb_size); - goto err1; - } - - pot_end = pci_resource_end(pdev, 0); - pot_start = pot_end - screen_fb_size + 1; - } - - ret = vmbus_allocate_mmio(&par->mem, hdev, pot_start, pot_end, + ret = vmbus_allocate_mmio(&par->mem, hdev, 0, -1, screen_fb_size, 0x100000, true); if (ret != 0) { pr_err("Unable to allocate framebuffer memory\n"); |