Skip to content

Commit b9670ca

Browse files
arndbMark Yao
authored andcommitted
drm/rockchip: fix Kconfig dependencies
A bug that I had fixed earlier just came back, with CONFIG_EXTCON=m, the rockchip drm driver will fail to link: drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_get_port_lanes': cdn-dp-core.c:(.text.cdn_dp_get_port_lanes+0x30): undefined reference to `extcon_get_state' cdn-dp-core.c:(.text.cdn_dp_get_port_lanes+0x6c): undefined reference to `extcon_get_property' drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_check_sink_connection': cdn-dp-core.c:(.text.cdn_dp_check_sink_connection+0x80): undefined reference to `extcon_get_state' drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_enable': cdn-dp-core.c:(.text.cdn_dp_enable+0x748): undefined reference to `extcon_get_property' The problem is that that the sub-drivers are now all linked into the main rockchip drm module, which breaks all the Kconfig dependencies that are specified in the options for those sub-drivers. This clarifies the dependency to ensure that we can only turn on the DP driver when EXTCON is reachable. As the 'select' statements can now cause additional options to become built-in when they should be loadable modules, I'm moving those into the main driver config option. The dependency on DRM_ROCKCHIP can be reduced into a single 'if' statement here for brevity, but this has no functional effect. Fixes: b670515 ("drm/rockchip: add extcon dependency for DP") Fixes: 8820b68 ("drm/rockchip: Refactor the component match logic.") Link: https://patchwork.kernel.org/patch/9648761/ Acked-by: Guenter Roeck <groeck@chromium.org> Tested-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Yao <mark.yao@rock-chips.com> Link: https://patchwork.freedesktop.org/patch/msgid/20170721211214.3386387-1-arnd@arndb.de
1 parent 967003b commit b9670ca

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

‎drivers/gpu/drm/rockchip/Kconfig‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,29 @@ config DRM_ROCKCHIP
55
select DRM_KMS_HELPER
66
select DRM_PANEL
77
select VIDEOMODE_HELPERS
8+
select DRM_ANALOGIX_DP if ROCKCHIP_ANALOGIX_DP
9+
select DRM_DW_HDMI if ROCKCHIP_DW_HDMI
10+
select DRM_MIPI_DSI if ROCKCHIP_DW_MIPI_DSI
11+
select SND_SOC_HDMI_CODEC if ROCKCHIP_CDN_DP && SND_SOC
812
help
913
Choose this option if you have a Rockchip soc chipset.
1014
This driver provides kernel mode setting and buffer
1115
management to userspace. This driver does not provide
1216
2D or 3D acceleration; acceleration is performed by other
1317
IP found on the SoC.
1418

19+
if DRM_ROCKCHIP
20+
1521
config ROCKCHIP_ANALOGIX_DP
1622
bool "Rockchip specific extensions for Analogix DP driver"
17-
depends on DRM_ROCKCHIP
18-
select DRM_ANALOGIX_DP
1923
help
2024
This selects support for Rockchip SoC specific extensions
2125
for the Analogix Core DP driver. If you want to enable DP
2226
on RK3288 based SoC, you should selet this option.
2327

2428
config ROCKCHIP_CDN_DP
2529
bool "Rockchip cdn DP"
26-
depends on DRM_ROCKCHIP
27-
depends on EXTCON
28-
select SND_SOC_HDMI_CODEC if SND_SOC
30+
depends on EXTCON=y || (EXTCON=m && DRM_ROCKCHIP=m)
2931
help
3032
This selects support for Rockchip SoC specific extensions
3133
for the cdn DP driver. If you want to enable Dp on
@@ -34,8 +36,6 @@ config ROCKCHIP_CDN_DP
3436

3537
config ROCKCHIP_DW_HDMI
3638
bool "Rockchip specific extensions for Synopsys DW HDMI"
37-
depends on DRM_ROCKCHIP
38-
select DRM_DW_HDMI
3939
help
4040
This selects support for Rockchip SoC specific extensions
4141
for the Synopsys DesignWare HDMI driver. If you want to
@@ -44,8 +44,6 @@ config ROCKCHIP_DW_HDMI
4444

4545
config ROCKCHIP_DW_MIPI_DSI
4646
bool "Rockchip specific extensions for Synopsys DW MIPI DSI"
47-
depends on DRM_ROCKCHIP
48-
select DRM_MIPI_DSI
4947
help
5048
This selects support for Rockchip SoC specific extensions
5149
for the Synopsys DesignWare HDMI driver. If you want to
@@ -54,8 +52,9 @@ config ROCKCHIP_DW_MIPI_DSI
5452

5553
config ROCKCHIP_INNO_HDMI
5654
bool "Rockchip specific extensions for Innosilicon HDMI"
57-
depends on DRM_ROCKCHIP
5855
help
5956
This selects support for Rockchip SoC specific extensions
6057
for the Innosilicon HDMI driver. If you want to enable
6158
HDMI on RK3036 based SoC, you should select this option.
59+
60+
endif

0 commit comments

Comments
 (0)