summaryrefslogtreecommitdiff
path: root/drivers/staging/gma500/mdfld_output.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2011-07-15 17:35:49 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-07-15 19:05:08 +0200
commit3a970ac1b14cf1a49076d69369aa75a23d4ad2db (patch)
tree3127d9283a87f2f5d8cda61522de225b96b31e72 /drivers/staging/gma500/mdfld_output.c
parent3caa89e933646263cb4efedd5660dba00a107b51 (diff)
gma500: Clean up the DPU config and make it runtime
We really don't want this all done by ifdeffery - and this isn't any need as it's fairly easy to sort out. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/gma500/mdfld_output.c')
-rw-r--r--drivers/staging/gma500/mdfld_output.c42
1 files changed, 32 insertions, 10 deletions
diff --git a/drivers/staging/gma500/mdfld_output.c b/drivers/staging/gma500/mdfld_output.c
index ffa2c1f0c192..ee55f87ba1fd 100644
--- a/drivers/staging/gma500/mdfld_output.c
+++ b/drivers/staging/gma500/mdfld_output.c
@@ -30,6 +30,7 @@
#include "mdfld_dsi_dpi.h"
#include "mdfld_dsi_output.h"
#include "mdfld_output.h"
+#include "mdfld_dsi_dbi_dpu.h"
#include "displays/tpo_cmd.h"
#include "displays/tpo_vid.h"
@@ -39,6 +40,17 @@
#include "displays/pyr_vid.h"
/* #include "displays/hdmi.h" */
+static int mdfld_dual_mipi;
+static int mdfld_hdmi;
+static int mdfld_dpu;
+
+module_param(mdfld_dual_mipi, int, 0600);
+MODULE_PARM_DESC(mdfld_dual_mipi, "Enable dual MIPI configuration");
+module_param(mdfld_hdmi, int, 0600);
+MODULE_PARM_DESC(mdfld_hdmi, "Enable Medfield HDMI");
+module_param(mdfld_dpu, int, 0600);
+MODULE_PARM_DESC(mdfld_dpu, "Enable Medfield DPU");
+
/* For now a single type per device is all we cope with */
int mdfld_get_panel_type(struct drm_device *dev, int pipe)
{
@@ -134,15 +146,25 @@ int mdfld_output_init(struct drm_device *dev)
dev_info(dev->dev, "panel 1: type is %d\n", type);
init_panel(dev, 0, type);
-#ifdef CONFIG_MDFD_DUAL_MIPI
- /* MIPI panel 2 */
- type = mdfld_get_panel_type(dev, 2);
- dev_info(dev->dev, "panel 2: type is %d\n", type);
- init_panel(dev, 2, type);
-#endif
-#ifdef CONFIG_MDFD_HDMI
- /* HDMI panel */
- init_panel(dev, 0, HDMI);
-#endif
+ if (mdfld_dual_mipi) {
+ /* MIPI panel 2 */
+ type = mdfld_get_panel_type(dev, 2);
+ dev_info(dev->dev, "panel 2: type is %d\n", type);
+ init_panel(dev, 2, type);
+ }
+ if (mdfld_hdmi)
+ /* HDMI panel */
+ init_panel(dev, 0, HDMI);
return 0;
}
+
+void mdfld_output_setup(struct drm_device *dev)
+{
+ /* FIXME: this is not the right place for this stuff ! */
+ if (IS_MFLD(dev)) {
+ if (mdfld_dpu)
+ mdfld_dbi_dpu_init(dev);
+ else
+ mdfld_dbi_dsr_init(dev);
+ }
+} \ No newline at end of file