armbian-build/patch/u-boot/u-boot-sunxi/branch_default/u-boot-fix-screen-switch.patch
2017-01-31 19:21:52 +03:00

23 lines
731 B
Diff

diff --git a/drivers/video/sunxi_display2.c b/drivers/video/sunxi_display2.c
index db376d993..b64bd3648 100644
--- a/drivers/video/sunxi_display2.c
+++ b/drivers/video/sunxi_display2.c
@@ -25,6 +25,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <errno.h>
+#include <malloc.h>
#include <fdt_support.h>
#include <video_fb.h>
#include "videomodes.h"
@@ -948,8 +949,7 @@ void *video_hw_init(void)
sunxi_get_mon_desc(sunxi_display.monitor),
overscan_x, overscan_y);
- gd->fb_base = gd->bd->bi_dram[0].start +
- gd->bd->bi_dram[0].size - sunxi_display.fb_size;
+ gd->fb_base = (unsigned long)memalign(0x1000, sunxi_display.fb_size);
sunxi_engines_init();
fb_dma_addr = gd->fb_base;