diff options
author | Archit Taneja <archit@ti.com> | 2010-08-17 19:44:32 +0530 |
---|---|---|
committer | Samreen <samreen@ti.com> | 2010-08-17 19:44:32 +0530 |
commit | d562a360d64d615da2685950b56786d7e295e23c (patch) | |
tree | 82a7e0f714989bbd071fc6f76f801e1aa699f0d1 | |
parent | 913427094dc99a6b0e65db5ba668b15dd4eb184d (diff) |
OMAP Writeback Changes
-rw-r--r-- | drivers/media/video/omap/omap_vout.c | 41 | ||||
-rw-r--r-- | drivers/media/video/omap/omap_wb.c | 19 |
2 files changed, 32 insertions, 28 deletions
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c index 70a8a00ff9fd..f1d6248c540a 100644 --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c @@ -241,6 +241,7 @@ static void omap_vout_free_buffer(unsigned long virtaddr, u32 phys_addr, } #ifndef CONFIG_ARCH_OMAP4 +/* * Function for allocating video buffers */ static int omap_vout_allocate_vrfb_buffers(struct omap_vout_device *vout, @@ -909,21 +910,21 @@ int omapvid_setup_overlay(struct omap_vout_device *vout, info.out_height = outh; info.global_alpha = vout->vid_info.overlays[0]->info.global_alpha; -#ifndef CONFIG_ARCH_OMAP4 - if (!rotation_enabled(vout)) { - info.rotation = 0; - info.rotation_type = OMAP_DSS_ROT_DMA; - info.screen_width = pixwidth; + if (!cpu_is_omap44xx()) { + if (!rotation_enabled(vout)) { + info.rotation = 0; + info.rotation_type = OMAP_DSS_ROT_DMA; + info.screen_width = pixwidth; + } else { + info.rotation = vout->rotation; + info.rotation_type = OMAP_DSS_ROT_VRFB; + info.screen_width = 2048; + } } else { + info.rotation_type = OMAP_DSS_ROT_TILER; + info.screen_width = pixwidth; info.rotation = vout->rotation; - info.rotation_type = OMAP_DSS_ROT_VRFB; - info.screen_width = 2048; } -#else - info.rotation_type = OMAP_DSS_ROT_TILER; - info.screen_width = pixwidth; - info.rotation = vout->rotation; -#endif v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, "%s enable=%d addr=%x width=%d\n height=%d color_mode=%d\n" @@ -1050,7 +1051,9 @@ void omap_vout_isr(void *arg, unsigned int irqstatus) struct omap_vout_device *vout = (struct omap_vout_device *)arg; unsigned long flags; int irq = 0; - +#ifndef CONFIG_OMAP2_DSS_HDMI + u32 fid; +#endif if (!vout->streaming) return; @@ -1258,7 +1261,6 @@ static int omap_vout_buffer_setup(struct videobuf_queue *q, unsigned int *count, *count = vout->buffer_allocated = i; #else - /* tiler_alloc_buf to be called here pre-requisites: rotation, format? based on that buffers will be allocated. @@ -1422,10 +1424,10 @@ static int omap_vout_buffer_prepare(struct videobuf_queue *q, * from this array will be used to configure DSS */ vout->queued_buf_addr[vb->i] = (u8 *) vout->vrfb_context[vb->i].paddr[rotation]; -#else /* TILER to be used */ +#else /* TILER to be used */ /* Here, we need to use the physical addresses given by Tiler: - */ + */ dmabuf = vout->buf_phy_addr[vb->i]; vout->queued_buf_addr[vb->i] = (u8 *) vout->buf_phy_addr[vb->i]; vout->queued_buf_uv_addr[vb->i] = (u8 *) vout->buf_phy_uv_addr[vb->i]; @@ -1837,17 +1839,14 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh, /* get the framebuffer parameters */ -#ifndef CONFIG_ARCH_OMAP4 - if (rotate_90_or_270(vout)) { + if (!cpu_is_omap44xx() && rotate_90_or_270(vout)) { vout->fbuf.fmt.height = timing->x_res; vout->fbuf.fmt.width = timing->y_res; } else { -#endif vout->fbuf.fmt.height = timing->y_res; vout->fbuf.fmt.width = timing->x_res; -#ifndef CONFIG_ARCH_OMAP4 } -#endif + /* change to samller size is OK */ bpp = omap_vout_try_format(&f->fmt.pix); diff --git a/drivers/media/video/omap/omap_wb.c b/drivers/media/video/omap/omap_wb.c index f6ed1f51d005..136b57c95c35 100644 --- a/drivers/media/video/omap/omap_wb.c +++ b/drivers/media/video/omap/omap_wb.c @@ -80,31 +80,36 @@ int omap_setup_wb(struct omap_wb_device *wb_device, u32 addr, u32 uv_addr) struct omap_writeback *wb; struct omap_overlay_manager *mgr = NULL; struct omap_writeback_info wb_info; + struct omap_overlay *ovl = NULL; int r = 0; int i = 0; wb_info.enabled = true; wb_info.info_dirty = true; wb_info.capturemode = wb_device->capturemode; wb_info.dss_mode = wb_device->dss_mode; - wb_info.height = wb_device->pix.height; - wb_info.width = wb_device->pix.width; - wb_info.out_height = wb_device->win.w.height; - wb_info.out_width = wb_device->win.w.width; + wb_info.out_height = wb_device->pix.height; + wb_info.out_width = wb_device->pix.width; wb_info.source = wb_device->source; wb_info.source_type = wb_device->source_type; wb_info.paddr = addr; wb_info.puv_addr = uv_addr; + ovl = omap_dss_get_overlay(wb_info.source - 3); + + wb_info.height = ovl->info.out_height; + wb_info.width = ovl->info.out_width; + v4l2_dbg(1, debug_wb, &wb_device->wb_dev->v4l2_dev, "omap_write back struct contents :\n" "enabled = %d\n infodirty = %d\n" "capturemode = %d\n dss_mode = %d\n" - "height = %ld\n width = %ld\n source = %d\n" + "height = %ld\n width = %ld\n out_height = %ld\n" + "out_width = %ld\n source = %d\n" "source_type = %d\n paddr =%lx\n puvaddr = %lx\n", wb_info.enabled, wb_info.info_dirty, wb_info.capturemode, wb_info.dss_mode, wb_info.height, wb_info.width, - wb_info.source, wb_info.source_type, wb_info.paddr, - wb_info.puv_addr); + wb_info.out_height, wb_info.out_width, wb_info.source, + wb_info.source_type, wb_info.paddr, wb_info.puv_addr); for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) { /* Fix : checking for mgr will shift to DSS2 */ |