summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/fb.c
diff options
context:
space:
mode:
authorDonghan Ryu <dryu@nvidia.com>2011-04-18 23:59:11 +0900
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:44:56 -0800
commit4847384878f81b3bb3b96284c89abdf68fc34876 (patch)
tree952f84940c0cd7cd2c679133a28eda98c3431159 /drivers/video/tegra/fb.c
parent5e484fcfb065f15c8a05a9c571d08dd35ae1deef (diff)
video: tegra: dc: removed incorrect cropping code
there was a cropping code which saves from out of FB.However, the cropping code was wrong and cropping should be done from usermode driver instead of kernel. a warning is added here for easy debugging Bug 792524 Original-Change-Id: Id57243e36f903b14a093dad23a6111032890c01a Reviewed-on: http://git-master/r/28055 Reviewed-by: Donghan Ryu <dryu@nvidia.com> Tested-by: Donghan Ryu <dryu@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R27c0cea87904d63d3c205a166cfcf637b9d75e0e
Diffstat (limited to 'drivers/video/tegra/fb.c')
-rw-r--r--drivers/video/tegra/fb.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index a921ca85d70b..198b76f43035 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -424,12 +424,15 @@ static int tegra_fb_set_windowattr(struct tegra_fb_info *tegra_fb,
win->out_w = flip_win->attr.out_w;
win->out_h = flip_win->attr.out_h;
- 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;
+ if ((((win->out_x + win->out_w) > xres) && (win->out_x < xres)) ||
+ (((win->out_y + win->out_h) > yres) && (win->out_y < yres))) {
+ pr_warning("outside of FB: "
+ "FB=(%d,%d,%d,%d) "
+ "src=(%d,%d,%d,%d) ",
+ "dst=(%d,%d,%d,%d)",
+ 0, 0, xres, yres,
+ win->x, win->y, win->w, win->h,
+ win->out_x, win->out_y, win->out_w, win->out_h);
}
win->z = flip_win->attr.z;