Skip to content

Commit e4ef4e5

Browse files
committed
vfio-dev/mdpy-fb: Use fbdev I/O helpers
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
1 parent 556c6dd commit e4ef4e5

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

samples/Kconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ config SAMPLE_VFIO_MDEV_MDPY
210210
config SAMPLE_VFIO_MDEV_MDPY_FB
211211
tristate "Build VFIO mdpy example guest fbdev driver"
212212
depends on FB
213-
select FB_CFB_FILLRECT
214-
select FB_CFB_COPYAREA
215-
select FB_CFB_IMAGEBLIT
213+
select FB_IOMEM_HELPERS
216214
help
217215
Guest fbdev driver for the virtual display sample driver.
218216

samples/vfio-mdev/mdpy-fb.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,9 @@ static void mdpy_fb_destroy(struct fb_info *info)
8888

8989
static const struct fb_ops mdpy_fb_ops = {
9090
.owner = THIS_MODULE,
91+
FB_DEFAULT_IOMEM_OPS,
9192
.fb_destroy = mdpy_fb_destroy,
9293
.fb_setcolreg = mdpy_fb_setcolreg,
93-
.fb_fillrect = cfb_fillrect,
94-
.fb_copyarea = cfb_copyarea,
95-
.fb_imageblit = cfb_imageblit,
9694
};
9795

9896
static int mdpy_fb_probe(struct pci_dev *pdev,

0 commit comments

Comments
 (0)