aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/omap2/dss/dispc.c27
-rw-r--r--drivers/video/omap2/dss/dss.h2
-rw-r--r--include/video/omapdss.h13
3 files changed, 42 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index f0796bafa74e..4d8e04583873 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -2481,6 +2481,33 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
2481 return r; 2481 return r;
2482} 2482}
2483 2483
2484int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
2485 const struct omap_video_timings *mgr_timings)
2486{
2487 int r;
2488 enum omap_plane plane = OMAP_DSS_WB;
2489 const int pos_x = 0, pos_y = 0;
2490 const u8 zorder = 0, global_alpha = 0;
2491 const bool replication = false;
2492 int in_width = mgr_timings->x_res;
2493 int in_height = mgr_timings->y_res;
2494 enum omap_overlay_caps caps =
2495 OMAP_DSS_OVL_CAP_SCALE | OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA;
2496
2497 DSSDBG("dispc_wb_setup, pa %x, pa_uv %x, %d,%d -> %dx%d, cmode %x, "
2498 "rot %d, mir %d\n", wi->paddr, wi->p_uv_addr, in_width,
2499 in_height, wi->width, wi->height, wi->color_mode, wi->rotation,
2500 wi->mirror);
2501
2502 r = dispc_ovl_setup_common(plane, caps, wi->paddr, wi->p_uv_addr,
2503 wi->buf_width, pos_x, pos_y, in_width, in_height, wi->width,
2504 wi->height, wi->color_mode, wi->rotation, wi->mirror, zorder,
2505 wi->pre_mult_alpha, global_alpha, wi->rotation_type,
2506 replication, mgr_timings, false);
2507
2508 return r;
2509}
2510
2484int dispc_ovl_enable(enum omap_plane plane, bool enable) 2511int dispc_ovl_enable(enum omap_plane plane, bool enable)
2485{ 2512{
2486 DSSDBG("dispc_enable_plane %d, %d\n", plane, enable); 2513 DSSDBG("dispc_enable_plane %d, %d\n", plane, enable);
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 379e0782eefb..3f9208e88203 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -487,6 +487,8 @@ void dispc_mgr_setup(enum omap_channel channel,
487 struct omap_overlay_manager_info *info); 487 struct omap_overlay_manager_info *info);
488 488
489void dispc_wb_set_channel_in(enum dss_writeback_channel channel); 489void dispc_wb_set_channel_in(enum dss_writeback_channel channel);
490int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
491 const struct omap_video_timings *timings);
490 492
491/* VENC */ 493/* VENC */
492#ifdef CONFIG_OMAP2_DSS_VENC 494#ifdef CONFIG_OMAP2_DSS_VENC
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 46097bd052a2..3729173b7fbc 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -510,6 +510,19 @@ struct omap_dsi_pin_config {
510 int pins[OMAP_DSS_MAX_DSI_PINS]; 510 int pins[OMAP_DSS_MAX_DSI_PINS];
511}; 511};
512 512
513struct omap_dss_writeback_info {
514 u32 paddr;
515 u32 p_uv_addr;
516 u16 buf_width;
517 u16 width;
518 u16 height;
519 enum omap_color_mode color_mode;
520 u8 rotation;
521 enum omap_dss_rotation_type rotation_type;
522 bool mirror;
523 u8 pre_mult_alpha;
524};
525
513struct omap_dss_output { 526struct omap_dss_output {
514 struct list_head list; 527 struct list_head list;
515 528