Lines Matching refs:priv
71 struct vidconsole_priv *priv = dev_get_uclass_priv(dev); in vidconsole_back() local
81 priv->xcur_frac -= VID_TO_POS(priv->x_charsize); in vidconsole_back()
82 if (priv->xcur_frac < priv->xstart_frac) { in vidconsole_back()
83 priv->xcur_frac = (priv->cols - 1) * in vidconsole_back()
84 VID_TO_POS(priv->x_charsize); in vidconsole_back()
85 priv->ycur -= priv->y_charsize; in vidconsole_back()
86 if (priv->ycur < 0) in vidconsole_back()
87 priv->ycur = 0; in vidconsole_back()
97 struct vidconsole_priv *priv = dev_get_uclass_priv(dev); in vidconsole_newline() local
103 priv->xcur_frac = priv->xstart_frac; in vidconsole_newline()
104 priv->ycur += priv->y_charsize; in vidconsole_newline()
107 if ((priv->ycur + priv->y_charsize) / priv->y_charsize > priv->rows) { in vidconsole_newline()
108 vidconsole_move_rows(dev, 0, rows, priv->rows - rows); in vidconsole_newline()
110 vidconsole_set_row(dev, priv->rows - i - 1, in vidconsole_newline()
112 priv->ycur -= rows * priv->y_charsize; in vidconsole_newline()
114 priv->last_ch = 0; in vidconsole_newline()
138 u32 vid_console_color(struct video_priv *priv, unsigned int idx) in vid_console_color() argument
140 switch (priv->bpix) { in vid_console_color()
175 struct vidconsole_priv *priv = dev_get_uclass_priv(dev); in vidconsole_escape_char() local
181 if (priv->escape_len >= sizeof(priv->escape_buf)) in vidconsole_escape_char()
183 if (priv->escape_len == 0 && ch != '[') in vidconsole_escape_char()
186 priv->escape_buf[priv->escape_len++] = ch; in vidconsole_escape_char()
200 priv->escape = 0; in vidconsole_escape_char()
206 char *s = priv->escape_buf; in vidconsole_escape_char()
216 priv->ycur = row * priv->y_charsize; in vidconsole_escape_char()
217 priv->xcur_frac = priv->xstart_frac + in vidconsole_escape_char()
218 VID_TO_POS(col * priv->x_charsize); in vidconsole_escape_char()
235 parsenum(priv->escape_buf + 1, &mode); in vidconsole_escape_char()
240 priv->ycur = 0; in vidconsole_escape_char()
241 priv->xcur_frac = priv->xstart_frac; in vidconsole_escape_char()
249 char *s = priv->escape_buf; in vidconsole_escape_char()
250 char *end = &priv->escape_buf[priv->escape_len]; in vidconsole_escape_char()
320 priv->escape_len, priv->escape_buf); in vidconsole_escape_char()
327 priv->escape = 0; in vidconsole_escape_char()
332 struct vidconsole_priv *priv = dev_get_uclass_priv(dev); in vidconsole_put_char() local
335 if (priv->escape) { in vidconsole_put_char()
342 priv->escape_len = 0; in vidconsole_put_char()
343 priv->escape = 1; in vidconsole_put_char()
349 priv->xcur_frac = priv->xstart_frac; in vidconsole_put_char()
356 priv->xcur_frac = ((priv->xcur_frac / priv->tab_width_frac) in vidconsole_put_char()
357 + 1) * priv->tab_width_frac; in vidconsole_put_char()
359 if (priv->xcur_frac >= priv->xsize_frac) in vidconsole_put_char()
364 priv->last_ch = 0; in vidconsole_put_char()
372 ret = vidconsole_putc_xy(dev, priv->xcur_frac, priv->ycur, ch); in vidconsole_put_char()
375 ret = vidconsole_putc_xy(dev, priv->xcur_frac, in vidconsole_put_char()
376 priv->ycur, ch); in vidconsole_put_char()
380 priv->xcur_frac += ret; in vidconsole_put_char()
381 priv->last_ch = ch; in vidconsole_put_char()
382 if (priv->xcur_frac >= priv->xsize_frac) in vidconsole_put_char()
392 struct udevice *dev = sdev->priv; in vidconsole_putc()
400 struct udevice *dev = sdev->priv; in vidconsole_puts()
410 struct vidconsole_priv *priv = dev_get_uclass_priv(dev); in vidconsole_pre_probe() local
414 priv->xsize_frac = VID_TO_POS(vid_priv->xsize); in vidconsole_pre_probe()
422 struct vidconsole_priv *priv = dev_get_uclass_priv(dev); in vidconsole_post_probe() local
423 struct stdio_dev *sdev = &priv->sdev; in vidconsole_post_probe()
425 if (!priv->tab_width_frac) in vidconsole_post_probe()
426 priv->tab_width_frac = VID_TO_POS(priv->x_charsize) * 8; in vidconsole_post_probe()
438 sdev->priv = dev; in vidconsole_post_probe()
453 struct vidconsole_priv *priv = dev_get_uclass_priv(dev); in vidconsole_position_cursor() local
457 priv->xcur_frac = VID_TO_POS(min_t(short, col, vid_priv->xsize - 1)); in vidconsole_position_cursor()
458 priv->ycur = min_t(short, row, vid_priv->ysize - 1); in vidconsole_position_cursor()