Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/57104 )
Change subject: libpayload: cbgfx: Clear screen by sequential access ......................................................................
Patch Set 5:
(1 comment)
File payloads/libpayload/drivers/video/graphics.c:
https://review.coreboot.org/c/coreboot/+/57104/comment/bc747049_7cfd29a3 PS4, Line 637: memset(FB, color & 0xff, fbinfo->y_resolution * bpl);
I think most people cannot identify the difference if we simply use #202020 or #21212121 ... […]
The problem is probably memcpy()ing out of the framebuffer, since it's likely mapped with a memory type where read accesses are slow. Something like this would probably work better:
uint8_t *line = alloca(bpl); for (int x = 0; x < fbinfo->x_resolution; x++) for (int i = 0; i < bpp / 8; i++) line[x * bpp + i] = color >> (i * 8); for (int y = 0; y < fbinfo->y_resolution; y++) memcpy(FB + y * bpl, line, bpl);