build.sh
.. .. @@ -11,11 +11,11 @@ 11 11 ./build.sh 12 12 cd - 13 13 14 - cd android15 - . ./build/envsetup.sh16 - lunch ceres_c3-userdebug17 - extract-bsp && pack18 - cd -14 + #cd android15 + #. ./build/envsetup.sh16 + #lunch ceres_c3-userdebug17 + #extract-bsp && pack18 + #cd -19 19 fi 20 20 21 21 if [ x"$1" == "xa" ] ;then .. .. @@ -23,6 +23,7 @@ 23 23 . ./build/envsetup.sh 24 24 lunch ceres_c3-userdebug 25 25 extract-bsp 26 + make installclean26 27 make BUILD_NUMBER=ido-a133 -j10 && pack 27 28 # make -j10 && pack -v 28 29 cd - longan/kernel/linux-4.9/modules/gpu/img-rgx/android/rogue_km/build/linux/config/compiler.mk
.. .. @@ -180,7 +180,7 @@ 180 180 _kernel_cross_compile := $(if $(filter undef,$(KERNEL_CROSS_COMPILE)),,$(KERNEL_CROSS_COMPILE)) 181 181 # We can take shortcuts with KERNEL_CROSS_COMPILE, as we don't want to 182 182 # respect CC and we don't support clang in that part currently. 183 - _kernel_cross_compile := $(_kernel_cross_compile)183 + _kernel_cross_compile := $(_kernel_cross_compile)gcc184 184 # Then check the compiler. 185 185 $(eval $(call calculate-compiler-preferred-target,target,$(_kernel_cross_compile))) 186 186 $(eval $(call include-compiler-file,$(target_compiler_preferred_target))) .. .. @@ -239,7 +239,7 @@ 239 239 $(warning $(space)$(space)KERNEL_CROSS_COMPILE=$(KERNEL_CROSS_COMPILE)) 240 240 $(warning $(space)$(space)$(space)builds for $(_kernel_primary_arch)) 241 241 $(warning ********************************************************) 242 - $(warning Mismatching kernel and user-mode cross compilers)242 + $(error Mismatching kernel and user-mode cross compilers)243 243 endif 244 244 endif 245 245 longan/kernel/linux-4.9/modules/gpu/img-rgx/android/rogue_km/build/linux/kbuild/kbuild.mk
.. .. @@ -68,10 +68,10 @@ 68 68 INTERNAL_EXTRA_KBUILD_OBJECTS="$(INTERNAL_EXTRA_KBUILD_OBJECTS)" \ 69 69 BRIDGE_SOURCE_ROOT=$(abspath $(BRIDGE_SOURCE_ROOT)) \ 70 70 TARGET_PRIMARY_ARCH=$(TARGET_PRIMARY_ARCH) \ 71 - CLANG_TRIPLE="$(CLANG_TRIPLE)" \72 - CROSS_COMPILE="$(CROSS_COMPILE)" \71 + CLANG_TRIPLE=$(patsubst %-android,%-gnu,$(CROSS_TRIPLE))- \72 + CROSS_COMPILE="$(CCACHE) $(KERNEL_CROSS_COMPILE)" \73 73 EXTRA_CFLAGS="$(ALL_KBUILD_CFLAGS)" \ 74 - CC=$(if $(KERNEL_CC),$(KERNEL_CC),$(KERNEL_CROSS_COMPILE)) \74 + CC=$(if $(KERNEL_CC),$(KERNEL_CC),$(KERNEL_CROSS_COMPILE)gcc) \75 75 CHECK="$(patsubst @%,%,$(CHECK))" $(if $(CHECK),C=1,) \ 76 76 V=$(V) W=$(W) TOP=$(TOP) 77 77 @for kernel_module in $(addprefix $(TARGET_PRIMARY_OUT)/kbuild/,$(INTERNAL_KBUILD_OBJECTS:.o=.ko)); do \ longan/kernel/linux-4.9/modules/gpu/img-rgx/android/rogue_km/build/linux/sunxi_android/Makefile
.. .. @@ -41,7 +41,7 @@ 41 41 export MULTIARCH=64only 42 42 export EXCLUDED_APIS=opencl opengl vulkan cldnn imgdnn 43 43 export USE_CLANG:=0 44 -#export V := 144 +45 45 # If a TARGET_PRODUCT is specified but not a TARGET_DEVICE, try to 46 46 # derive the TARGET_DEVICE from TARGET_PRODUCT. 47 47 # .. .. @@ -68,10 +68,8 @@ 68 68 69 69 include ../common/android/arch.mk 70 70 include ../common/android/features.mk 71 -ifneq ($(origin CC),undefined)72 -KERNEL_CC :=$(CC)73 -endif74 -$(info $(KERNEL_CC) == $(CC))71 +72 +KERNEL_CROSS_COMPILE := $(CROSS_COMPILE)75 73 PVR_ANDROID_COMPOSERHAL := null 76 74 77 75 PDUMP_STREAMBUF_SIZE_MB := 10 longan/kernel/linux-4.9/modules/gpu/img-rgx/android/rogue_km/services/system/rgx_sunxi/platform.h
.. .. @@ -63,7 +63,6 @@ 63 63 PVRSRV_DEVICE_CONFIG *config; 64 64 }; 65 65 66 -bool sunxi_ic_version_ctrl(struct device *dev);67 66 int sunxi_platform_init(struct device *dev); 68 67 void sunxi_platform_term(void); 69 68 void sunxiSetFrequencyDVFS(IMG_UINT32 *ui32Frequency); longan/kernel/linux-4.9/modules/gpu/img-rgx/android/rogue_km/services/system/rgx_sunxi/sunxi_platform.c
.. .. @@ -590,50 +590,6 @@ 590 590 } 591 591 #endif /* CONFIG_DEBUG_FS */ 592 592 593 -static inline int sunxi_get_ic_version(struct device *dev, char *version)594 -{595 -#define SYS_CFG_BASE 0x03000000596 -#define VER_REG_OFFS 0x00000024597 - void __iomem *io = NULL;598 - static char ver = 0xff;599 - /* IC version:600 - * A/B/C: 0601 - * D: 3602 - * E: 4603 - * F: 5604 - * 6/7/1/2 to be used in future.605 - */606 - *version = 0;607 - if (ver == 0xff) {608 - io = ioremap(SYS_CFG_BASE, 0x100);609 - if (io == NULL) {610 - dev_err(dev, "ioremap of sys_cfg register failed!\n");611 - return -1;612 - }613 - *version = (char)(readl(io + VER_REG_OFFS) & 0x7);614 - iounmap(io);615 - ver = *version;616 - } else {617 - *version = ver;618 - }619 - return 0;620 -}621 -622 -bool sunxi_ic_version_ctrl(struct device *dev)623 -{624 - char ic_version = 0;625 - sunxi_get_ic_version(dev, &ic_version);626 - /*627 - * The flow of jtag reset before gpu reset will cause MIPS crash, so we628 - * will put the domainA, domainB and gpu reset operations to boot0 stage.629 - * And in kernel stage, we will always keep domainA poweron.630 - */631 - if (ic_version == 0 || ic_version == 3 || ic_version == 4 || ic_version == 5)632 - return false;633 - return true;634 -}635 -636 -637 593 int sunxi_platform_init(struct device *dev) 638 594 { 639 595 #if defined(CONFIG_OF) .. .. @@ -641,7 +597,7 @@ 641 597 struct platform_device *pdev = to_platform_device(dev); 642 598 #endif /* defined(CONFIG_OF) */ 643 599 unsigned int val, volt_val = 0; 644 - char ic_version = 0;600 +645 601 sunxi_data = (struct sunxi_platform *)kzalloc(sizeof(struct sunxi_platform), GFP_KERNEL); 646 602 if (!sunxi_data) { 647 603 dev_err(dev, "failed to get kzalloc sunxi_platform"); .. .. @@ -678,20 +634,11 @@ 678 634 sunxi_data->power_idle = 1; 679 635 sunxi_data->dvfs = 1; 680 636 sunxi_data->independent_power = 0; 681 - sunxi_data->soft_mode = 0;637 + sunxi_data->soft_mode = 1;682 638 683 639 parse_dts(dev, sunxi_data); 684 640 if (!sunxi_data->independent_power) 685 641 sunxi_data->dvfs = 0; 686 - sunxi_get_ic_version(dev, &ic_version);687 - dev_info(dev, "IC version: 0x%08x \n", ic_version);688 -689 - if (!sunxi_ic_version_ctrl(dev)) {690 - sunxi_data->power_idle = 0;691 - sunxi_data->soft_mode = 1;692 - } else {693 - sunxi_data->soft_mode = 0;694 - }695 642 696 643 sunxi_decide_pll(sunxi_data); 697 644 spin_lock_init(&sunxi_data->lock); .. .. @@ -720,7 +667,6 @@ 720 667 sunxi_data->power_idle = 0; 721 668 regulator_set_voltage(sunxi_data->regula, 900000, 900000); 722 669 #endif 723 -724 670 init_waitqueue_head(&dvfs_wq); 725 671 726 672 dev_info(dev, "idle:%d dvfs:%d power:%d %s mode:%d volt:%u core:%lu\n", longan/kernel/linux-4.9/modules/gpu/img-rgx/android/rogue_km/services/system/rgx_sunxi/sysconfig.c
.. .. @@ -144,11 +144,7 @@ 144 144 * Setup RGX specific timing data 145 145 */ 146 146 gsRGXTimingInfo.ui32CoreClockSpeed = clk_get_rate(sunxi_data->clks.core); 147 - if (sunxi_ic_version_ctrl(dev)) {148 - gsRGXTimingInfo.bEnableActivePM = IMG_TRUE;149 - } else {150 - gsRGXTimingInfo.bEnableActivePM = IMG_FALSE;151 - }147 + gsRGXTimingInfo.bEnableActivePM = IMG_FALSE;152 148 gsRGXTimingInfo.bEnableRDPowIsland = IMG_TRUE; 153 149 gsRGXTimingInfo.ui32ActivePMLatencyms = SYS_RGX_ACTIVE_POWER_LATENCY_MS; 154 150