lib/fb: Remove fb_clear()
diff --git a/common/drivers/gop.c b/common/drivers/gop.c
index 59fa374c..1b8a5049 100644
--- a/common/drivers/gop.c
+++ b/common/drivers/gop.c
@@ -181,8 +181,6 @@ static bool try_mode(struct fb_info *ret, EFI_GRAPHICS_OUTPUT_PROTOCOL *gop,
ret->framebuffer_addr = gop->Mode->FrameBufferBase;
- fb_clear(ret);
-
return true;
}
diff --git a/common/drivers/vbe.c b/common/drivers/vbe.c
index 735d16bf..f9177c77 100644
--- a/common/drivers/vbe.c
+++ b/common/drivers/vbe.c
@@ -343,8 +343,6 @@ retry:
continue;
}
- fb_clear(ret);
-
return true;
}
}
diff --git a/common/lib/fb.c b/common/lib/fb.c
index 38ec277d..8aa051af 100644
--- a/common/lib/fb.c
+++ b/common/lib/fb.c
@@ -34,41 +34,6 @@ void fb_init(struct fb_info **ret, size_t *_fbs_count,
fb_fbs_count = *_fbs_count;
}
-void fb_clear(struct fb_info *fb) {
- for (size_t y = 0; y < fb->framebuffer_height; y++) {
- switch (fb->framebuffer_bpp) {
- case 32: {
- uint32_t *fbp = (void *)(uintptr_t)fb->framebuffer_addr;
- size_t row = (y * fb->framebuffer_pitch) / 4;
- for (size_t x = 0; x < fb->framebuffer_width; x++) {
- fbp[row + x] = 0;
- }
- break;
- }
- case 16: {
- uint16_t *fbp = (void *)(uintptr_t)fb->framebuffer_addr;
- size_t row = (y * fb->framebuffer_pitch) / 2;
- for (size_t x = 0; x < fb->framebuffer_width; x++) {
- fbp[row + x] = 0;
- }
- break;
- }
- default: {
- uint8_t *fbp = (void *)(uintptr_t)fb->framebuffer_addr;
- size_t row = y * fb->framebuffer_pitch;
- size_t row_bytes = fb->framebuffer_width * (fb->framebuffer_bpp / 8);
- for (size_t x = 0; x < row_bytes; x++) {
- fbp[row + x] = 0;
- }
- break;
- }
- }
- }
-
- fb_flush((volatile void *)(uintptr_t)fb->framebuffer_addr,
- (size_t)fb->framebuffer_pitch * fb->framebuffer_height);
-}
-
#if defined (__x86_64__) || defined (__i386__)
static void fb_flush_x86(volatile void *base, size_t length) {
static size_t clsz = 0;
diff --git a/common/lib/fb.h b/common/lib/fb.h
index b34c6e1a..01e28839 100644
--- a/common/lib/fb.h
+++ b/common/lib/fb.h
@@ -38,8 +38,6 @@ extern size_t fb_fbs_count;
void fb_init(struct fb_info **ret, size_t *_fbs_count,
uint64_t target_width, uint64_t target_height, uint16_t target_bpp);
-void fb_clear(struct fb_info *fb);
-
void fb_flush(volatile void *base, size_t length);
#endif
