linux/samples/vfio-mdev/mdpy-fb.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Framebuffer driver for mdpy (mediated virtual pci display device).
 *
 * See mdpy-defs.h for device specs
 *
 *   (c) Gerd Hoffmann <[email protected]>
 *
 * Using some code snippets from simplefb and cirrusfb.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 */
#include <linux/errno.h>
#include <linux/fb.h>
#include <linux/io.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <drm/drm_fourcc.h>
#include "mdpy-defs.h"

static const struct fb_fix_screeninfo mdpy_fb_fix =;

static const struct fb_var_screeninfo mdpy_fb_var =;

#define PSEUDO_PALETTE_SIZE

struct mdpy_fb_par {};

static int mdpy_fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
			      u_int transp, struct fb_info *info)
{}

static void mdpy_fb_destroy(struct fb_info *info)
{}

static const struct fb_ops mdpy_fb_ops =;

static int mdpy_fb_probe(struct pci_dev *pdev,
			 const struct pci_device_id *ent)
{}

static void mdpy_fb_remove(struct pci_dev *pdev)
{}

static struct pci_device_id mdpy_fb_pci_table[] =;

static struct pci_driver mdpy_fb_pci_driver =;

static int __init mdpy_fb_init(void)
{}

module_init();

MODULE_DEVICE_TABLE(pci, mdpy_fb_pci_table);
MODULE_DESCRIPTION();
MODULE_LICENSE();