[PORT FROM R2] FB: Workaround for demo
authorBenoit Romieu <benoit.romieu@intel.com>
Fri, 27 Jan 2012 12:35:34 +0000 (13:35 +0100)
committerbuildbot <buildbot@intel.com>
Mon, 30 Jan 2012 19:55:41 +0000 (11:55 -0800)
BZ: 16563

Borqs-Id: 62317bd238851b553de03f8630b233081a312f39
Borqs-Contact: b094 <leo.he@borqs.com>
Commit-Date: Sun Sep 18 15:40:12 PDT 2011

borqsbtx: 5085

At IAFW side, the framebuffer resolution is 608x1024, but the scrren
size is 600x1024, IAFW draw logo framebuffer centered, not scrren
centered, so we need this 4-pixels shift workaround to make sure
linux draw logo at the same posotion with IAFW.
This workaround just for demo, should be removed when IAFW fix the issue

Change-Id: Ie28e5905386fefa52259402af23c9e92c06f5f3c
Orig-Change-Id: I9ff6864021dfb567262d58826e0b793487195a51
Signed-off-by: Leo He <leo.he@borqs.com>
Reviewed-on: http://android.intel.com:8080/33070
Reviewed-by: Chotard, Celine <celine.chotard@intel.com>
Tested-by: Chotard, Celine <celine.chotard@intel.com>
Reviewed-by: Yang, Fei <fei.yang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/video/fbmem.c

index 864647b..1b0a6ea 100644 (file)
@@ -494,7 +494,15 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
        }
 
 #ifdef CONFIG_LOGO_CENTERED
-       image.dx = (info->var.xres - (n * logo->width)) / 2;
+        /*
+          At IAFW side, the framebuffer resolution is 608x1024, but the scrren
+          size is 600x1024, IAFW draw logo framebuffer centered, not scrren
+          centered, so we need this 4-pixels shift workaround to make sure
+          linux draw logo at the same posotion with IAFW.
+          This workaround just for demo, should be removed when IAFW fix the issue.
+        */
+       #define LOGO_SHIFT 4
+       image.dx = LOGO_SHIFT + (info->var.xres - (n * logo->width)) / 2;
        image.dy = (info->var.yres - logo->height) / 2;
 #else
        image.dx = 0;