video: udlfb: deifdefify (yes, that's a word).
udlfb selects all of the options it presently ifdef conditionalizes, so none of the statements have any effect outside of aggravating eye strain. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
96f8d864af
commit
1a3e528cfc
@ -39,9 +39,7 @@ static struct fb_fix_screeninfo dlfb_fix = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const u32 udlfb_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST |
|
static const u32 udlfb_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST |
|
||||||
#ifdef FBINFO_VIRTFB
|
|
||||||
FBINFO_VIRTFB |
|
FBINFO_VIRTFB |
|
||||||
#endif
|
|
||||||
FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT |
|
FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT |
|
||||||
FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR;
|
FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR;
|
||||||
|
|
||||||
@ -594,18 +592,6 @@ error:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t dlfb_ops_read(struct fb_info *info, char __user *buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
ssize_t result = -ENOSYS;
|
|
||||||
|
|
||||||
#if defined CONFIG_FB_SYS_FOPS || defined CONFIG_FB_SYS_FOPS_MODULE
|
|
||||||
result = fb_sys_read(info, buf, count, ppos);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Path triggered by usermode clients who write to filesystem
|
* Path triggered by usermode clients who write to filesystem
|
||||||
* e.g. cat filename > /dev/fb1
|
* e.g. cat filename > /dev/fb1
|
||||||
@ -615,12 +601,10 @@ static ssize_t dlfb_ops_read(struct fb_info *info, char __user *buf,
|
|||||||
static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf,
|
static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf,
|
||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
{
|
{
|
||||||
ssize_t result = -ENOSYS;
|
ssize_t result;
|
||||||
struct dlfb_data *dev = info->par;
|
struct dlfb_data *dev = info->par;
|
||||||
u32 offset = (u32) *ppos;
|
u32 offset = (u32) *ppos;
|
||||||
|
|
||||||
#if defined CONFIG_FB_SYS_FOPS || defined CONFIG_FB_SYS_FOPS_MODULE
|
|
||||||
|
|
||||||
result = fb_sys_write(info, buf, count, ppos);
|
result = fb_sys_write(info, buf, count, ppos);
|
||||||
|
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
@ -631,7 +615,6 @@ static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf,
|
|||||||
dlfb_handle_damage(dev, 0, start, info->var.xres,
|
dlfb_handle_damage(dev, 0, start, info->var.xres,
|
||||||
lines, info->screen_base);
|
lines, info->screen_base);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -643,14 +626,10 @@ static void dlfb_ops_copyarea(struct fb_info *info,
|
|||||||
|
|
||||||
struct dlfb_data *dev = info->par;
|
struct dlfb_data *dev = info->par;
|
||||||
|
|
||||||
#if defined CONFIG_FB_SYS_COPYAREA || defined CONFIG_FB_SYS_COPYAREA_MODULE
|
|
||||||
|
|
||||||
sys_copyarea(info, area);
|
sys_copyarea(info, area);
|
||||||
|
|
||||||
dlfb_handle_damage(dev, area->dx, area->dy,
|
dlfb_handle_damage(dev, area->dx, area->dy,
|
||||||
area->width, area->height, info->screen_base);
|
area->width, area->height, info->screen_base);
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dlfb_ops_imageblit(struct fb_info *info,
|
static void dlfb_ops_imageblit(struct fb_info *info,
|
||||||
@ -658,15 +637,10 @@ static void dlfb_ops_imageblit(struct fb_info *info,
|
|||||||
{
|
{
|
||||||
struct dlfb_data *dev = info->par;
|
struct dlfb_data *dev = info->par;
|
||||||
|
|
||||||
#if defined CONFIG_FB_SYS_IMAGEBLIT || defined CONFIG_FB_SYS_IMAGEBLIT_MODULE
|
|
||||||
|
|
||||||
sys_imageblit(info, image);
|
sys_imageblit(info, image);
|
||||||
|
|
||||||
dlfb_handle_damage(dev, image->dx, image->dy,
|
dlfb_handle_damage(dev, image->dx, image->dy,
|
||||||
image->width, image->height, info->screen_base);
|
image->width, image->height, info->screen_base);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dlfb_ops_fillrect(struct fb_info *info,
|
static void dlfb_ops_fillrect(struct fb_info *info,
|
||||||
@ -674,17 +648,12 @@ static void dlfb_ops_fillrect(struct fb_info *info,
|
|||||||
{
|
{
|
||||||
struct dlfb_data *dev = info->par;
|
struct dlfb_data *dev = info->par;
|
||||||
|
|
||||||
#if defined CONFIG_FB_SYS_FILLRECT || defined CONFIG_FB_SYS_FILLRECT_MODULE
|
|
||||||
|
|
||||||
sys_fillrect(info, rect);
|
sys_fillrect(info, rect);
|
||||||
|
|
||||||
dlfb_handle_damage(dev, rect->dx, rect->dy, rect->width,
|
dlfb_handle_damage(dev, rect->dx, rect->dy, rect->width,
|
||||||
rect->height, info->screen_base);
|
rect->height, info->screen_base);
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_FB_DEFERRED_IO
|
|
||||||
/*
|
/*
|
||||||
* NOTE: fb_defio.c is holding info->fbdefio.mutex
|
* NOTE: fb_defio.c is holding info->fbdefio.mutex
|
||||||
* Touching ANY framebuffer memory that triggers a page fault
|
* Touching ANY framebuffer memory that triggers a page fault
|
||||||
@ -746,8 +715,6 @@ error:
|
|||||||
&dev->cpu_kcycles_used);
|
&dev->cpu_kcycles_used);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int dlfb_get_edid(struct dlfb_data *dev, char *edid, int len)
|
static int dlfb_get_edid(struct dlfb_data *dev, char *edid, int len)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -880,7 +847,6 @@ static int dlfb_ops_open(struct fb_info *info, int user)
|
|||||||
|
|
||||||
kref_get(&dev->kref);
|
kref_get(&dev->kref);
|
||||||
|
|
||||||
#ifdef CONFIG_FB_DEFERRED_IO
|
|
||||||
if (fb_defio && (info->fbdefio == NULL)) {
|
if (fb_defio && (info->fbdefio == NULL)) {
|
||||||
/* enable defio at last moment if not disabled by client */
|
/* enable defio at last moment if not disabled by client */
|
||||||
|
|
||||||
@ -896,7 +862,6 @@ static int dlfb_ops_open(struct fb_info *info, int user)
|
|||||||
info->fbdefio = fbdefio;
|
info->fbdefio = fbdefio;
|
||||||
fb_deferred_io_init(info);
|
fb_deferred_io_init(info);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
dl_notice("open /dev/fb%d user=%d fb_info=%p count=%d\n",
|
dl_notice("open /dev/fb%d user=%d fb_info=%p count=%d\n",
|
||||||
info->node, user, info, dev->fb_count);
|
info->node, user, info, dev->fb_count);
|
||||||
@ -977,14 +942,12 @@ static int dlfb_ops_release(struct fb_info *info, int user)
|
|||||||
if (dev->virtualized && (dev->fb_count == 0))
|
if (dev->virtualized && (dev->fb_count == 0))
|
||||||
schedule_delayed_work(&dev->free_framebuffer_work, HZ);
|
schedule_delayed_work(&dev->free_framebuffer_work, HZ);
|
||||||
|
|
||||||
#ifdef CONFIG_FB_DEFERRED_IO
|
|
||||||
if ((dev->fb_count == 0) && (info->fbdefio)) {
|
if ((dev->fb_count == 0) && (info->fbdefio)) {
|
||||||
fb_deferred_io_cleanup(info);
|
fb_deferred_io_cleanup(info);
|
||||||
kfree(info->fbdefio);
|
kfree(info->fbdefio);
|
||||||
info->fbdefio = NULL;
|
info->fbdefio = NULL;
|
||||||
info->fbops->fb_mmap = dlfb_ops_mmap;
|
info->fbops->fb_mmap = dlfb_ops_mmap;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
dl_warn("released /dev/fb%d user=%d count=%d\n",
|
dl_warn("released /dev/fb%d user=%d count=%d\n",
|
||||||
info->node, user, dev->fb_count);
|
info->node, user, dev->fb_count);
|
||||||
@ -1103,7 +1066,7 @@ static int dlfb_ops_blank(int blank_mode, struct fb_info *info)
|
|||||||
|
|
||||||
static struct fb_ops dlfb_ops = {
|
static struct fb_ops dlfb_ops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.fb_read = dlfb_ops_read,
|
.fb_read = fb_sys_read,
|
||||||
.fb_write = dlfb_ops_write,
|
.fb_write = dlfb_ops_write,
|
||||||
.fb_setcolreg = dlfb_ops_setcolreg,
|
.fb_setcolreg = dlfb_ops_setcolreg,
|
||||||
.fb_fillrect = dlfb_ops_fillrect,
|
.fb_fillrect = dlfb_ops_fillrect,
|
||||||
|
Loading…
Reference in New Issue
Block a user