From 2d462ec749b87965b1b5b28d0add05f890db8653 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Fri, 4 Jun 2021 19:03:04 +0800 Subject: [PATCH] tune fbcon code for r8181 --- src/newgal/fbcon/fbvideo.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/newgal/fbcon/fbvideo.c b/src/newgal/fbcon/fbvideo.c index f2323a72..9746c10e 100644 --- a/src/newgal/fbcon/fbvideo.c +++ b/src/newgal/fbcon/fbvideo.c @@ -358,6 +358,14 @@ static int FB_VideoInit(_THIS, GAL_PixelFormat *vformat) int i; const char *GAL_fbdev; +#if defined(__TARGET_R818__) && defined(_MGSCHEMA_COMPOSITING) + if (!mgIsServer) { + vformat->BitsPerPixel = 32; + vformat->BytesPerPixel = 4; + return 0; + } +#endif + /* Initialize the library */ GAL_fbdev = getenv("FRAMEBUFFER"); if (GAL_fbdev == NULL) { @@ -1017,8 +1025,12 @@ static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request, static int FB_AllocHWSurface (_THIS, GAL_Surface *surface) { +#if defined(__TARGET_R818__) && defined(_MGSCHEMA_COMPOSITING) + return -1; +#else REQ_HWSURFACE request = {surface->w, surface->h, surface->pitch, 0, NULL}; REP_HWSURFACE reply = {0, 0, NULL}; +#endif #ifdef _MGRM_PROCESSES if (mgIsServer) @@ -1242,6 +1254,12 @@ static int FB_SetColors(_THIS, int firstcolor, int ncolors, GAL_Color *colors) */ static void FB_VideoQuit(_THIS) { +#if defined(__TARGET_R818__) && defined(_MGSCHEMA_COMPOSITING) + if (!mgIsServer) { + return; + } +#endif + #ifdef _MGRM_PROCESSES if (mgIsServer && this->screen) { #else