Skip to content

Commit

Permalink
OMAPDSS: SDI: Maintain copy of data pairs in driver data
Browse files Browse the repository at this point in the history
The SDI driver currently relies on the omap_dss_device struct to configure the
number of data pairs as specified by the panel. This makes the SDI interface
driver dependent on the omap_dss_device struct.

Make the SDI driver data maintain it's own data lines field. A panel driver
is expected to call omapdss_sdi_set_datapairs() before enabling the interface.
Even though we configure the number of data pairs here, this function would be
finally mapped to a generic interface op called set_data_lines. The datapairs
argument type has been changed from u8 to int at some places to be in sync with
the 'set_data_lines' ops of other interfaces.

Signed-off-by: Archit Taneja <archit@ti.com>
  • Loading branch information
Archit Taneja committed Aug 16, 2012
1 parent c6b393d commit 889b4fd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions drivers/video/omap2/displays/panel-acx565akm.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ static int acx_panel_power_on(struct omap_dss_device *dssdev)
mutex_lock(&md->mutex);

omapdss_sdi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_sdi_set_datapairs(dssdev, dssdev->phy.sdi.datapairs);

r = omapdss_sdi_display_enable(dssdev);
if (r) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/omap2/dss/dss.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static void dss_restore_context(void)
#undef SR
#undef RR

void dss_sdi_init(u8 datapairs)
void dss_sdi_init(int datapairs)
{
u32 l;

Expand Down
2 changes: 1 addition & 1 deletion drivers/video/omap2/dss/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void dss_dump_clocks(struct seq_file *s);
void dss_debug_dump_clocks(struct seq_file *s);
#endif

void dss_sdi_init(u8 datapairs);
void dss_sdi_init(int datapairs);
int dss_sdi_enable(void);
void dss_sdi_disable(void);

Expand Down
10 changes: 9 additions & 1 deletion drivers/video/omap2/dss/sdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static struct {

struct dss_lcd_mgr_config mgr_config;
struct omap_video_timings timings;
int datapairs;
} sdi;

static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
Expand Down Expand Up @@ -106,7 +107,8 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)

sdi_config_lcd_manager(dssdev);

dss_sdi_init(dssdev->phy.sdi.datapairs);
dss_sdi_init(sdi.datapairs);

r = dss_sdi_enable();
if (r)
goto err_sdi_enable;
Expand Down Expand Up @@ -164,6 +166,12 @@ void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
}
EXPORT_SYMBOL(omapdss_sdi_set_timings);

void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs)
{
sdi.datapairs = datapairs;
}
EXPORT_SYMBOL(omapdss_sdi_set_datapairs);

static int __init sdi_init_display(struct omap_dss_device *dssdev)
{
DSSDBG("SDI init\n");
Expand Down
1 change: 1 addition & 0 deletions include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev);
void omapdss_sdi_display_disable(struct omap_dss_device *dssdev);
void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings);
void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs);

int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev);
void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev);
Expand Down

0 comments on commit 889b4fd

Please sign in to comment.