aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c2
-rw-r--r--drivers/video/omap2/dss/display.c10
-rw-r--r--drivers/video/omap2/dss/dsi.c24
-rw-r--r--drivers/video/omap2/dss/dss.h7
4 files changed, 36 insertions, 7 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 7675687c6fe4..ddc696d52abe 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -976,7 +976,7 @@ static int taal_probe(struct omap_dss_device *dssdev)
976 976
977 dssdev->panel.config = OMAP_DSS_LCD_TFT; 977 dssdev->panel.config = OMAP_DSS_LCD_TFT;
978 dssdev->panel.timings = panel_config->timings; 978 dssdev->panel.timings = panel_config->timings;
979 dssdev->ctrl.pixel_size = 24; 979 dssdev->panel.dsi_pix_fmt = OMAP_DSS_DSI_FMT_RGB888;
980 980
981 td = kzalloc(sizeof(*td), GFP_KERNEL); 981 td = kzalloc(sizeof(*td), GFP_KERNEL);
982 if (!td) { 982 if (!td) {
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 2c6e2bc5e207..be331dc5a61b 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -299,11 +299,15 @@ int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev)
299 return 16; 299 return 16;
300 300
301 case OMAP_DISPLAY_TYPE_DBI: 301 case OMAP_DISPLAY_TYPE_DBI:
302 case OMAP_DISPLAY_TYPE_DSI:
303 if (dssdev->ctrl.pixel_size == 24) 302 if (dssdev->ctrl.pixel_size == 24)
304 return 24; 303 return 24;
305 else 304 else
306 return 16; 305 return 16;
306 case OMAP_DISPLAY_TYPE_DSI:
307 if (dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt) > 16)
308 return 24;
309 else
310 return 16;
307 case OMAP_DISPLAY_TYPE_VENC: 311 case OMAP_DISPLAY_TYPE_VENC:
308 case OMAP_DISPLAY_TYPE_SDI: 312 case OMAP_DISPLAY_TYPE_SDI:
309 case OMAP_DISPLAY_TYPE_HDMI: 313 case OMAP_DISPLAY_TYPE_HDMI:
@@ -339,9 +343,11 @@ bool dss_use_replication(struct omap_dss_device *dssdev,
339 bpp = 24; 343 bpp = 24;
340 break; 344 break;
341 case OMAP_DISPLAY_TYPE_DBI: 345 case OMAP_DISPLAY_TYPE_DBI:
342 case OMAP_DISPLAY_TYPE_DSI:
343 bpp = dssdev->ctrl.pixel_size; 346 bpp = dssdev->ctrl.pixel_size;
344 break; 347 break;
348 case OMAP_DISPLAY_TYPE_DSI:
349 bpp = dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt);
350 break;
345 default: 351 default:
346 BUG(); 352 BUG();
347 } 353 }
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index c2c2fa778b39..2b7d17b7812c 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -422,6 +422,21 @@ static inline int wait_for_bit_change(struct platform_device *dsidev,
422 return value; 422 return value;
423} 423}
424 424
425u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt)
426{
427 switch (fmt) {
428 case OMAP_DSS_DSI_FMT_RGB888:
429 case OMAP_DSS_DSI_FMT_RGB666:
430 return 24;
431 case OMAP_DSS_DSI_FMT_RGB666_PACKED:
432 return 18;
433 case OMAP_DSS_DSI_FMT_RGB565:
434 return 16;
435 default:
436 BUG();
437 }
438}
439
425#ifdef DEBUG 440#ifdef DEBUG
426static void dsi_perf_mark_setup(struct platform_device *dsidev) 441static void dsi_perf_mark_setup(struct platform_device *dsidev)
427{ 442{
@@ -438,6 +453,7 @@ static void dsi_perf_mark_start(struct platform_device *dsidev)
438static void dsi_perf_show(struct platform_device *dsidev, const char *name) 453static void dsi_perf_show(struct platform_device *dsidev, const char *name)
439{ 454{
440 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); 455 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
456 struct omap_dss_device *dssdev = dsi->update_region.device;
441 ktime_t t, setup_time, trans_time; 457 ktime_t t, setup_time, trans_time;
442 u32 total_bytes; 458 u32 total_bytes;
443 u32 setup_us, trans_us, total_us; 459 u32 setup_us, trans_us, total_us;
@@ -461,7 +477,7 @@ static void dsi_perf_show(struct platform_device *dsidev, const char *name)
461 477
462 total_bytes = dsi->update_region.w * 478 total_bytes = dsi->update_region.w *
463 dsi->update_region.h * 479 dsi->update_region.h *
464 dsi->update_region.device->ctrl.pixel_size / 8; 480 dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt) / 8;
465 481
466 printk(KERN_INFO "DSI(%s): %u us + %u us = %u us (%uHz), " 482 printk(KERN_INFO "DSI(%s): %u us + %u us = %u us (%uHz), "
467 "%u bytes, %u kbytes/sec\n", 483 "%u bytes, %u kbytes/sec\n",
@@ -3689,7 +3705,7 @@ static int dsi_proto_config(struct omap_dss_device *dssdev)
3689 dsi_set_lp_rx_timeout(dsidev, 0x1fff, true, true); 3705 dsi_set_lp_rx_timeout(dsidev, 0x1fff, true, true);
3690 dsi_set_hs_tx_timeout(dsidev, 0x1fff, true, true); 3706 dsi_set_hs_tx_timeout(dsidev, 0x1fff, true, true);
3691 3707
3692 switch (dssdev->ctrl.pixel_size) { 3708 switch (dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt)) {
3693 case 16: 3709 case 16:
3694 buswidth = 0; 3710 buswidth = 0;
3695 break; 3711 break;
@@ -3814,7 +3830,7 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
3814 3830
3815 dsi_vc_config_source(dsidev, channel, DSI_VC_SOURCE_VP); 3831 dsi_vc_config_source(dsidev, channel, DSI_VC_SOURCE_VP);
3816 3832
3817 bytespp = dssdev->ctrl.pixel_size / 8; 3833 bytespp = dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt) / 8;
3818 bytespl = w * bytespp; 3834 bytespl = w * bytespp;
3819 bytespf = bytespl * h; 3835 bytespf = bytespl * h;
3820 3836
@@ -4023,7 +4039,7 @@ static int dsi_display_init_dispc(struct omap_dss_device *dssdev)
4023 dispc_mgr_enable_fifohandcheck(dssdev->manager->id, 1); 4039 dispc_mgr_enable_fifohandcheck(dssdev->manager->id, 1);
4024 4040
4025 dispc_mgr_set_tft_data_lines(dssdev->manager->id, 4041 dispc_mgr_set_tft_data_lines(dssdev->manager->id,
4026 dssdev->ctrl.pixel_size); 4042 dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt));
4027 4043
4028 { 4044 {
4029 struct omap_video_timings timings = { 4045 struct omap_video_timings timings = {
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index f4196f5d7001..eb716521d775 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -282,6 +282,8 @@ void dsi_create_debugfs_files_reg(struct dentry *debugfs_dir,
282 282
283int dsi_init_display(struct omap_dss_device *display); 283int dsi_init_display(struct omap_dss_device *display);
284void dsi_irq_handler(void); 284void dsi_irq_handler(void);
285u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt);
286
285unsigned long dsi_get_pll_hsdiv_dispc_rate(struct platform_device *dsidev); 287unsigned long dsi_get_pll_hsdiv_dispc_rate(struct platform_device *dsidev);
286int dsi_pll_set_clock_div(struct platform_device *dsidev, 288int dsi_pll_set_clock_div(struct platform_device *dsidev,
287 struct dsi_clock_info *cinfo); 289 struct dsi_clock_info *cinfo);
@@ -312,6 +314,11 @@ static inline int dsi_runtime_get(struct platform_device *dsidev)
312static inline void dsi_runtime_put(struct platform_device *dsidev) 314static inline void dsi_runtime_put(struct platform_device *dsidev)
313{ 315{
314} 316}
317static inline u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt)
318{
319 WARN("%s: DSI not compiled in, returning pixel_size as 0\n", __func__);
320 return 0;
321}
315static inline unsigned long dsi_get_pll_hsdiv_dispc_rate(struct platform_device *dsidev) 322static inline unsigned long dsi_get_pll_hsdiv_dispc_rate(struct platform_device *dsidev)
316{ 323{
317 WARN("%s: DSI not compiled in, returning rate as 0\n", __func__); 324 WARN("%s: DSI not compiled in, returning rate as 0\n", __func__);