{
struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
struct console_tt_priv *priv = dev_get_priv(dev);
- void *line;
+ void *end, *line;
int pixels = priv->font_size * vid_priv->line_length;
- int i;
+ int i, ret;
line = vid_priv->fb + row * priv->font_size * vid_priv->line_length;
switch (vid_priv->bpix) {
for (i = 0; i < pixels; i++)
*dst++ = clr;
+ end = dst;
break;
}
#endif
for (i = 0; i < pixels; i++)
*dst++ = clr;
+ end = dst;
break;
}
#endif
for (i = 0; i < pixels; i++)
*dst++ = clr;
+ end = dst;
break;
}
#endif
default:
return -ENOSYS;
}
+ ret = vidconsole_sync_copy(dev, line, end);
+ if (ret)
+ return ret;
return 0;
}
struct console_tt_priv *priv = dev_get_priv(dev);
void *dst;
void *src;
- int i, diff;
+ int i, diff, ret;
dst = vid_priv->fb + rowdst * priv->font_size * vid_priv->line_length;
src = vid_priv->fb + rowsrc * priv->font_size * vid_priv->line_length;
- memmove(dst, src, priv->font_size * vid_priv->line_length * count);
+ ret = vidconsole_memmove(dev, dst, src, priv->font_size *
+ vid_priv->line_length * count);
+ if (ret)
+ return ret;
/* Scroll up our position history */
diff = (rowsrc - rowdst) * priv->font_size;
struct pos_info *pos;
u8 *bits, *data;
int advance;
- void *line;
- int row;
+ void *start, *end, *line;
+ int row, ret;
/* First get some basic metrics about this character */
stbtt_GetCodepointHMetrics(font, ch, &advance, &lsb);
/* Figure out where to write the character in the frame buffer */
bits = data;
- line = vid_priv->fb + y * vid_priv->line_length +
+ start = vid_priv->fb + y * vid_priv->line_length +
VID_TO_PIXEL(x) * VNBYTES(vid_priv->bpix);
linenum = priv->baseline + yoff;
if (linenum > 0)
- line += linenum * vid_priv->line_length;
+ start += linenum * vid_priv->line_length;
+ line = start;
/*
* Write a row at a time, converting the 8bpp image into the colour
*dst++ &= out;
bits++;
}
+ end = dst;
break;
}
#endif
*dst++ &= out;
bits++;
}
+ end = dst;
break;
}
#endif
line += vid_priv->line_length;
}
+ ret = vidconsole_sync_copy(dev, start, line);
+ if (ret)
+ return ret;
free(data);
return width_frac;
int xend, int yend, int clr)
{
struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
- void *line;
+ void *start, *line;
int pixels = xend - xstart;
- int row, i;
+ int row, i, ret;
- line = vid_priv->fb + ystart * vid_priv->line_length;
- line += xstart * VNBYTES(vid_priv->bpix);
+ start = vid_priv->fb + ystart * vid_priv->line_length;
+ start += xstart * VNBYTES(vid_priv->bpix);
+ line = start;
for (row = ystart; row < yend; row++) {
switch (vid_priv->bpix) {
#ifdef CONFIG_VIDEO_BPP8
}
line += vid_priv->line_length;
}
+ ret = vidconsole_sync_copy(dev, start, line);
+ if (ret)
+ return ret;
return 0;
}