summaryrefslogtreecommitdiff
path: root/samples/vfio-mdev/mdpy-fb.c
AgeCommit message (Collapse)AuthorFilesLines
2023-08-04vfio-dev/mdpy-fb: Use fbdev I/O helpersThomas Zimmermann1-3/+1
Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions. Select the correct modules with Kconfig's FB_IOMEM_HELPERS token. The macro and token set the currently selected values, so there is no functional change. v3: * use _IOMEM_ in commit message v2: * updated to use _IOMEM_ tokens Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Helge Deller <deller@gmx.de> Cc: Kirti Wankhede <kwankhede@nvidia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-48-tzimmermann@suse.de
2023-07-24vfio-mdev: Remove flag FBINFO_DEFAULT from fbdev sample driverThomas Zimmermann1-1/+0
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: Kirti Wankhede <kwankhede@nvidia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-8-tzimmermann@suse.de
2023-01-19Merge drm/drm-next into drm-misc-nextThomas Zimmermann1-1/+7
Backmerging into drm-misc-next to get DRM accelerator infrastructure, which is required by ipuv driver. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
2023-01-13vfio-mdev/mdpy-fb: Do not set struct fb_info.aperturesThomas Zimmermann1-8/+0
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
2022-12-13samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe()Shang XiaoJing1-1/+7
Add missing pci_disable_device() in fail path of mdpy_fb_probe(). Besides, fix missing release functions in mdpy_fb_remove(). Fixes: cacade1946a4 ("sample: vfio mdev display - guest driver") Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> Link: https://lore.kernel.org/r/20221208013341.3999-1-shangxiaojing@huawei.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2021-05-24samples: vfio-mdev: fix error handing in mdpy_fb_probe()Wei Yongjun1-4/+9
Fix to return a negative error code from the framebuffer_alloc() error handling case instead of 0, also release regions in some error handing cases. Fixes: cacade1946a4 ("sample: vfio mdev display - guest driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Message-Id: <20210520133641.1421378-1-weiyongjun1@huawei.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2019-12-10samples: vfio-mdev: constify fb opsJani Nikula1-1/+1
Now that the fbops member of struct fb_info is const, we can start making the ops const as well. v2: fix typo (Christophe de Dinechin) Cc: Kirti Wankhede <kwankhede@nvidia.com> Cc: kvm@vger.kernel.org Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Kirti Wankhede <kwankhede@nvidia.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ddb10df1316ef585930cda7718643a580f4fe37b.1575390741.git.jani.nikula@intel.com
2018-06-08sample: vfio mdev display - guest driverGerd Hoffmann1-0/+232
Guest fbdev driver for CONFIG_SAMPLE_VFIO_MDEV_MDPY. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>