When the base sun4i DRM driver is built-in but the back-end is a loadable module, we run into a link error: drivers/gpu/drm/sun4i/sun4i_drv.o: In function `sun4i_drv_probe': sun4i_drv.c:(.text+0x60c): undefined reference to `sun4i_frontend_of_table' The dependency is a bit tricky, the best workaround I have come up with is to use a Makefile hack to to interpret both CONFIG_DRM_SUN4I_BACKEND=m and CONFIG_DRM_SUN4I_BACKEND=y as a directive to build the front-end the same way as the main module. Fixes: dd0421f47505 ("drm/sun4i: Add a driver for the display frontend") Link: https://lore.kernel.org/lkml/20180301091908.zcptz3ezqr2c6ly5@flea/ Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180706142847.2032381-1-arnd@arndb.de
43 lines
1.3 KiB
Makefile
43 lines
1.3 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
sun4i-backend-y += sun4i_backend.o sun4i_layer.o
|
|
sun4i-frontend-y += sun4i_frontend.o
|
|
|
|
sun4i-drm-y += sun4i_drv.o
|
|
sun4i-drm-y += sun4i_framebuffer.o
|
|
|
|
sun4i-drm-hdmi-y += sun4i_hdmi_ddc_clk.o
|
|
sun4i-drm-hdmi-y += sun4i_hdmi_enc.o
|
|
sun4i-drm-hdmi-y += sun4i_hdmi_i2c.o
|
|
sun4i-drm-hdmi-y += sun4i_hdmi_tmds_clk.o
|
|
|
|
sun8i-drm-hdmi-y += sun8i_dw_hdmi.o
|
|
sun8i-drm-hdmi-y += sun8i_hdmi_phy.o
|
|
sun8i-drm-hdmi-y += sun8i_hdmi_phy_clk.o
|
|
|
|
sun8i-mixer-y += sun8i_mixer.o sun8i_ui_layer.o \
|
|
sun8i_vi_layer.o sun8i_ui_scaler.o \
|
|
sun8i_vi_scaler.o sun8i_csc.o
|
|
|
|
sun4i-tcon-y += sun4i_crtc.o
|
|
sun4i-tcon-y += sun4i_dotclock.o
|
|
sun4i-tcon-y += sun4i_lvds.o
|
|
sun4i-tcon-y += sun4i_tcon.o
|
|
sun4i-tcon-y += sun4i_rgb.o
|
|
|
|
sun6i-dsi-y += sun6i_mipi_dphy.o
|
|
sun6i-dsi-y += sun6i_mipi_dsi.o
|
|
|
|
obj-$(CONFIG_DRM_SUN4I) += sun4i-drm.o
|
|
obj-$(CONFIG_DRM_SUN4I) += sun4i-tcon.o
|
|
obj-$(CONFIG_DRM_SUN4I) += sun4i_tv.o
|
|
obj-$(CONFIG_DRM_SUN4I) += sun6i_drc.o
|
|
|
|
obj-$(CONFIG_DRM_SUN4I_BACKEND) += sun4i-backend.o
|
|
ifdef CONFIG_DRM_SUN4I_BACKEND
|
|
obj-$(CONFIG_DRM_SUN4I) += sun4i-frontend.o
|
|
endif
|
|
obj-$(CONFIG_DRM_SUN4I_HDMI) += sun4i-drm-hdmi.o
|
|
obj-$(CONFIG_DRM_SUN6I_DSI) += sun6i-dsi.o
|
|
obj-$(CONFIG_DRM_SUN8I_DW_HDMI) += sun8i-drm-hdmi.o
|
|
obj-$(CONFIG_DRM_SUN8I_MIXER) += sun8i-mixer.o
|