summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dpi.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-07-06 15:30:52 +0530
committerArchit Taneja <archit@ti.com>2012-08-16 18:00:55 +0530
commitc6b393d4bc8bc076589bf03433728c1fc2a44d4c (patch)
treebd7f95efe75d2117411e33bd7353921483e5e969 /drivers/video/omap2/dss/dpi.c
parent475989b763668f0794d6a8ee34a1ca0e784831e2 (diff)
downloadop-kernel-dev-c6b393d4bc8bc076589bf03433728c1fc2a44d4c.zip
op-kernel-dev-c6b393d4bc8bc076589bf03433728c1fc2a44d4c.tar.gz
OMAPDSS: DPI: Maintain copy of number of data lines in driver data
The DPI driver currently relies on the omap_dss_device struct to configure the number of data lines as specified by the panel. This makes the DPI interface driver dependent on the omap_dss_device struct. Make the DPI driver data maintain it's own data lines field. A panel driver is expected to call omapdss_dpi_set_data_lines() before enabling the interface. Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dpi.c')
-rw-r--r--drivers/video/omap2/dss/dpi.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index d561a91..f260343 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -43,6 +43,7 @@ static struct {
struct omap_video_timings timings;
struct dss_lcd_mgr_config mgr_config;
+ int data_lines;
} dpi;
static struct platform_device *dpi_get_dsidev(enum omap_dss_clk_source clk)
@@ -161,7 +162,7 @@ static void dpi_config_lcd_manager(struct omap_dss_device *dssdev)
dpi.mgr_config.stallmode = false;
dpi.mgr_config.fifohandcheck = false;
- dpi.mgr_config.video_port_width = dssdev->phy.dpi.data_lines;
+ dpi.mgr_config.video_port_width = dpi.data_lines;
dpi.mgr_config.lcden_sig_polarity = 0;
@@ -347,6 +348,16 @@ int dpi_check_timings(struct omap_dss_device *dssdev,
}
EXPORT_SYMBOL(dpi_check_timings);
+void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines)
+{
+ mutex_lock(&dpi.lock);
+
+ dpi.data_lines = data_lines;
+
+ mutex_unlock(&dpi.lock);
+}
+EXPORT_SYMBOL(omapdss_dpi_set_data_lines);
+
static int __init dpi_init_display(struct omap_dss_device *dssdev)
{
DSSDBG("init_display\n");
OpenPOWER on IntegriCloud