Skip to content

Commit 7c5c265

Browse files
committed
enable the CONFIG_MALI_MIDGARD_FOR_LINUX config and fixed kernel panic after enable this feature
Change-Id: I44b6aa9cfd154ff9b6803b7c33c4c83b81b394ae Reviewed-on: https://tp-biosrd-v02/gerrit/80173 Reviewed-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com> Tested-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com>
1 parent d351970 commit 7c5c265

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

arch/arm/boot/dts/rk3288.dtsi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,9 @@
15631563
upthreshold = <75>;
15641564
downdifferential = <10>;
15651565

1566+
cpu-limit-freq = <1416000>;
1567+
gpu-limit-freq = <600000>;
1568+
15661569
gpu_power_model: power_model {
15671570
compatible = "arm,mali-simple-power-model";
15681571
voltage = <950>;

arch/arm/configs/miniarm-rk3288_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ CONFIG_DRM_PANEL_TOSHIBA_TC358762=y
518518
CONFIG_DRM_DW_HDMI_I2S_AUDIO=y
519519
CONFIG_MALI_MIDGARD=y
520520
CONFIG_MALI_DEVFREQ=y
521+
CONFIG_MALI_MIDGARD_FOR_LINUX=y
521522
CONFIG_MALI_EXPERT=y
522523
CONFIG_MALI_PLATFORM_THIRDPARTY=y
523524
CONFIG_MALI_PLATFORM_THIRDPARTY_NAME="rk"

drivers/gpu/arm/midgard_for_linux/mali_kbase_core_linux.c

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3026,6 +3026,9 @@ static int power_control_init(struct platform_device *pdev)
30263026
goto fail;
30273027
}
30283028
}
3029+
kbdev->freq = 0;
3030+
mutex_init(&kbdev->mutex_for_clk);
3031+
kbdev->is_power_off = false;
30293032

30303033
#if defined(CONFIG_OF) && defined(CONFIG_PM_OPP)
30313034
/* Register the OPPs if they are available in device tree */

0 commit comments

Comments
 (0)