summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/fb.c
diff options
context:
space:
mode:
authorAri Hirvonen <ahirvonen@nvidia.com>2010-11-17 14:17:40 +0200
committerErik Gilling <konkers@android.com>2010-11-18 16:06:46 -0800
commit9a3e1502d56a88f4cf0bb54064cfe709491b9d3e (patch)
tree0a581f17bf2a8b0285f92767d12f8255d444cfad /drivers/video/tegra/fb.c
parent5915336cb101f02a524c7d3fa1aac656b71bee31 (diff)
video: tegra: YUV overlay support
Change-Id: I4bed4d37bc275cca9ef69390c217498529121db0 Signed-off-by: Erik Gilling <konkers@android.com>
Diffstat (limited to 'drivers/video/tegra/fb.c')
-rw-r--r--drivers/video/tegra/fb.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index 47756e4225bb..15a4f5b472a8 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -149,6 +149,9 @@ static int tegra_fb_set_par(struct fb_info *info)
}
info->fix.line_length = var->xres * var->bits_per_pixel / 8;
tegra_fb->win->stride = info->fix.line_length;
+ tegra_fb->win->stride_uv = 0;
+ tegra_fb->win->offset_u = 0;
+ tegra_fb->win->offset_v = 0;
}
if (var->pixclock) {
@@ -176,9 +179,9 @@ static int tegra_fb_set_par(struct fb_info *info)
tegra_dc_set_mode(tegra_fb->win->dc, &mode);
tegra_fb->win->w = info->mode->xres;
- tegra_fb->win->h = info->mode->xres;
+ tegra_fb->win->h = info->mode->yres;
tegra_fb->win->out_w = info->mode->xres;
- tegra_fb->win->out_h = info->mode->xres;
+ tegra_fb->win->out_h = info->mode->yres;
}
return 0;
}
@@ -372,7 +375,10 @@ static int tegra_fb_set_windowattr(struct tegra_fb_info *tegra_fb,
/* STOPSHIP verify that this won't read outside of the surface */
win->phys_addr = flip_win->phys_addr + flip_win->attr.offset;
+ win->offset_u = flip_win->attr.offset_u + flip_win->attr.offset;
+ win->offset_v = flip_win->attr.offset_v + flip_win->attr.offset;
win->stride = flip_win->attr.stride;
+ win->stride_uv = flip_win->attr.stride_uv;
if ((s32)flip_win->attr.pre_syncpt_id >= 0) {
nvhost_syncpt_wait_timeout(&tegra_fb->ndev->host->syncpt,
@@ -737,7 +743,10 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev,
win->z = 0;
win->phys_addr = fb_phys;
win->virt_addr = fb_base;
+ win->offset_u = 0;
+ win->offset_v = 0;
win->stride = fb_data->xres * fb_data->bits_per_pixel / 8;
+ win->stride_uv = 0;
win->flags = TEGRA_WIN_FLAG_ENABLED;
if (fb_mem)