diff options
author | Dan Willemsen <dwillemsen@nvidia.com> | 2011-01-26 17:41:44 -0800 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-01-31 16:52:58 -0800 |
commit | fdd02f7c0f08162c369b1454e7f86ad713731e21 (patch) | |
tree | 9f174728af23bd8d3b3fbccfd4af8f713dfcb452 /drivers | |
parent | c356539f56daf35a0d82a3363a632f2d23f39337 (diff) |
video: tegra: Fix HDMI mirroring corruption
The new overlay code had this change commented out, because I hadn't
figured out how to get the resolution of the display outside of the fb
driver. This change now grabs it from the h_active and v_active of the
current mode.
Old Change:
video: tegra: Fixed the HDMI corruption issue.
If internal panel has different resolution compared
to HDMI panel, then window attributes are calculated
differently, this causes HDMI panel to show corruption.
This is fixed by checking actual display resolution
while computing window attributes.
Bug 784995
Change-Id: I1ba2a85355ae02ed8914fbc32ea695f53ff9a947
Reviewed-on: http://git-master/r/17139
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/tegra/dc/overlay.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/video/tegra/dc/overlay.c b/drivers/video/tegra/dc/overlay.c index c968f828815b..d522b394fcc6 100644 --- a/drivers/video/tegra/dc/overlay.c +++ b/drivers/video/tegra/dc/overlay.c @@ -130,16 +130,15 @@ static int tegra_overlay_set_windowattr(struct tegra_overlay_info *overlay, struct tegra_dc_win *win, const struct tegra_overlay_flip_win *flip_win) { + int xres, yres; if (flip_win->handle == NULL) { win->flags = 0; win->cur_handle = NULL; return 0; } -#if 0 - xres = overlay->dc->fb->info->var.xres; - yres = overlay->dc->fb->info->var.yres; -#endif + xres = overlay->dc->mode.h_active; + yres = overlay->dc->mode.v_active; win->flags = TEGRA_WIN_FLAG_ENABLED; if (flip_win->attr.blend == TEGRA_FB_WIN_BLEND_PREMULT) @@ -156,13 +155,11 @@ static int tegra_overlay_set_windowattr(struct tegra_overlay_info *overlay, win->out_w = flip_win->attr.out_w; win->out_h = flip_win->attr.out_h; -#if 0 if (((win->out_x + win->out_w) > xres) && (win->out_x < xres)) win->out_w = xres - win->out_x; if (((win->out_y + win->out_h) > yres) && (win->out_y < yres)) win->out_h = yres - win->out_y; -#endif win->z = flip_win->attr.z; win->cur_handle = flip_win->handle; |