Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: target/qemu-m4/m4display.c

Issue 1777783003: [display] Refactor to avoid implicit framebuffer allocation. (Closed) Base URL: https://github.com/littlekernel/lk.git@master
Patch Set: fix stride confusion Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « target/dartuinoP0/memory_lcd.c ('k') | target/stm32746g-eval2/lcd.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: target/qemu-m4/m4display.c
diff --git a/target/qemu-m4/m4display.c b/target/qemu-m4/m4display.c
index c038dfed350ab8f884e5060668a835af9429f9a3..a471885850b1e381524b10dd9e41ae39b56761ad 100644
--- a/target/qemu-m4/m4display.c
+++ b/target/qemu-m4/m4display.c
@@ -34,8 +34,8 @@
#include <dev/display.h>
#include <dev/gpio.h>
-#include <lib/gfx.h>
#include <platform/gpio.h>
+#include <assert.h>
#define LOCAL_TRACE 0
@@ -202,16 +202,31 @@ static void s4lcd_flush(uint starty, uint endy)
chip_select(true);
}
+status_t display_get_framebuffer(struct display_framebuffer *fb)
+{
+ DEBUG_ASSERT(fb);
+ LTRACEF("display_get_framebuffer %p\n", fb);
+
+ fb->image.pixels = (void *)framebuffer;
+ fb->image.format = IMAGE_FORMAT_RGB_2220;
+ fb->image.width = M4DISPLAY_WIDTH;
+ fb->image.height = M4DISPLAY_HEIGHT;
+ fb->image.stride = M4DISPLAY_WIDTH;
+ fb->image.rowbytes = M4DISPLAY_WIDTH;
+ fb->flush = s4lcd_flush;
+ fb->format = DISPLAY_FORMAT_UNKNOWN; //TODO
+
+ return NO_ERROR;
+}
+
status_t display_get_info(struct display_info *info)
{
+ DEBUG_ASSERT(info);
LTRACEF("display_info %p\n", info);
- info->framebuffer = (void *)framebuffer;
- info->format = GFX_FORMAT_RGB_2220;
+ info->format = DISPLAY_FORMAT_UNKNOWN; //TODO
info->width = M4DISPLAY_WIDTH;
info->height = M4DISPLAY_HEIGHT;
- info->stride = M4DISPLAY_WIDTH;
- info->flush = s4lcd_flush;
return NO_ERROR;
}
« no previous file with comments | « target/dartuinoP0/memory_lcd.c ('k') | target/stm32746g-eval2/lcd.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698