My Schematic

download schematic

Support

Jumat, 14 Juni 2013

Linux on RK3188 work in progress

Please note this is not a blog post, it's a my personal pastebin where I can put in writing to myself and other fellow developers the small things I find in the latest 3.0.36 kernel that supports rk3188 devices.



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"


Tidak ada komentar:

Posting Komentar