app: aboot: fallback to default logo if resolution mismatch

Currently if splash partition logo resolution is not equal to fb
resolution, then logo is copied first to a memory not allocated to
display and then copied back to splash buffer.

This fix is to copy the image directly to the splash buffer.

Change-Id: Ic9d1de80dea684ae1a531b21b6cce6a2f215e8f6
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 41c05ef..5e3c88b 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -2080,16 +2080,16 @@
 
 	fb_display = fbcon_display();
 	if (fb_display) {
-		uint8_t *base = (uint8_t *) fb_display->base;
-		if (logo->header.width != fb_display->width || logo->header.height != fb_display->height) {
-				base += LOGO_IMG_OFFSET;
+		if ((logo->header.width != fb_display->width) || (logo->header.height != fb_display->height)) {
+			dprintf(CRITICAL, "Logo config doesn't match with fb config. Fall back to default logo\n");
+			return NULL;
 		}
-
+		uint8_t *base = (uint8_t *) fb_display->base;
 		if (flash_read(ptn + sizeof(logo->header), 0,
 			base,
 			((((logo->header.width * logo->header.height * fb_display->bpp/8) + 511) >> 9) << 9))) {
 			fbcon_clear();
-			dprintf(CRITICAL, "ERROR: Cannot read splash image\n");
+			dprintf(CRITICAL, "ERROR: Cannot read splash image from partition\n");
 			return NULL;
 		}
 		logo->image = base;
@@ -2129,15 +2129,16 @@
 
 	fb_display = fbcon_display();
 	if (fb_display) {
+		if ((logo->header.width != fb_display->width) || (logo->header.height != fb_display->height)) {
+			dprintf(CRITICAL, "Logo config doesn't match with fb config. Fall back default logo\n");
+			return NULL;
+		}
 		uint8_t *base = (uint8_t *) fb_display->base;
-		if (logo->header.width != fb_display->width || logo->header.height != fb_display->height)
-				base += LOGO_IMG_OFFSET;
-
 		if (mmc_read(ptn + sizeof(logo->header),
 			base,
 			((((logo->header.width * logo->header.height * fb_display->bpp/8) + 511) >> 9) << 9))) {
 			fbcon_clear();
-			dprintf(CRITICAL, "ERROR: Cannot read splash image\n");
+			dprintf(CRITICAL, "ERROR: Cannot read splash image from partition\n");
 			return NULL;
 		}