aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-12 04:15:43 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-03-12 09:46:41 -0400
commita38884f681a4d044befd30d9f3d19a0821bae63a (patch)
treeb559097c03249e9821dd982954f816db262d82a1
parentf6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff)
videomode: simplify videomode Kconfig and Makefile
This patch simplifies videomode related Kconfig and Makefile. After this patch, there's only one non-user selectable Kconfig option left, VIDEOMODE_HELPERS. The reasons for the change: * Videomode helper functions are not something that should be shown in the kernel configuration options. The related code should just be included if it's needed, i.e. selected by drivers using videomode. * There's no need to have separate Kconfig options for videomode and display_timing. First of all, the amount of code for both is quite small. Second, videomode depends on display_timing, and display_timing in itself is not really useful, so both would be included in any case. * CONFIG_VIDEOMODE is a bit vague name, and CONFIG_VIDEOMODE_HELPERS describes better what's included. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--drivers/gpu/drm/drm_modes.c8
-rw-r--r--drivers/gpu/drm/tilcdc/Kconfig3
-rw-r--r--drivers/video/Kconfig22
-rw-r--r--drivers/video/Makefile8
-rw-r--r--drivers/video/fbmon.c8
5 files changed, 15 insertions, 34 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 04fa6f1808d1..0698c0e9bc26 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -506,7 +506,7 @@ drm_gtf_mode(struct drm_device *dev, int hdisplay, int vdisplay, int vrefresh,
506} 506}
507EXPORT_SYMBOL(drm_gtf_mode); 507EXPORT_SYMBOL(drm_gtf_mode);
508 508
509#if IS_ENABLED(CONFIG_VIDEOMODE) 509#ifdef CONFIG_VIDEOMODE_HELPERS
510int drm_display_mode_from_videomode(const struct videomode *vm, 510int drm_display_mode_from_videomode(const struct videomode *vm,
511 struct drm_display_mode *dmode) 511 struct drm_display_mode *dmode)
512{ 512{
@@ -540,9 +540,8 @@ int drm_display_mode_from_videomode(const struct videomode *vm,
540 return 0; 540 return 0;
541} 541}
542EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode); 542EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode);
543#endif
544 543
545#if IS_ENABLED(CONFIG_OF_VIDEOMODE) 544#ifdef CONFIG_OF
546/** 545/**
547 * of_get_drm_display_mode - get a drm_display_mode from devicetree 546 * of_get_drm_display_mode - get a drm_display_mode from devicetree
548 * @np: device_node with the timing specification 547 * @np: device_node with the timing specification
@@ -572,7 +571,8 @@ int of_get_drm_display_mode(struct device_node *np,
572 return 0; 571 return 0;
573} 572}
574EXPORT_SYMBOL_GPL(of_get_drm_display_mode); 573EXPORT_SYMBOL_GPL(of_get_drm_display_mode);
575#endif 574#endif /* CONFIG_OF */
575#endif /* CONFIG_VIDEOMODE_HELPERS */
576 576
577/** 577/**
578 * drm_mode_set_name - set the name on a mode 578 * drm_mode_set_name - set the name on a mode
diff --git a/drivers/gpu/drm/tilcdc/Kconfig b/drivers/gpu/drm/tilcdc/Kconfig
index d24d04013476..e461e9972455 100644
--- a/drivers/gpu/drm/tilcdc/Kconfig
+++ b/drivers/gpu/drm/tilcdc/Kconfig
@@ -4,8 +4,7 @@ config DRM_TILCDC
4 select DRM_KMS_HELPER 4 select DRM_KMS_HELPER
5 select DRM_KMS_CMA_HELPER 5 select DRM_KMS_CMA_HELPER
6 select DRM_GEM_CMA_HELPER 6 select DRM_GEM_CMA_HELPER
7 select OF_VIDEOMODE 7 select VIDEOMODE_HELPERS
8 select OF_DISPLAY_TIMING
9 select BACKLIGHT_CLASS_DEVICE 8 select BACKLIGHT_CLASS_DEVICE
10 help 9 help
11 Choose this option if you have an TI SoC with LCDC display 10 Choose this option if you have an TI SoC with LCDC display
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 4c1546f71d56..2a81b11367fe 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -31,26 +31,8 @@ config VIDEO_OUTPUT_CONTROL
31 This framework adds support for low-level control of the video 31 This framework adds support for low-level control of the video
32 output switch. 32 output switch.
33 33
34config DISPLAY_TIMING 34config VIDEOMODE_HELPERS
35 bool 35 bool
36
37config VIDEOMODE
38 bool
39
40config OF_DISPLAY_TIMING
41 bool "Enable device tree display timing support"
42 depends on OF
43 select DISPLAY_TIMING
44 help
45 helper to parse display timings from the devicetree
46
47config OF_VIDEOMODE
48 bool "Enable device tree videomode support"
49 depends on OF
50 select VIDEOMODE
51 select OF_DISPLAY_TIMING
52 help
53 helper to get videomodes from the devicetree
54 36
55config HDMI 37config HDMI
56 bool 38 bool
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 9df387334cb7..e414378d6a51 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -171,7 +171,7 @@ obj-$(CONFIG_FB_VIRTUAL) += vfb.o
171 171
172#video output switch sysfs driver 172#video output switch sysfs driver
173obj-$(CONFIG_VIDEO_OUTPUT_CONTROL) += output.o 173obj-$(CONFIG_VIDEO_OUTPUT_CONTROL) += output.o
174obj-$(CONFIG_DISPLAY_TIMING) += display_timing.o 174obj-$(CONFIG_VIDEOMODE_HELPERS) += display_timing.o videomode.o
175obj-$(CONFIG_OF_DISPLAY_TIMING) += of_display_timing.o 175ifeq ($(CONFIG_OF),y)
176obj-$(CONFIG_VIDEOMODE) += videomode.o 176obj-$(CONFIG_VIDEOMODE_HELPERS) += of_display_timing.o of_videomode.o
177obj-$(CONFIG_OF_VIDEOMODE) += of_videomode.o 177endif
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index 94ad0f71383c..368cedfeaf1d 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -1376,7 +1376,7 @@ int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, struct fb_inf
1376 return err; 1376 return err;
1377} 1377}
1378 1378
1379#if IS_ENABLED(CONFIG_VIDEOMODE) 1379#ifdef CONFIG_VIDEOMODE_HELPERS
1380int fb_videomode_from_videomode(const struct videomode *vm, 1380int fb_videomode_from_videomode(const struct videomode *vm,
1381 struct fb_videomode *fbmode) 1381 struct fb_videomode *fbmode)
1382{ 1382{
@@ -1424,9 +1424,8 @@ int fb_videomode_from_videomode(const struct videomode *vm,
1424 return 0; 1424 return 0;
1425} 1425}
1426EXPORT_SYMBOL_GPL(fb_videomode_from_videomode); 1426EXPORT_SYMBOL_GPL(fb_videomode_from_videomode);
1427#endif
1428 1427
1429#if IS_ENABLED(CONFIG_OF_VIDEOMODE) 1428#ifdef CONFIG_OF
1430static inline void dump_fb_videomode(const struct fb_videomode *m) 1429static inline void dump_fb_videomode(const struct fb_videomode *m)
1431{ 1430{
1432 pr_debug("fb_videomode = %ux%u@%uHz (%ukHz) %u %u %u %u %u %u %u %u %u\n", 1431 pr_debug("fb_videomode = %ux%u@%uHz (%ukHz) %u %u %u %u %u %u %u %u %u\n",
@@ -1465,7 +1464,8 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,
1465 return 0; 1464 return 0;
1466} 1465}
1467EXPORT_SYMBOL_GPL(of_get_fb_videomode); 1466EXPORT_SYMBOL_GPL(of_get_fb_videomode);
1468#endif 1467#endif /* CONFIG_OF */
1468#endif /* CONFIG_VIDEOMODE_HELPERS */
1469 1469
1470#else 1470#else
1471int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var) 1471int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)