]> git.karo-electronics.de Git - linux-beck.git/commitdiff
videomode: simplify videomode Kconfig and Makefile
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 12 Mar 2013 08:15:43 +0000 (10:15 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 12 Mar 2013 13:46:41 +0000 (15:46 +0200)
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>
drivers/gpu/drm/drm_modes.c
drivers/gpu/drm/tilcdc/Kconfig
drivers/video/Kconfig
drivers/video/Makefile
drivers/video/fbmon.c

index 04fa6f1808d151249f38fdf2974ee365eac7a047..0698c0e9bc2655f3eff728bd683374cd5af10ed0 100644 (file)
@@ -506,7 +506,7 @@ drm_gtf_mode(struct drm_device *dev, int hdisplay, int vdisplay, int vrefresh,
 }
 EXPORT_SYMBOL(drm_gtf_mode);
 
-#if IS_ENABLED(CONFIG_VIDEOMODE)
+#ifdef CONFIG_VIDEOMODE_HELPERS
 int drm_display_mode_from_videomode(const struct videomode *vm,
                                    struct drm_display_mode *dmode)
 {
@@ -540,9 +540,8 @@ int drm_display_mode_from_videomode(const struct videomode *vm,
        return 0;
 }
 EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode);
-#endif
 
-#if IS_ENABLED(CONFIG_OF_VIDEOMODE)
+#ifdef CONFIG_OF
 /**
  * of_get_drm_display_mode - get a drm_display_mode from devicetree
  * @np: device_node with the timing specification
@@ -572,7 +571,8 @@ int of_get_drm_display_mode(struct device_node *np,
        return 0;
 }
 EXPORT_SYMBOL_GPL(of_get_drm_display_mode);
-#endif
+#endif /* CONFIG_OF */
+#endif /* CONFIG_VIDEOMODE_HELPERS */
 
 /**
  * drm_mode_set_name - set the name on a mode
index d24d04013476bc4f9b1493518b8cb80f6de1f045..e461e99724552f96014581f81f191df8baed89ef 100644 (file)
@@ -4,8 +4,7 @@ config DRM_TILCDC
        select DRM_KMS_HELPER
        select DRM_KMS_CMA_HELPER
        select DRM_GEM_CMA_HELPER
-       select OF_VIDEOMODE
-       select OF_DISPLAY_TIMING
+       select VIDEOMODE_HELPERS
        select BACKLIGHT_CLASS_DEVICE
        help
          Choose this option if you have an TI SoC with LCDC display
index 4c1546f71d56a2be51785f3bf02ab50437ac94d6..2a81b11367fe3f915fb0bcaeaa2da5d4990e6ab9 100644 (file)
@@ -31,26 +31,8 @@ config VIDEO_OUTPUT_CONTROL
          This framework adds support for low-level control of the video 
          output switch.
 
-config DISPLAY_TIMING
-       bool
-
-config VIDEOMODE
-       bool
-
-config OF_DISPLAY_TIMING
-       bool "Enable device tree display timing support"
-       depends on OF
-       select DISPLAY_TIMING
-       help
-         helper to parse display timings from the devicetree
-
-config OF_VIDEOMODE
-       bool "Enable device tree videomode support"
-       depends on OF
-       select VIDEOMODE
-       select OF_DISPLAY_TIMING
-       help
-         helper to get videomodes from the devicetree
+config VIDEOMODE_HELPERS
+       bool
 
 config HDMI
        bool
index 9df387334cb7f8ed341b8728267fae3a5afd4dcc..e414378d6a5199bd5509c587002e03510a378a28 100644 (file)
@@ -171,7 +171,7 @@ obj-$(CONFIG_FB_VIRTUAL)          += vfb.o
 
 #video output switch sysfs driver
 obj-$(CONFIG_VIDEO_OUTPUT_CONTROL) += output.o
-obj-$(CONFIG_DISPLAY_TIMING) += display_timing.o
-obj-$(CONFIG_OF_DISPLAY_TIMING) += of_display_timing.o
-obj-$(CONFIG_VIDEOMODE) += videomode.o
-obj-$(CONFIG_OF_VIDEOMODE) += of_videomode.o
+obj-$(CONFIG_VIDEOMODE_HELPERS) += display_timing.o videomode.o
+ifeq ($(CONFIG_OF),y)
+obj-$(CONFIG_VIDEOMODE_HELPERS) += of_display_timing.o of_videomode.o
+endif
index 94ad0f71383c7fa71563332b3ab0fad9276dd2ab..368cedfeaf1db2f34a2bdb179103347307085c0e 100644 (file)
@@ -1376,7 +1376,7 @@ int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, struct fb_inf
        return err;
 }
 
-#if IS_ENABLED(CONFIG_VIDEOMODE)
+#ifdef CONFIG_VIDEOMODE_HELPERS
 int fb_videomode_from_videomode(const struct videomode *vm,
                                struct fb_videomode *fbmode)
 {
@@ -1424,9 +1424,8 @@ int fb_videomode_from_videomode(const struct videomode *vm,
        return 0;
 }
 EXPORT_SYMBOL_GPL(fb_videomode_from_videomode);
-#endif
 
-#if IS_ENABLED(CONFIG_OF_VIDEOMODE)
+#ifdef CONFIG_OF
 static inline void dump_fb_videomode(const struct fb_videomode *m)
 {
        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,
        return 0;
 }
 EXPORT_SYMBOL_GPL(of_get_fb_videomode);
-#endif
+#endif /* CONFIG_OF */
+#endif /* CONFIG_VIDEOMODE_HELPERS */
 
 #else
 int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)