vfio-mdev/mdpy-fb: Do not set struct fb_info.apertures
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 19 Dec 2022 16:05:07 +0000 (17:05 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 13 Jan 2023 11:54:27 +0000 (12:54 +0100)
Generic fbdev drivers use the apertures field in struct fb_info to
control ownership of the framebuffer memory and graphics device. Do
not set the values in mdpy-fb.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221219160516.23436-10-tzimmermann@suse.de
samples/vfio-mdev/mdpy-fb.c

index 9ec93d90e8a5a647f1e8ddce1ed2f005abdfeeee..1de5801cd2e8da039c0f2b01db060b3e6dee52c6 100644 (file)
@@ -161,14 +161,6 @@ static int mdpy_fb_probe(struct pci_dev *pdev,
                goto err_release_fb;
        }
 
-       info->apertures = alloc_apertures(1);
-       if (!info->apertures) {
-               ret = -ENOMEM;
-               goto err_unmap;
-       }
-       info->apertures->ranges[0].base = info->fix.smem_start;
-       info->apertures->ranges[0].size = info->fix.smem_len;
-
        info->fbops = &mdpy_fb_ops;
        info->flags = FBINFO_DEFAULT;
        info->pseudo_palette = par->palette;