Commit 9b4a5716 authored by Archit Taneja's avatar Archit Taneja

OMAPDSS: SDI: Maintain our own timings field in driver data

The SDI driver currently relies on the timings in omap_dss_device struct to
configure the DISPC accordingly. This makes the SDI interface driver dependent
on the omap_dss_device struct.

Make the SDI driver data maintain it's own timings field. The panel driver is
expected to call omapdss_sdi_set_timings() to set these timings before the panel
is enabled.

Make the SDI panel driver configure the new timings is the omap_dss_device
struct(dssdev->panel.timings). The SDI driver is responsible for maintaining
only it's own copy of timings.
Signed-off-by: default avatarArchit Taneja <archit@ti.com>
parent c7833f7b
...@@ -600,6 +600,8 @@ static int acx_panel_power_on(struct omap_dss_device *dssdev) ...@@ -600,6 +600,8 @@ static int acx_panel_power_on(struct omap_dss_device *dssdev)
mutex_lock(&md->mutex); mutex_lock(&md->mutex);
omapdss_sdi_set_timings(dssdev, &dssdev->panel.timings);
r = omapdss_sdi_display_enable(dssdev); r = omapdss_sdi_display_enable(dssdev);
if (r) { if (r) {
pr_err("%s sdi enable failed\n", __func__); pr_err("%s sdi enable failed\n", __func__);
...@@ -732,6 +734,8 @@ static void acx_panel_set_timings(struct omap_dss_device *dssdev, ...@@ -732,6 +734,8 @@ static void acx_panel_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct omap_video_timings *timings)
{ {
omapdss_sdi_set_timings(dssdev, timings); omapdss_sdi_set_timings(dssdev, timings);
dssdev->panel.timings = *timings;
} }
static int acx_panel_check_timings(struct omap_dss_device *dssdev, static int acx_panel_check_timings(struct omap_dss_device *dssdev,
......
...@@ -34,6 +34,7 @@ static struct { ...@@ -34,6 +34,7 @@ static struct {
struct regulator *vdds_sdi_reg; struct regulator *vdds_sdi_reg;
struct dss_lcd_mgr_config mgr_config; struct dss_lcd_mgr_config mgr_config;
struct omap_video_timings timings;
} sdi; } sdi;
static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
...@@ -51,7 +52,7 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) ...@@ -51,7 +52,7 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
{ {
struct omap_video_timings *t = &dssdev->panel.timings; struct omap_video_timings *t = &sdi.timings;
struct dss_clock_info dss_cinfo; struct dss_clock_info dss_cinfo;
struct dispc_clock_info dispc_cinfo; struct dispc_clock_info dispc_cinfo;
unsigned long pck; unsigned long pck;
...@@ -77,8 +78,8 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) ...@@ -77,8 +78,8 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
goto err_get_dispc; goto err_get_dispc;
/* 15.5.9.1.2 */ /* 15.5.9.1.2 */
dssdev->panel.timings.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; t->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
dssdev->panel.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; t->sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
r = dss_calc_clock_div(t->pixel_clock * 1000, &dss_cinfo, &dispc_cinfo); r = dss_calc_clock_div(t->pixel_clock * 1000, &dss_cinfo, &dispc_cinfo);
if (r) if (r)
...@@ -151,7 +152,7 @@ void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, ...@@ -151,7 +152,7 @@ void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
{ {
int r; int r;
dssdev->panel.timings = *timings; sdi.timings = *timings;
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
omapdss_sdi_display_disable(dssdev); omapdss_sdi_display_disable(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