Commit c6b393d4 authored by Archit Taneja's avatar Archit Taneja

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: default avatarArchit Taneja <archit@ti.com>
parent 475989b7
...@@ -566,6 +566,7 @@ static int generic_dpi_panel_power_on(struct omap_dss_device *dssdev) ...@@ -566,6 +566,7 @@ static int generic_dpi_panel_power_on(struct omap_dss_device *dssdev)
return 0; return 0;
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings); omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev); r = omapdss_dpi_display_enable(dssdev);
if (r) if (r)
......
...@@ -56,6 +56,7 @@ static int lb035q02_panel_power_on(struct omap_dss_device *dssdev) ...@@ -56,6 +56,7 @@ static int lb035q02_panel_power_on(struct omap_dss_device *dssdev)
return 0; return 0;
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings); omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev); r = omapdss_dpi_display_enable(dssdev);
if (r) if (r)
......
...@@ -176,6 +176,7 @@ static int nec_8048_panel_power_on(struct omap_dss_device *dssdev) ...@@ -176,6 +176,7 @@ static int nec_8048_panel_power_on(struct omap_dss_device *dssdev)
return 0; return 0;
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings); omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev); r = omapdss_dpi_display_enable(dssdev);
if (r) if (r)
......
...@@ -379,6 +379,7 @@ static int picodlp_panel_power_on(struct omap_dss_device *dssdev) ...@@ -379,6 +379,7 @@ static int picodlp_panel_power_on(struct omap_dss_device *dssdev)
msleep(1000); msleep(1000);
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings); omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev); r = omapdss_dpi_display_enable(dssdev);
if (r) { if (r) {
......
...@@ -143,6 +143,7 @@ static int sharp_ls_power_on(struct omap_dss_device *dssdev) ...@@ -143,6 +143,7 @@ static int sharp_ls_power_on(struct omap_dss_device *dssdev)
return 0; return 0;
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings); omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev); r = omapdss_dpi_display_enable(dssdev);
if (r) if (r)
......
...@@ -66,6 +66,7 @@ static int tfp410_power_on(struct omap_dss_device *dssdev) ...@@ -66,6 +66,7 @@ static int tfp410_power_on(struct omap_dss_device *dssdev)
return 0; return 0;
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings); omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev); r = omapdss_dpi_display_enable(dssdev);
if (r) if (r)
......
...@@ -338,6 +338,7 @@ static int tpo_td043_enable_dss(struct omap_dss_device *dssdev) ...@@ -338,6 +338,7 @@ static int tpo_td043_enable_dss(struct omap_dss_device *dssdev)
return 0; return 0;
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings); omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev); r = omapdss_dpi_display_enable(dssdev);
if (r) if (r)
......
...@@ -43,6 +43,7 @@ static struct { ...@@ -43,6 +43,7 @@ static struct {
struct omap_video_timings timings; struct omap_video_timings timings;
struct dss_lcd_mgr_config mgr_config; struct dss_lcd_mgr_config mgr_config;
int data_lines;
} dpi; } dpi;
static struct platform_device *dpi_get_dsidev(enum omap_dss_clk_source clk) 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) ...@@ -161,7 +162,7 @@ static void dpi_config_lcd_manager(struct omap_dss_device *dssdev)
dpi.mgr_config.stallmode = false; dpi.mgr_config.stallmode = false;
dpi.mgr_config.fifohandcheck = 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; dpi.mgr_config.lcden_sig_polarity = 0;
...@@ -347,6 +348,16 @@ int dpi_check_timings(struct omap_dss_device *dssdev, ...@@ -347,6 +348,16 @@ int dpi_check_timings(struct omap_dss_device *dssdev,
} }
EXPORT_SYMBOL(dpi_check_timings); 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) static int __init dpi_init_display(struct omap_dss_device *dssdev)
{ {
DSSDBG("init_display\n"); DSSDBG("init_display\n");
......
...@@ -743,6 +743,7 @@ void omapdss_dpi_set_timings(struct omap_dss_device *dssdev, ...@@ -743,6 +743,7 @@ void omapdss_dpi_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct omap_video_timings *timings);
int dpi_check_timings(struct omap_dss_device *dssdev, int dpi_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings); struct omap_video_timings *timings);
void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines);
int omapdss_sdi_display_enable(struct omap_dss_device *dssdev); int omapdss_sdi_display_enable(struct omap_dss_device *dssdev);
void omapdss_sdi_display_disable(struct omap_dss_device *dssdev); void omapdss_sdi_display_disable(struct omap_dss_device *dssdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment