#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/uaccess.h>
#include <linux/mm.h>
#include <linux/fb.h>
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include "edid.h"
#define check_warn(status, fmt, args...) …
#define check_warn_return(status, fmt, args...) …
#define check_warn_goto_error(status, fmt, args...) …
#define all_bits_set(x, bits) …
#define USB_VENDOR_REQUEST_WRITE_REGISTER …
#define USB_VENDOR_REQUEST_READ_REGISTER …
#define UFX_IOCTL_RETURN_EDID …
#define UFX_IOCTL_REPORT_DAMAGE …
#define BULK_SIZE …
#define MAX_TRANSFER …
#define WRITES_IN_FLIGHT …
#define GET_URB_TIMEOUT …
#define FREE_URB_TIMEOUT …
#define BPP …
#define UFX_DEFIO_WRITE_DELAY …
#define UFX_DEFIO_WRITE_DISABLE …
struct dloarea { … };
struct urb_node { … };
struct urb_list { … };
struct ufx_data { … };
static struct fb_fix_screeninfo ufx_fix = …;
static const u32 smscufx_info_flags = …;
static const struct usb_device_id id_table[] = …;
MODULE_DEVICE_TABLE(usb, id_table);
static bool console;
static bool fb_defio = …;
static void ufx_urb_completion(struct urb *urb);
static struct urb *ufx_get_urb(struct ufx_data *dev);
static int ufx_submit_urb(struct ufx_data *dev, struct urb * urb, size_t len);
static int ufx_alloc_urb_list(struct ufx_data *dev, int count, size_t size);
static void ufx_free_urb_list(struct ufx_data *dev);
static DEFINE_MUTEX(disconnect_mutex);
static int ufx_reg_read(struct ufx_data *dev, u32 index, u32 *data)
{ … }
static int ufx_reg_write(struct ufx_data *dev, u32 index, u32 data)
{ … }
static int ufx_reg_clear_and_set_bits(struct ufx_data *dev, u32 index,
u32 bits_to_clear, u32 bits_to_set)
{ … }
static int ufx_reg_set_bits(struct ufx_data *dev, u32 index, u32 bits)
{ … }
static int ufx_reg_clear_bits(struct ufx_data *dev, u32 index, u32 bits)
{ … }
static int ufx_lite_reset(struct ufx_data *dev)
{ … }
static int ufx_blank(struct ufx_data *dev, bool wait)
{ … }
static int ufx_unblank(struct ufx_data *dev, bool wait)
{ … }
static int ufx_disable(struct ufx_data *dev, bool wait)
{ … }
static int ufx_enable(struct ufx_data *dev, bool wait)
{ … }
static int ufx_config_sys_clk(struct ufx_data *dev)
{ … }
static int ufx_config_ddr2(struct ufx_data *dev)
{ … }
struct pll_values { … };
static u32 ufx_calc_range(u32 ref_freq)
{ … }
static void ufx_calc_pll_values(const u32 clk_pixel_pll, struct pll_values *asic_pll)
{ … }
static int ufx_config_pix_clk(struct ufx_data *dev, u32 pixclock)
{ … }
static int ufx_set_vid_mode(struct ufx_data *dev, struct fb_var_screeninfo *var)
{ … }
static int ufx_ops_mmap(struct fb_info *info, struct vm_area_struct *vma)
{ … }
static void ufx_raw_rect(struct ufx_data *dev, u16 *cmd, int x, int y,
int width, int height)
{ … }
static int ufx_handle_damage(struct ufx_data *dev, int x, int y,
int width, int height)
{ … }
static void ufx_dpy_deferred_io(struct fb_info *info, struct list_head *pagereflist)
{ … }
static int ufx_ops_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
{ … }
static int
ufx_ops_setcolreg(unsigned regno, unsigned red, unsigned green,
unsigned blue, unsigned transp, struct fb_info *info)
{ … }
static int ufx_ops_open(struct fb_info *info, int user)
{ … }
static void ufx_free(struct kref *kref)
{ … }
static void ufx_ops_destory(struct fb_info *info)
{ … }
static void ufx_release_urb_work(struct work_struct *work)
{ … }
static void ufx_free_framebuffer(struct ufx_data *dev)
{ … }
static int ufx_ops_release(struct fb_info *info, int user)
{ … }
static int ufx_is_valid_mode(struct fb_videomode *mode,
struct fb_info *info)
{ … }
static void ufx_var_color_format(struct fb_var_screeninfo *var)
{ … }
static int ufx_ops_check_var(struct fb_var_screeninfo *var,
struct fb_info *info)
{ … }
static int ufx_ops_set_par(struct fb_info *info)
{ … }
static int ufx_ops_blank(int blank_mode, struct fb_info *info)
{ … }
static void ufx_ops_damage_range(struct fb_info *info, off_t off, size_t len)
{ … }
static void ufx_ops_damage_area(struct fb_info *info, u32 x, u32 y, u32 width, u32 height)
{ … }
FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(ufx_ops,
ufx_ops_damage_range,
ufx_ops_damage_area)
static const struct fb_ops ufx_ops = …;
static int ufx_realloc_framebuffer(struct ufx_data *dev, struct fb_info *info)
{ … }
static int ufx_i2c_init(struct ufx_data *dev)
{ … }
static int ufx_i2c_configure(struct ufx_data *dev)
{ … }
static int ufx_i2c_wait_busy(struct ufx_data *dev)
{ … }
static int ufx_read_edid(struct ufx_data *dev, u8 *edid, int edid_len)
{ … }
static int ufx_setup_modes(struct ufx_data *dev, struct fb_info *info,
char *default_edid, size_t default_edid_size)
{ … }
static int ufx_usb_probe(struct usb_interface *interface,
const struct usb_device_id *id)
{ … }
static void ufx_usb_disconnect(struct usb_interface *interface)
{ … }
static struct usb_driver ufx_driver = …;
module_usb_driver(…) …;
static void ufx_urb_completion(struct urb *urb)
{ … }
static void ufx_free_urb_list(struct ufx_data *dev)
{ … }
static int ufx_alloc_urb_list(struct ufx_data *dev, int count, size_t size)
{ … }
static struct urb *ufx_get_urb(struct ufx_data *dev)
{ … }
static int ufx_submit_urb(struct ufx_data *dev, struct urb *urb, size_t len)
{ … }
module_param(console, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
MODULE_PARM_DESC(…) …;
module_param(fb_defio, bool, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
MODULE_PARM_DESC(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;