Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/hyperv: Remove firmware framebuffers with aperture helper

Replace use of screen_info state with the correct interface from
the aperture helpers. The state is only for architecture and firmware
code. It is not guaranteed to contain valid data. Drivers are thus
not allowed to use it.

For removing conflicting firmware framebuffers, there are aperture
helpers. Hence replace screen_info with the correct function that will
remove conflicting framebuffers for the hyperv-drm driver. Also
move the call to the correct place within the driver.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Thomas Zimmermann and committed by
Helge Deller
778e73d2 7452b319

+2 -6
+2 -6
drivers/gpu/drm/hyperv/hyperv_drm_drv.c
··· 7 7 #include <linux/hyperv.h> 8 8 #include <linux/module.h> 9 9 #include <linux/pci.h> 10 - #include <linux/screen_info.h> 11 10 12 11 #include <drm/drm_aperture.h> 13 12 #include <drm/drm_atomic_helper.h> ··· 72 73 struct drm_device *dev = &hv->dev; 73 74 int ret; 74 75 75 - if (IS_ENABLED(CONFIG_SYSFB)) 76 - drm_aperture_remove_conflicting_framebuffers(screen_info.lfb_base, 77 - screen_info.lfb_size, 78 - &hyperv_driver); 79 - 80 76 hv->fb_size = (unsigned long)hv->mmio_megabytes * 1024 * 1024; 81 77 82 78 ret = vmbus_allocate_mmio(&hv->mem, hdev, 0, -1, hv->fb_size, 0x100000, ··· 123 129 drm_err(dev, "Failed to connect to vmbus.\n"); 124 130 goto err_hv_set_drv_data; 125 131 } 132 + 133 + drm_aperture_remove_framebuffers(&hyperv_driver); 126 134 127 135 ret = hyperv_setup_vram(hv, hdev); 128 136 if (ret)