linux/drivers/video/fbdev/carminefb.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Frame buffer driver for the Carmine GPU.
 *
 * The driver configures the GPU as follows
 * - FB0 is display 0 with unique memory area
 * - FB1 is display 1 with unique memory area
 * - both display use 32 bit colors
 */
#include <linux/aperture.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/fb.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/module.h>

#include "carminefb.h"
#include "carminefb_regs.h"

#if !defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN)
#error  "The endianness of the target host has not been defined."
#endif

/*
 * The initial video mode can be supplied via two different ways:
 * - as a string that is passed to fb_find_mode() (module option fb_mode_str)
 * - as an integer that picks the video mode from carmine_modedb[] (module
 *   option fb_mode)
 *
 * If nothing is used than the initial video mode will be the
 * CARMINEFB_DEFAULT_VIDEO_MODE member of the carmine_modedb[].
 */
#define CARMINEFB_DEFAULT_VIDEO_MODE

static unsigned int fb_mode =;
module_param(fb_mode, uint, 0444);
MODULE_PARM_DESC();

static char *fb_mode_str;
module_param(fb_mode_str, charp, 0444);
MODULE_PARM_DESC();

/*
 * Carminefb displays:
 * 0b000 None
 * 0b001 Display 0
 * 0b010 Display 1
 */
static int fb_displays =;
module_param(fb_displays, int, 0444);
MODULE_PARM_DESC();

struct carmine_hw {};

struct carmine_resolution {};

struct carmine_fb {};

static struct fb_fix_screeninfo carminefb_fix =;

static const struct fb_videomode carmine_modedb[] =;

static struct carmine_resolution car_modes[] =;

static int carmine_find_mode(const struct fb_var_screeninfo *var)
{}

static void c_set_disp_reg(const struct carmine_fb *par,
		u32 offset, u32 val)
{}

static u32 c_get_disp_reg(const struct carmine_fb *par,
		u32 offset)
{}

static void c_set_hw_reg(const struct carmine_hw *hw,
		u32 offset, u32 val)
{}

static u32 c_get_hw_reg(const struct carmine_hw *hw,
		u32 offset)
{}

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

static int carmine_check_var(struct fb_var_screeninfo *var,
		struct fb_info *info)
{}

static void carmine_init_display_param(struct carmine_fb *par)
{}

static void set_display_parameters(struct carmine_fb *par)
{}

static int carmine_set_par(struct fb_info *info)
{}

static int init_hardware(struct carmine_hw *hw)
{}

static const struct fb_ops carminefb_ops =;

static int alloc_carmine_fb(void __iomem *regs, void __iomem *smem_base,
			    int smem_offset, struct device *device,
			    struct fb_info **rinfo)
{}

static void cleanup_fb_device(struct fb_info *info)
{}

static int carminefb_probe(struct pci_dev *dev, const struct pci_device_id *ent)
{}

static void carminefb_remove(struct pci_dev *dev)
{}

#define PCI_VENDOR_ID_FUJITU_LIMITED
static struct pci_device_id carmine_devices[] =;

MODULE_DEVICE_TABLE(pci, carmine_devices);

static struct pci_driver carmine_pci_driver =;

static int __init carminefb_init(void)
{}
module_init();

static void __exit carminefb_cleanup(void)
{}
module_exit(carminefb_cleanup);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();