• Home
  • Raw
  • Download

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

1 // SPDX-License-Identifier: GPL-2.0
33 if (!earlycon_console || !(earlycon_console->flags & CON_ENABLED)) in efi_earlycon_remap_fb()
39 return efi_fb ? 0 : -ENOMEM; in efi_earlycon_remap_fb()
46 if (efi_fb && !(earlycon_console->flags & CON_ENABLED)) in efi_earlycon_unmap_fb()
94 for (i = 0; i < height - font->height; i++) { in efi_earlycon_scroll_up()
99 src = efi_earlycon_map((i + font->height) * len, len); in efi_earlycon_scroll_up()
120 bytes = BITS_TO_BYTES(font->width); in efi_earlycon_write_char()
121 src = font->data + c * font->height * bytes + h * bytes; in efi_earlycon_write_char()
123 for (m = 0; m < font->width; m++) { in efi_earlycon_write_char()
126 if ((x >> (7 - n)) & 1) in efi_earlycon_write_char()
143 len = si->lfb_linelength; in efi_earlycon_write()
147 unsigned int h, count = 0; in efi_earlycon_write() local
150 if (count == num) in efi_earlycon_write()
152 count++; in efi_earlycon_write()
155 linemax = (si->lfb_width - efi_x) / font->width; in efi_earlycon_write()
156 if (count > linemax) in efi_earlycon_write()
157 count = linemax; in efi_earlycon_write()
159 for (h = 0; h < font->height; h++) { in efi_earlycon_write()
167 n = count; in efi_earlycon_write()
170 while (n-- > 0) { in efi_earlycon_write()
172 x += font->width; in efi_earlycon_write()
179 num -= count; in efi_earlycon_write()
180 efi_x += count * font->width; in efi_earlycon_write()
181 str += count; in efi_earlycon_write()
185 efi_y += font->height; in efi_earlycon_write()
187 num--; in efi_earlycon_write()
190 if (efi_x + font->width > si->lfb_width) { in efi_earlycon_write()
192 efi_y += font->height; in efi_earlycon_write()
195 if (efi_y + font->height > si->lfb_height) { in efi_earlycon_write()
198 efi_y -= font->height; in efi_earlycon_write()
201 for (i = 0; i < font->height; i++) in efi_earlycon_write()
215 return -ENODEV; in efi_earlycon_setup()
224 xres = si->lfb_width; in efi_earlycon_setup()
225 yres = si->lfb_height; in efi_earlycon_setup()
231 if (si->lfb_depth != 32) in efi_earlycon_setup()
232 return -ENODEV; in efi_earlycon_setup()
234 font = get_default_font(xres, yres, -1, -1); in efi_earlycon_setup()
236 return -ENODEV; in efi_earlycon_setup()
238 efi_y = rounddown(yres, font->height) - font->height; in efi_earlycon_setup()
239 for (i = 0; i < (yres - efi_y) / font->height; i++) in efi_earlycon_setup()
242 device->con->write = efi_earlycon_write; in efi_earlycon_setup()
243 earlycon_console = device->con; in efi_earlycon_setup()