aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss/display.c')
-rw-r--r--drivers/video/omap2/dss/display.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 249010630370..5bd957e85505 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -116,7 +116,7 @@ static ssize_t display_timings_store(struct device *dev,
116 struct device_attribute *attr, const char *buf, size_t size) 116 struct device_attribute *attr, const char *buf, size_t size)
117{ 117{
118 struct omap_dss_device *dssdev = to_dss_device(dev); 118 struct omap_dss_device *dssdev = to_dss_device(dev);
119 struct omap_video_timings t; 119 struct omap_video_timings t = dssdev->panel.timings;
120 int r, found; 120 int r, found;
121 121
122 if (!dssdev->driver->set_timings || !dssdev->driver->check_timings) 122 if (!dssdev->driver->set_timings || !dssdev->driver->check_timings)
@@ -316,44 +316,6 @@ void omapdss_default_get_timings(struct omap_dss_device *dssdev,
316} 316}
317EXPORT_SYMBOL(omapdss_default_get_timings); 317EXPORT_SYMBOL(omapdss_default_get_timings);
318 318
319/* Checks if replication logic should be used. Only use for active matrix,
320 * when overlay is in RGB12U or RGB16 mode, and LCD interface is
321 * 18bpp or 24bpp */
322bool dss_use_replication(struct omap_dss_device *dssdev,
323 enum omap_color_mode mode)
324{
325 int bpp;
326
327 if (mode != OMAP_DSS_COLOR_RGB12U && mode != OMAP_DSS_COLOR_RGB16)
328 return false;
329
330 if (dssdev->type == OMAP_DISPLAY_TYPE_DPI &&
331 (dssdev->panel.config & OMAP_DSS_LCD_TFT) == 0)
332 return false;
333
334 switch (dssdev->type) {
335 case OMAP_DISPLAY_TYPE_DPI:
336 bpp = dssdev->phy.dpi.data_lines;
337 break;
338 case OMAP_DISPLAY_TYPE_HDMI:
339 case OMAP_DISPLAY_TYPE_VENC:
340 case OMAP_DISPLAY_TYPE_SDI:
341 bpp = 24;
342 break;
343 case OMAP_DISPLAY_TYPE_DBI:
344 bpp = dssdev->ctrl.pixel_size;
345 break;
346 case OMAP_DISPLAY_TYPE_DSI:
347 bpp = dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt);
348 break;
349 default:
350 BUG();
351 return false;
352 }
353
354 return bpp > 16;
355}
356
357void dss_init_device(struct platform_device *pdev, 319void dss_init_device(struct platform_device *pdev,
358 struct omap_dss_device *dssdev) 320 struct omap_dss_device *dssdev)
359{ 321{