aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console/fbcon_ud.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/console/fbcon_ud.c')
-rw-r--r--drivers/video/console/fbcon_ud.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c
index 2e1d9d4249cd..c4d7c89212b4 100644
--- a/drivers/video/console/fbcon_ud.c
+++ b/drivers/video/console/fbcon_ud.c
@@ -48,10 +48,10 @@ static inline void ud_update_attr(u8 *dst, u8 *src, int attribute,
48static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, 48static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy,
49 int sx, int dy, int dx, int height, int width) 49 int sx, int dy, int dx, int height, int width)
50{ 50{
51 struct display *p = &fb_display[vc->vc_num]; 51 struct fbcon_ops *ops = info->fbcon_par;
52 struct fb_copyarea area; 52 struct fb_copyarea area;
53 u32 vyres = GETVYRES(p->scrollmode, info); 53 u32 vyres = GETVYRES(ops->p->scrollmode, info);
54 u32 vxres = GETVXRES(p->scrollmode, info); 54 u32 vxres = GETVXRES(ops->p->scrollmode, info);
55 55
56 area.sy = vyres - ((sy + height) * vc->vc_font.height); 56 area.sy = vyres - ((sy + height) * vc->vc_font.height);
57 area.sx = vxres - ((sx + width) * vc->vc_font.width); 57 area.sx = vxres - ((sx + width) * vc->vc_font.width);
@@ -66,11 +66,11 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy,
66static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy, 66static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy,
67 int sx, int height, int width) 67 int sx, int height, int width)
68{ 68{
69 struct display *p = &fb_display[vc->vc_num]; 69 struct fbcon_ops *ops = info->fbcon_par;
70 struct fb_fillrect region; 70 struct fb_fillrect region;
71 int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; 71 int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
72 u32 vyres = GETVYRES(p->scrollmode, info); 72 u32 vyres = GETVYRES(ops->p->scrollmode, info);
73 u32 vxres = GETVXRES(p->scrollmode, info); 73 u32 vxres = GETVXRES(ops->p->scrollmode, info);
74 74
75 region.color = attr_bgcol_ec(bgshift,vc); 75 region.color = attr_bgcol_ec(bgshift,vc);
76 region.dy = vyres - ((sy + height) * vc->vc_font.height); 76 region.dy = vyres - ((sy + height) * vc->vc_font.height);
@@ -153,7 +153,6 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info,
153 int fg, int bg) 153 int fg, int bg)
154{ 154{
155 struct fb_image image; 155 struct fb_image image;
156 struct display *p = &fb_display[vc->vc_num];
157 struct fbcon_ops *ops = info->fbcon_par; 156 struct fbcon_ops *ops = info->fbcon_par;
158 u32 width = (vc->vc_font.width + 7)/8; 157 u32 width = (vc->vc_font.width + 7)/8;
159 u32 cellsize = width * vc->vc_font.height; 158 u32 cellsize = width * vc->vc_font.height;
@@ -163,8 +162,8 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info,
163 u32 mod = vc->vc_font.width % 8, cnt, pitch, size; 162 u32 mod = vc->vc_font.width % 8, cnt, pitch, size;
164 u32 attribute = get_attribute(info, scr_readw(s)); 163 u32 attribute = get_attribute(info, scr_readw(s));
165 u8 *dst, *buf = NULL; 164 u8 *dst, *buf = NULL;
166 u32 vyres = GETVYRES(p->scrollmode, info); 165 u32 vyres = GETVYRES(ops->p->scrollmode, info);
167 u32 vxres = GETVXRES(p->scrollmode, info); 166 u32 vxres = GETVXRES(ops->p->scrollmode, info);
168 167
169 if (!ops->fontbuffer) 168 if (!ops->fontbuffer)
170 return; 169 return;
@@ -421,10 +420,9 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info,
421int ud_update_start(struct fb_info *info) 420int ud_update_start(struct fb_info *info)
422{ 421{
423 struct fbcon_ops *ops = info->fbcon_par; 422 struct fbcon_ops *ops = info->fbcon_par;
424 struct display *p = &fb_display[ops->currcon];
425 u32 xoffset, yoffset; 423 u32 xoffset, yoffset;
426 u32 vyres = GETVYRES(p->scrollmode, info); 424 u32 vyres = GETVYRES(ops->p->scrollmode, info);
427 u32 vxres = GETVXRES(p->scrollmode, info); 425 u32 vxres = GETVXRES(ops->p->scrollmode, info);
428 int err; 426 int err;
429 427
430 xoffset = (vxres - info->var.xres) - ops->var.xoffset; 428 xoffset = (vxres - info->var.xres) - ops->var.xoffset;