Lines Matching +full:count +full:- +full:width

1 // SPDX-License-Identifier: GPL-2.0
42 return efi_fb ? 0 : -ENOMEM; in efi_earlycon_remap_fb()
105 for (i = 0; i < height - font->height; i++) { in efi_earlycon_scroll_up()
110 src = efi_earlycon_map((i + font->height) * len, len); in efi_earlycon_scroll_up()
131 bytes = BITS_TO_BYTES(font->width); in efi_earlycon_write_char()
132 src = font->data + c * font->height * bytes + h * bytes; in efi_earlycon_write_char()
134 for (m = 0; m < font->width; m++) { in efi_earlycon_write_char()
137 if ((x >> (7 - n)) & 1) in efi_earlycon_write_char()
155 len = si->lfb_linelength; in efi_earlycon_write()
158 unsigned int linemax = (si->lfb_width - efi_x) / font->width; in efi_earlycon_write()
159 unsigned int h, count; in efi_earlycon_write() local
161 count = strnchrnul(str, num, '\n') - str; in efi_earlycon_write()
162 if (count > linemax) in efi_earlycon_write()
163 count = linemax; in efi_earlycon_write()
165 for (h = 0; h < font->height; h++) { in efi_earlycon_write()
173 n = count; in efi_earlycon_write()
176 while (n-- > 0) { in efi_earlycon_write()
178 x += font->width; in efi_earlycon_write()
185 num -= count; in efi_earlycon_write()
186 efi_x += count * font->width; in efi_earlycon_write()
187 str += count; in efi_earlycon_write()
192 efi_y += font->height; in efi_earlycon_write()
194 num--; in efi_earlycon_write()
197 if (efi_x + font->width > si->lfb_width) { in efi_earlycon_write()
200 efi_y += font->height; in efi_earlycon_write()
203 if (efi_y + font->height > si->lfb_height) { in efi_earlycon_write()
209 efi_y -= font->height; in efi_earlycon_write()
212 for (i = 0; i < font->height; i++) in efi_earlycon_write()
237 return -ENODEV; in efi_earlycon_setup()
245 xres = si->lfb_width; in efi_earlycon_setup()
246 yres = si->lfb_height; in efi_earlycon_setup()
252 if (si->lfb_depth != 32) in efi_earlycon_setup()
253 return -ENODEV; in efi_earlycon_setup()
255 font = get_default_font(xres, yres, -1, -1); in efi_earlycon_setup()
257 return -ENODEV; in efi_earlycon_setup()
260 memset32(efi_x_array, rounddown(xres, font->width), ARRAY_SIZE(efi_x_array)); in efi_earlycon_setup()
261 efi_y = rounddown(yres, font->height); in efi_earlycon_setup()
264 max_line_y = efi_y / font->height + 1; in efi_earlycon_setup()
267 efi_y -= font->height; in efi_earlycon_setup()
268 for (i = 0; i < (yres - efi_y) / font->height; i++) in efi_earlycon_setup()
271 device->con->write = efi_earlycon_write; in efi_earlycon_setup()
272 earlycon_console = device->con; in efi_earlycon_setup()