Apply sunxi FB switching patch only to default branch

This commit is contained in:
zador-blood-stained 2017-01-31 19:21:09 +03:00
parent 586537468b
commit 36ae17dd59
3 changed files with 33 additions and 6 deletions

View File

@ -75,7 +75,7 @@ compile_uboot()
(cd $SOURCES/$BOOTSOURCEDIR; make clean > /dev/null 2>&1)
fi
[[ $FORCE_CHECKOUT == yes ]] && advanced_patch "u-boot" "$BOOTPATCHDIR" "$BOARD" "$target_patchdir" "${LINUXFAMILY}-${BOARD}-${BRANCH}"
[[ $FORCE_CHECKOUT == yes ]] && advanced_patch "u-boot" "$BOOTPATCHDIR" "$BOARD" "$target_patchdir" "$BRANCH" "${LINUXFAMILY}-${BOARD}-${BRANCH}"
# create patch for manual source changes
[[ $CREATE_PATCHES == yes ]] && userpatch_create "u-boot"
@ -190,7 +190,7 @@ compile_kernel()
[[ $FORCE_CHECKOUT == yes ]] && patch --batch --silent -t -p1 < $SRC/lib/patch/kernel/compiler.patch >> $DEST/debug/output.log 2>&1
fi
[[ $FORCE_CHECKOUT == yes ]] && advanced_patch "kernel" "$LINUXFAMILY-$BRANCH" "$BOARD" "" "$LINUXFAMILY-$BRANCH"
[[ $FORCE_CHECKOUT == yes ]] && advanced_patch "kernel" "$LINUXFAMILY-$BRANCH" "$BOARD" "" "$BRANCH" "$LINUXFAMILY-$BRANCH"
# create patch for manual source changes in debug mode
[[ $CREATE_PATCHES == yes ]] && userpatch_create "kernel"
@ -331,7 +331,7 @@ find_toolchain()
echo "$toolchain"
}
# advanced_patch <dest> <family> <board> <target> <description>
# advanced_patch <dest> <family> <board> <target> <branch> <description>
#
# parameters:
# <dest>: u-boot, kernel
@ -343,9 +343,11 @@ find_toolchain()
# priority:
# $SRC/userpatches/<dest>/<family>/target_<target>
# $SRC/userpatches/<dest>/<family>/board_<board>
# $SRC/userpatches/<dest>/<family>/branch_<branch>
# $SRC/userpatches/<dest>/<family>
# $SRC/lib/patch/<dest>/<family>/target_<target>
# $SRC/lib/patch/<dest>/<family>/board_<board>
# $SRC/lib/patch/<dest>/<family>/branch_<branch>
# $SRC/lib/patch/<dest>/<family>
#
advanced_patch()
@ -354,7 +356,8 @@ advanced_patch()
local family=$2
local board=$3
local target=$4
local description=$5
local branch=$5
local description=$6
display_alert "Started patching process for" "$dest $description" "info"
display_alert "Looking for user patches in" "userpatches/$dest/$family" "info"
@ -363,9 +366,11 @@ advanced_patch()
local dirs=(
"$SRC/userpatches/$dest/$family/target_${target}:[\e[33mu\e[0m][\e[34mt\e[0m]"
"$SRC/userpatches/$dest/$family/board_${board}:[\e[33mu\e[0m][\e[35mb\e[0m]"
"$SRC/userpatches/$dest/$family/branch_${branch}:[\e[33mu\e[0m][\e[33mb\e[0m]"
"$SRC/userpatches/$dest/$family:[\e[33mu\e[0m][\e[32mc\e[0m]"
"$SRC/lib/patch/$dest/$family/target_${target}:[\e[32ml\e[0m][\e[34mt\e[0m]"
"$SRC/lib/patch/$dest/$family/board_${board}:[\e[32ml\e[0m][\e[35mb\e[0m]"
"$SRC/lib/patch/$dest/$family/branch_${branch}:[\e[32ml\e[0m][\e[33mb\e[0m]"
"$SRC/lib/patch/$dest/$family:[\e[32ml\e[0m][\e[32mc\e[0m]"
)

View File

@ -0,0 +1,22 @@
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;

View File

@ -703,7 +703,6 @@ index 0000000..db376d9
+#include <asm/io.h>
+#include <errno.h>
+#include <fdt_support.h>
+#include <malloc.h>
+#include <video_fb.h>
+#include "videomodes.h"
+
@ -1626,7 +1625,8 @@ index 0000000..db376d9
+ sunxi_get_mon_desc(sunxi_display.monitor),
+ overscan_x, overscan_y);
+
+ gd->fb_base = (unsigned long)memalign(0x1000, sunxi_display.fb_size);
+ gd->fb_base = gd->bd->bi_dram[0].start +
+ gd->bd->bi_dram[0].size - sunxi_display.fb_size;
+ sunxi_engines_init();
+
+ fb_dma_addr = gd->fb_base;