Skip to content

Commit 42d95d1

Browse files
arndbLaurent Pinchart
authored andcommitted
drm/rcar: stop using 'imply' for dependencies
The meaning of the 'imply' keyword has changed recently, and neither the old meaning (select the symbol if its dependencies are met) nor the new meaning (enable it by default, but let the user set any other setting) is what we want here. Work around this by adding two more Kconfig options that lead to the correct behavior: if DRM_RCAR_USE_CMM and DRM_RCAR_USE_LVDS are enabled, that portion of the driver becomes usable, and no configuration results in a link error. This avoids a link failure: arm-linux-gnueabi-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_begin': rcar_du_crtc.c:(.text+0x1444): undefined reference to `rcar_cmm_setup' arm-linux-gnueabi-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable': rcar_du_crtc.c:(.text+0x14d4): undefined reference to `rcar_cmm_enable' arm-linux-gnueabi-ld: rcar_du_crtc.c:(.text+0x1548): undefined reference to `rcar_cmm_setup' arm-linux-gnueabi-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable': rcar_du_crtc.c:(.text+0x18b8): undefined reference to `rcar_cmm_disable' arm-linux-gnueabi-ld: drivers/gpu/drm/rcar-du/rcar_du_kms.o: in function `rcar_du_modeset_init': Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]>
1 parent c305ae9 commit 42d95d1

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

drivers/gpu/drm/rcar-du/Kconfig

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ config DRM_RCAR_DU
44
depends on DRM && OF
55
depends on ARM || ARM64
66
depends on ARCH_RENESAS || COMPILE_TEST
7-
imply DRM_RCAR_CMM
8-
imply DRM_RCAR_LVDS
97
select DRM_KMS_HELPER
108
select DRM_KMS_CMA_HELPER
119
select DRM_GEM_CMA_HELPER
@@ -14,29 +12,38 @@ config DRM_RCAR_DU
1412
Choose this option if you have an R-Car chipset.
1513
If M is selected the module will be called rcar-du-drm.
1614

17-
config DRM_RCAR_CMM
18-
tristate "R-Car DU Color Management Module (CMM) Support"
19-
depends on DRM && OF
15+
config DRM_RCAR_USE_CMM
16+
bool "R-Car DU Color Management Module (CMM) Support"
2017
depends on DRM_RCAR_DU
18+
default DRM_RCAR_DU
2119
help
2220
Enable support for R-Car Color Management Module (CMM).
2321

22+
config DRM_RCAR_CMM
23+
def_tristate DRM_RCAR_DU
24+
depends on DRM_RCAR_USE_CMM
25+
2426
config DRM_RCAR_DW_HDMI
2527
tristate "R-Car Gen3 and RZ/G2 DU HDMI Encoder Support"
2628
depends on DRM && OF
2729
select DRM_DW_HDMI
2830
help
2931
Enable support for R-Car Gen3 or RZ/G2 internal HDMI encoder.
3032

33+
config DRM_RCAR_USE_LVDS
34+
bool "R-Car DU LVDS Encoder Support"
35+
depends on DRM_BRIDGE && OF
36+
default DRM_RCAR_DU
37+
help
38+
Enable support for the R-Car Display Unit embedded LVDS encoders.
39+
3140
config DRM_RCAR_LVDS
32-
tristate "R-Car DU LVDS Encoder Support"
33-
depends on DRM && DRM_BRIDGE && OF
41+
def_tristate DRM_RCAR_DU
42+
depends on DRM_RCAR_USE_LVDS
3443
select DRM_KMS_HELPER
3544
select DRM_PANEL
3645
select OF_FLATTREE
3746
select OF_OVERLAY
38-
help
39-
Enable support for the R-Car Display Unit embedded LVDS encoders.
4047

4148
config DRM_RCAR_VSP
4249
bool "R-Car DU VSP Compositor Support" if ARM

0 commit comments

Comments
 (0)