Commit 2575952d authored by David S. Miller's avatar David S. Miller

[VIDEO]: Port SBUS framebuffer to video layer changes.

parent 119716aa
......@@ -203,7 +203,7 @@ static void cg14_margins (struct fb_info_sbusfb *fb, struct display *p,
int x_margin, int y_margin)
{
fb->info.screen_base += (y_margin - fb->y_margin) *
p->line_length + (x_margin - fb->x_margin);
fb->info.fix.line_length + (x_margin - fb->x_margin);
}
static void cg14_setcursormap (struct fb_info_sbusfb *fb, u8 *red, u8 *green, u8 *blue)
......
......@@ -673,7 +673,7 @@ static void cg6_reset (struct fb_info_sbusfb *fb)
static void cg6_margins (struct fb_info_sbusfb *fb, struct display *p, int x_margin, int y_margin)
{
fb->info.screen_base += (y_margin - fb->y_margin) *
p->line_length + (x_margin - fb->x_margin);
fb->info.fix.line_length + (x_margin - fb->x_margin);
}
static int __init cg6_rasterimg (struct fb_info *info, int start)
......
......@@ -140,7 +140,7 @@ static void cg3_margins (struct fb_info_sbusfb *fb, struct display *p,
int x_margin, int y_margin)
{
fb->info.screen_base += (y_margin - fb->y_margin) *
p->line_length + (x_margin - fb->x_margin);
fb->info.fix.line_length + (x_margin - fb->x_margin);
}
static u8 cg3regvals_66hz[] __initdata = { /* 1152 x 900, 66 Hz */
......
......@@ -2306,7 +2306,7 @@ static int __init fbcon_show_logo( void )
}
#endif
#if defined(CONFIG_FBCON_CFB4)
if (depth == 4 && p->type == FB_TYPE_PACKED_PIXELS) {
if (depth == 4 && info->fix.type == FB_TYPE_PACKED_PIXELS) {
src = logo;
for( y1 = 0; y1 < LOGO_H; y1++) {
dst = fb + y1*line + x/2;
......@@ -2320,7 +2320,7 @@ static int __init fbcon_show_logo( void )
}
#endif
#if defined(CONFIG_FBCON_CFB8) || defined(CONFIG_FB_SBUS)
if (depth == 8 && p->type == FB_TYPE_PACKED_PIXELS) {
if (depth == 8 && info->fix.type == FB_TYPE_PACKED_PIXELS) {
/* depth 8 or more, packed, with color registers */
src = logo;
......@@ -2335,8 +2335,8 @@ static int __init fbcon_show_logo( void )
#if defined(CONFIG_FBCON_AFB) || defined(CONFIG_FBCON_ILBM) || \
defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P4) || \
defined(CONFIG_FBCON_IPLAN2P8)
if (depth >= 2 && (p->type == FB_TYPE_PLANES ||
p->type == FB_TYPE_INTERLEAVED_PLANES)) {
if (depth >= 2 && (info->fix.type == FB_TYPE_PLANES ||
info->fix.type == FB_TYPE_INTERLEAVED_PLANES)) {
/* planes (normal or interleaved), with color registers */
int bit;
unsigned char val, mask;
......@@ -2388,9 +2388,9 @@ static int __init fbcon_show_logo( void )
#if defined(CONFIG_FBCON_MFB) || defined(CONFIG_FBCON_AFB) || \
defined(CONFIG_FBCON_ILBM) || defined(CONFIG_FBCON_HGA)
if (depth == 1 && (p->type == FB_TYPE_PACKED_PIXELS ||
p->type == FB_TYPE_PLANES ||
p->type == FB_TYPE_INTERLEAVED_PLANES)) {
if (depth == 1 && (info->fix.type == FB_TYPE_PACKED_PIXELS ||
info->fix.type == FB_TYPE_PLANES ||
info->fix.type == FB_TYPE_INTERLEAVED_PLANES)) {
/* monochrome */
unsigned char inverse = p->inverse || p->visual == FB_VISUAL_MONO01
......@@ -2411,7 +2411,7 @@ static int __init fbcon_show_logo( void )
}
#endif
#if defined(CONFIG_FBCON_VGA_PLANES)
if (depth == 4 && p->type == FB_TYPE_VGA_PLANES) {
if (depth == 4 && info->fix.type == FB_TYPE_VGA_PLANES) {
outb_p(1,0x3ce); outb_p(0xf,0x3cf);
outb_p(3,0x3ce); outb_p(0,0x3cf);
outb_p(5,0x3ce); outb_p(0,0x3cf);
......
......@@ -78,10 +78,6 @@ static int sbusfb_open(struct fb_info *info, int user);
static int sbusfb_release(struct fb_info *info, int user);
static int sbusfb_mmap(struct fb_info *info, struct file *file,
struct vm_area_struct *vma);
static int sbusfb_get_fix(struct fb_fix_screeninfo *fix, int con,
struct fb_info *info);
static int sbusfb_get_var(struct fb_var_screeninfo *var, int con,
struct fb_info *info);
static int sbusfb_set_var(struct fb_var_screeninfo *var, int con,
struct fb_info *info);
static int sbusfb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
......@@ -115,8 +111,6 @@ static struct fb_ops sbusfb_ops = {
.owner = THIS_MODULE,
.fb_open = sbusfb_open,
.fb_release = sbusfb_release,
.fb_get_fix = sbusfb_get_fix,
.fb_get_var = sbusfb_get_var,
.fb_set_var = sbusfb_set_var,
.fb_get_cmap = sbusfb_get_cmap,
.fb_set_cmap = sbusfb_set_cmap,
......@@ -303,31 +297,6 @@ static void sbusfb_disp_setup(struct display *p)
sbusfb_clear_margin(p, 0);
}
/*
* Get the Fixed Part of the Display
*/
static int sbusfb_get_fix(struct fb_fix_screeninfo *fix, int con,
struct fb_info *info)
{
struct fb_info_sbusfb *fb = sbusfbinfo(info);
memcpy(fix, &fb->fix, sizeof(struct fb_fix_screeninfo));
return 0;
}
/*
* Get the User Defined Part of the Display
*/
static int sbusfb_get_var(struct fb_var_screeninfo *var, int con,
struct fb_info *info)
{
struct fb_info_sbusfb *fb = sbusfbinfo(info);
memcpy(var, &fb->var, sizeof(struct fb_var_screeninfo));
return 0;
}
/*
* Set the User Defined Part of the Display
......@@ -1084,10 +1053,6 @@ static void __init sbusfb_init_fb(int node, int parent, int fbtype,
fb->dispsw.clear_margins = NULL;
disp->var = *var;
disp->visual = fix->visual;
disp->type = fix->type;
disp->type_aux = fix->type_aux;
disp->line_length = fix->line_length;
if (fb->blank)
disp->can_soft_blank = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment