New vRAM Helper Allows Sharing TTM Implementation Between Linux Frame-Buffer Drivers
A patch series being worked on by Thomas Zimmermann of SUSE allows sharing the TTM memory management implementation between Linux's different DRM frame-buffer drivers.
The implementation allows for generic video memory management code for these simple DRM frame-buffer drivers, assuming those drivers/devices have dedicated video memory. This shared implementation helps reduce the maintenance burden of the drivers while lightening up the individual code-bases.
With this patch series introducing these TTM vRAM helpers and hooking some drivers into using it, there is already showing the code size benefits thanks to sharing the implementation: 1,445 lines of code being added while losing 2,231 lines of code. Obviously as more frame-buffer drivers use this shared implementation, the L.O.C. delta will only improve.
The frame-buffer drivers making use of this shared TTM implementation as part of the initial patch series are AST, Bochs, Mgag200, Vboxvideo and HiSilicon/hibmc. This shouldn't have any performance implications with the TTM memory management approach being the same as previously was employed individually by these drivers, just now it's being positioned into shared code.
More details via this patch series.
The implementation allows for generic video memory management code for these simple DRM frame-buffer drivers, assuming those drivers/devices have dedicated video memory. This shared implementation helps reduce the maintenance burden of the drivers while lightening up the individual code-bases.
With this patch series introducing these TTM vRAM helpers and hooking some drivers into using it, there is already showing the code size benefits thanks to sharing the implementation: 1,445 lines of code being added while losing 2,231 lines of code. Obviously as more frame-buffer drivers use this shared implementation, the L.O.C. delta will only improve.
The frame-buffer drivers making use of this shared TTM implementation as part of the initial patch series are AST, Bochs, Mgag200, Vboxvideo and HiSilicon/hibmc. This shouldn't have any performance implications with the TTM memory management approach being the same as previously was employed individually by these drivers, just now it's being positioned into shared code.
More details via this patch series.
Add A Comment