MALI and CONFIG_SYNC ( sync_fence_cancel_async )
Talking about Omegamoon's codebase (but with backported drivers folder from my previous one)Once MALI is configured in as:
CONFIG_DRM=m
CONFIG_DRM_MALI=m
# CONFIG_ION is not set
CONFIG_MALI=y
CONFIG_MALI400=m
# CONFIG_MALI400_DEBUG is not set
# CONFIG_MALI400_PROFILING is not set
CONFIG_MALI400_UMP=y
CONFIG_UMP=m
# CONFIG_UMP_DEBUG is not set
And /include/drm/drm.h is backported to rk3x's version, that is, the first:
#if defined(__linux__)
becomes:
#if defined(__KERNEL__) || defined(__linux__)
Then compiling throws this new error:
drivers/gpu/mali/mali/common/mali_kernel_core.c:1084:4: error: implicit declaration of function 'sync_fence_cancel_async'
That function is called because now CONFIG_SYNC is forced by PLAT_RK and should be implemented in /drivers/base/sync.c (see http://lists.linaro.org/pipermail/linaro-mm-sig/2012-June/002050.html) but it's missing.
Hence, since MALI has worked without CONFIG_SYNC and a quick grep of the codebase shows it's the only driver talking about CONFIG_SYNC, my fix for this is removing the dependence with PLAT_RK by going to /arch/arm/Kconfig
and in the config for PLAT_RK commenting the following lines:
# select SYNC
# select SW_SYNC
# select SW_SYNC_USER
and then in the .config removing:
CONFIG_SYNC=y
CONFIG_SW_SYNC=y
CONFIG_SW_SYNC_USER=y
Also had to add this line at the top of /drivers/video/rockchip/rk_fb.c due to missing references to 'GET_UMP_SECURE_ID_BUF2':
#include "mali_def.h"
Would this kernel work with the Android images too, or it's limited to PicUntu only?
ReplyDeleteI've got an RK3188 stick (quite similar to the MK802IV or MK809III, but some different chips such as the WiFi was changed to a BroadCom one), and right now I'm running a custom firmware with 1080p enabled, but as it has different chips, I would need to recompile the kernel (pain in the ass it is when someone changes the stock configuration, I know). And so far only your code is online, so I suppose this was used in the NeoTV ROMs by Neomode.
I think so, but I can't answer for it since I ignore all about Android development. Sorry!
DeleteSo you did not disable any Android support, or enabled Linux support that would break the former? Any way, gonna test your zImage to see if it boots or not!
DeleteI wish I could find Neomode's kernel sources...
Any way, thanks for the info, and for the hard work too!
I have the new kernel compiled for rk3066 (mk808b), but mali(opengl ES) does not work ...? :(
ReplyDeleteHi M. Galland :) Working with your kernels for a few days now (https://github.com/Galland/Linux3188.git). And it works pretty well: my cs918 runs a very decent picuntu @ 1080p. But do have any clue on why the kernel hangs (very early) during boot when mali/ump drivers are activated in the .config (no hdmi activity nor usb powering up) ? Is Mali a dead-end on Linux/RK3188 for the time being ? Best regards from France.
ReplyDeleteCorrect, no Mali on RK3188 Linux at the time. You should disable it in the .config file
Delete