OMAPDSS: provide a way to set number of overlays
authorRakesh Movva <r-movva@ti.com>
Wed, 16 Sep 2015 10:33:19 +0000 (05:33 -0500)
committerVishal Mahaveer <vishalm@ti.com>
Fri, 18 Sep 2015 20:23:54 +0000 (15:23 -0500)
enabling the path to change the number of overlays being used
by the dss.

Change-Id: I91f04701cd8d584780e3eb35ebc01586c42ef223
Signed-off-by: Rakesh Movva <r-movva@ti.com>
drivers/video/fbdev/omap2/dss/Kconfig
drivers/video/fbdev/omap2/dss/dss_features.c
ti_config_fragments/audio_display.cfg

index d39a349830004aaa02138fa8b0335eaaeb4116be..5e9776569bd4150207c07e007830d78e19cc294d 100644 (file)
@@ -165,4 +165,10 @@ config OMAP2_DSS_SLEEP_AFTER_VENC_RESET
          This option enables the sleep, and is enabled by default. You can
          disable the sleep if it doesn't cause problems on your platform.
 
+config OMAP2_DSS_NUM_OVLS
+       int "Number of Overlays"
+       range 1 10
+       help
+         Select the number of video pipelines which are used for composition.
+
 endif
index 94836f8ef961c53d0d8963042024f6698d13b72c..f061def1e9933f2d34ec13173c2da8f404f9c88c 100644 (file)
 #include "dss.h"
 #include "dss_features.h"
 
+static int num_ovls;
+
+MODULE_PARM_DESC(num_ovls, "Number of pipelines used for composition");
+module_param(num_ovls, int, 0600);
+
 /* Defines a generic omap register field */
 struct dss_reg_field {
        u8 start, end;
@@ -801,7 +806,7 @@ static const struct omap_dss_features omap5_dss_features = {
        .num_features = ARRAY_SIZE(omap5_dss_feat_list),
 
        .num_mgrs = 4,
-       .num_ovls = 4,
+       .num_ovls = CONFIG_OMAP2_DSS_NUM_OVLS,
        .supported_displays = omap5_dss_supported_displays,
        .supported_outputs = omap5_dss_supported_outputs,
        .supported_color_modes = omap4_dss_supported_color_modes,
@@ -822,7 +827,7 @@ EXPORT_SYMBOL(dss_feat_get_num_mgrs);
 
 int dss_feat_get_num_ovls(void)
 {
-       return omap_current_dss_features->num_ovls;
+       return num_ovls ? num_ovls : omap_current_dss_features->num_ovls;
 }
 EXPORT_SYMBOL(dss_feat_get_num_ovls);
 
index 76d5de46436818131e4e893a2dc2570a5ef93bda..a4c7e108c0e0115340543a5a908d8a3b6f1e933f 100644 (file)
@@ -12,6 +12,7 @@ CONFIG_DRM_OMAP=y
 CONFIG_DRM_OMAP_NUM_CRTCS=2
 
 CONFIG_OMAP2_DSS=y
+CONFIG_OMAP2_DSS_NUM_OVLS=4
 CONFIG_OMAP5_DSS_HDMI=y
 
 CONFIG_DISPLAY_PANEL_DPI=y