aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/console/bitblit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
index 69864b1b3f9e..6b7c8fbc5495 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -25,7 +25,7 @@ static inline void update_attr(u8 *dst, u8 *src, int attribute,
25 struct vc_data *vc) 25 struct vc_data *vc)
26{ 26{
27 int i, offset = (vc->vc_font.height < 10) ? 1 : 2; 27 int i, offset = (vc->vc_font.height < 10) ? 1 : 2;
28 int width = (vc->vc_font.width + 7) >> 3; 28 int width = DIV_ROUND_UP(vc->vc_font.width, 8);
29 unsigned int cellsize = vc->vc_font.height * width; 29 unsigned int cellsize = vc->vc_font.height * width;
30 u8 c; 30 u8 c;
31 31
@@ -144,7 +144,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
144 int fg, int bg) 144 int fg, int bg)
145{ 145{
146 struct fb_image image; 146 struct fb_image image;
147 u32 width = (vc->vc_font.width + 7)/8; 147 u32 width = DIV_ROUND_UP(vc->vc_font.width, 8);
148 u32 cellsize = width * vc->vc_font.height; 148 u32 cellsize = width * vc->vc_font.height;
149 u32 maxcnt = info->pixmap.size/cellsize; 149 u32 maxcnt = info->pixmap.size/cellsize;
150 u32 scan_align = info->pixmap.scan_align - 1; 150 u32 scan_align = info->pixmap.scan_align - 1;
@@ -173,7 +173,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
173 cnt = count; 173 cnt = count;
174 174
175 image.width = vc->vc_font.width * cnt; 175 image.width = vc->vc_font.width * cnt;
176 pitch = ((image.width + 7) >> 3) + scan_align; 176 pitch = DIV_ROUND_UP(image.width, 8) + scan_align;
177 pitch &= ~scan_align; 177 pitch &= ~scan_align;
178 size = pitch * image.height + buf_align; 178 size = pitch * image.height + buf_align;
179 size &= ~buf_align; 179 size &= ~buf_align;
@@ -239,7 +239,7 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, int mode,
239 struct fb_cursor cursor; 239 struct fb_cursor cursor;
240 struct fbcon_ops *ops = info->fbcon_par; 240 struct fbcon_ops *ops = info->fbcon_par;
241 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; 241 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
242 int w = (vc->vc_font.width + 7) >> 3, c; 242 int w = DIV_ROUND_UP(vc->vc_font.width, 8), c;
243 int y = real_y(ops->p, vc->vc_y); 243 int y = real_y(ops->p, vc->vc_y);
244 int attribute, use_sw = (vc->vc_cursor_type & 0x10); 244 int attribute, use_sw = (vc->vc_cursor_type & 0x10);
245 int err = 1; 245 int err = 1;