Javi Ferrer developed a free hardware composer for Exynos 4. It is part of NamelessRom:
Other Gralloc-related commits might be needed as well.
The implementation depends on a change in the smdk4412 kernel:
Furthermore, the NamelessRom smdk4412 kernel was rebased on the Note 2 kernel sources. This rebase was not done for the LineageOS kernel and thus is not included in the Replicant kernel. It needs to be investigated if the required changes can be backported, at least for the Samsung video drivers in
The free hardware composer is also not yet part of LineageOS. Development on their part can be tracked on their Gerrit, e.g.:
Replicant 6.0 currently does not make use of FIMG, Replicant 4.2 has some code in skia:
A newer skia commit to make use of FIMG2D:
Integrating these hardware composer changes could make it possible to use the integrated 2D graphics unit (FIMG2D) for compositing which could improve graphics speed significantly on Replicant. It should work at least on the Galaxy S 3 and Note 2, but it should be possible to make it work for the Galaxy S 2 and Note, too.
#2 Updated by Joonas Kylmälä 3 months ago
I'm trying to make now the default gralloc (https://android.googlesource.com/platform/hardware/libhardware/+/master/modules/gralloc/) conform to the gralloc_handle_t struct defined here: https://cgit.freedesktop.org/mesa/drm/tree/android/gralloc_handle.h. The gralloc_handle_t struct is expected by the drm_hwcomposer module's generic buffer importer code.
If that doesn't work out I could still try modifying the gbm_gralloc or minigbm modules.
#3 Updated by Joonas Kylmälä 3 months ago
So I got the drm_hwcomposer to be friends with the default gralloc but the DRM subsystem doesn't like ashmem allocated buffer handles so it didn't work out :/ I'm not quite sure about this but it feels like to me that the DRM subsystem expects a buffer handle that is actually pointing to some memory location in a DRM device like gpu0 or fb0 because when I tried to make a "dumb buffer" to the ashmem file descriptor with "drmIoctl(fd, DRM_IOCTL_MODE_CREATE_DUMB, &creq);" it said that it was not a permitted operation, i.e. there is no DRM_IOCTL_MODE_CREATE_DUMB on the "ashmem device".