diff options
author | Joseph Lehrer <jlehrer@nvidia.com> | 2011-10-03 16:25:53 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:32 -0800 |
commit | ed4577d35d37ee96fa7d37ed87882d8ce84d1692 (patch) | |
tree | b18bba24eb4ab13828b6d8cc0943ba8335d10045 /drivers | |
parent | 2d2556f385474681b0f85960679e1b7a628da178 (diff) |
video: tegra: set fb line_length to physical pitch
bug 867222
Change-Id: I782620ac5f9cc633b52bc525fecbdf56cef23002
Reviewed-on: http://git-master/r/54351
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R4df4ce6e36fa490ffad3233c1a7b09330c2a6f74
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/tegra/fb.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c index 72176b7e99a5..7b01f1ef72a2 100644 --- a/drivers/video/tegra/fb.c +++ b/drivers/video/tegra/fb.c @@ -108,8 +108,9 @@ static int tegra_fb_set_par(struct fb_info *info) } info->fix.line_length = var->xres * var->bits_per_pixel / 8; /* Pad the stride to 16-byte boundary. */ - tegra_fb->win->stride = round_up(info->fix.line_length, + info->fix.line_length = round_up(info->fix.line_length, TEGRA_LINEAR_PITCH_ALIGNMENT); + tegra_fb->win->stride = info->fix.line_length; tegra_fb->win->stride_uv = 0; tegra_fb->win->phys_addr_u = 0; tegra_fb->win->phys_addr_v = 0; @@ -410,6 +411,10 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev, info->fix.accel = FB_ACCEL_NONE; info->fix.smem_start = fb_phys; info->fix.smem_len = fb_size; + info->fix.line_length = fb_data->xres * fb_data->bits_per_pixel / 8; + /* Pad the stride to 16-byte boundary. */ + info->fix.line_length = round_up(info->fix.line_length, + TEGRA_LINEAR_PITCH_ALIGNMENT); info->var.xres = fb_data->xres; info->var.yres = fb_data->yres; @@ -442,9 +447,7 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev, win->virt_addr = fb_base; win->phys_addr_u = 0; win->phys_addr_v = 0; - win->stride = fb_data->xres * fb_data->bits_per_pixel / 8; - /* Pad the stride to 16-byte boundary. */ - win->stride = round_up(win->stride, TEGRA_LINEAR_PITCH_ALIGNMENT); + win->stride = info->fix.line_length; win->stride_uv = 0; win->flags = TEGRA_WIN_FLAG_ENABLED; |