OSDN Git Service

drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m
authorMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 11 Sep 2018 11:33:25 +0000 (13:33 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Wed, 12 Sep 2018 12:50:34 +0000 (14:50 +0200)
commit185e0bebb44fc1e8978fabac1267c27fbcd16ee2
tree102e56110893f81434d1aa90efc06aca2d34de9c
parentbf8744e40cd6db20dfbd231ad44943f6bc8ac311
drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m

Having DRM_SUN4I built-in but DRM_SUN8I_MIXER as a loadable module results in
a link error, as we try to access a symbol from the sun8i_tcon_top.ko module:

ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined!
ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined!
ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] undefined!

This solves the problem by adding a silent symbol for the tcon_top module,
building it as a separate module in exactly the cases that we need it,
but in a way that it is reachable by the other modules.

Fixes: cf77d79b4e29 ("drm/sun4i: tcon: Add another way for matching mixers with tcon")
Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Matt Hart <matthew.hart@linaro.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180911113325.11024-1-maxime.ripard@bootlin.com
drivers/gpu/drm/sun4i/sun4i_tcon.c