[PATCH 3/6] drm/imx: Build monolithic driver

Thierry Reding thierry.reding at gmail.com
Fri Sep 25 05:17:35 PDT 2015


On Fri, Sep 25, 2015 at 09:16:06AM +0200, Philipp Zabel wrote:
> Hi Thierry,
> 
> Am Donnerstag, den 24.09.2015, 19:02 +0200 schrieb Thierry Reding:
> > From: Thierry Reding <treding at nvidia.com>
> > 
> > There's no use building the individual drivers as separate modules
> > because they are all only useful if combined into a single DRM/KMS
> > device.
> 
> Why not? On an i.MX5 device with VGA(tve) output only, it is nice not to
> have to load the i.MX6 HDMI driver.

I think you gain much less by splitting up than you realize. Compare
this from before the series:

	$ du -ch drivers/gpu/drm/imx/*.ko
	8.0K    drivers/gpu/drm/imx/dw_hdmi-imx.ko
	16K     drivers/gpu/drm/imx/imxdrm.ko
	16K     drivers/gpu/drm/imx/imx-ipuv3-crtc.ko
	12K     drivers/gpu/drm/imx/imx-ldb.ko
	12K     drivers/gpu/drm/imx/imx-tve.ko
	8.0K    drivers/gpu/drm/imx/parallel-display.ko
	72K     total

	$ du -ch drivers/gpu/drm/sti/*.ko
	36K     drivers/gpu/drm/sti/sticompositor.ko
	12K     drivers/gpu/drm/sti/sti_drv.ko
	16K     drivers/gpu/drm/sti/stidvo.ko
	16K     drivers/gpu/drm/sti/sti_hda.ko
	24K     drivers/gpu/drm/sti/stihdmi.ko
	8.0K    drivers/gpu/drm/sti/sti_hqvdp.ko
	12K     drivers/gpu/drm/sti/sti_tvout.ko
	8.0K    drivers/gpu/drm/sti/sti_vtac.ko
	8.0K    drivers/gpu/drm/sti/sti_vtg.ko
	140K    total

with this after the series:

	$ du -ch drivers/gpu/drm/imx/*.ko
	44K     drivers/gpu/drm/imx/imx-drm.ko
	44K     total

	$ du -ch drivers/gpu/drm/sti/*.ko
	92K     drivers/gpu/drm/sti/sti-drm.ko
	92K     total

There are other things to consider as well, such as the additional
memory overhead caused by merely having multiple modules, or all of the
exported functions that unnecessarily clutter up the symbol table, and
which end up slowing down every symbol lookup.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150925/c0712def/attachment.sig>


More information about the dri-devel mailing list