diff options
author | Jong Kim <jongk@nvidia.com> | 2012-12-12 16:26:53 -0800 |
---|---|---|
committer | Winnie Hsu <whsu@nvidia.com> | 2012-12-20 11:09:03 -0800 |
commit | 83009bd159cfc34e30fdf0add82722d09ad92556 (patch) | |
tree | 2c9e763a4c65737b3e75d0e851087bbc88481b8a | |
parent | 59afb2be3f9ba5b4fc2d603365f5fe353b257dbc (diff) |
arm: tegra: fb: Update line_length using display width
Unconditionally update line_length using disply width to avoid discrepancy
between line_length and actual display width.
bug 1186388
Change-Id: I8ef2f9cf76a61764c2121f3c2c013b72b830ce2e
Signed-off-by: Jong Kim <jongk@nvidia.com>
Reviewed-on: http://git-master/r/170664
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
-rw-r--r-- | drivers/video/tegra/fb.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c index 59c162bb3b4c..46cbabfe73f0 100644 --- a/drivers/video/tegra/fb.c +++ b/drivers/video/tegra/fb.c @@ -126,12 +126,9 @@ static int tegra_fb_set_par(struct fb_info *info) return -EINVAL; } /* if line_length unset, then pad the stride */ - if (!info->fix.line_length) { - info->fix.line_length = var->xres * var->bits_per_pixel - / 8; - info->fix.line_length = round_up(info->fix.line_length, - TEGRA_LINEAR_PITCH_ALIGNMENT); - } + info->fix.line_length = var->xres * var->bits_per_pixel / 8; + 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; @@ -649,12 +646,8 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev, tegra_fb->valid = true; } - info->fix.line_length = fb_data->xres * fb_data->bits_per_pixel / 8; - - stride = tegra_dc_get_stride(dc, 0); - if (!stride) /* default to pad the stride */ - stride = round_up(info->fix.line_length, - TEGRA_LINEAR_PITCH_ALIGNMENT); + stride = fb_data->xres * fb_data->bits_per_pixel / 8; + stride = round_up(stride, TEGRA_LINEAR_PITCH_ALIGNMENT); info->fbops = &tegra_fb_ops; info->pseudo_palette = pseudo_palette; |