Feature #1794

Feature #1539: Graphics acceleration

Feature #1491: Hardware-specific graphics acceleration

Use free hardware composer for smdk4412 devices

Added by Wolfgang Wiedmeyer over 1 year ago. Updated 1 day ago.

Target version:
Start date:
Due date:
% Done:




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 drivers/video/samsung.

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.


#1 Updated by Joonas Kylmälä 5 days ago

  • Assignee set to Joonas Kylmälä

I'm researching whether drm_hwcomposer works on smdk4412 devices. Now I'm stuck for a while because there is no generic gralloc module that could be used with software renderers.

#2 Updated by Joonas Kylmälä 5 days ago

I'm trying to make now the default gralloc ( conform to the gralloc_handle_t struct defined here: 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ä 1 day 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".

Also available in: Atom PDF