From: York Sun <yorksun@freescale.com>
To: akpm@linux-foundation.org
Cc: linuxppc-dev@ozlabs.org, linux-fbdev-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, York Sun <yorksun@freescale.com>
Subject: [PATCH 2/2] Bug fix. Add sanity check for AOI position
Date: Wed, 13 Aug 2008 15:55:04 -0500 [thread overview]
Message-ID: <1218660906446-git-send-email-yorksun@freescale.com> (raw)
In-Reply-To: <12186609063047-git-send-email-yorksun@freescale.com>
AOI position cannot be negative.
Signed-off-by: York Sun <yorksun@freescale.com>
---
drivers/video/fsl-diu-fb.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index d67e79b..8898d2a 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -479,6 +479,10 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var,
base_plane_width = machine_data->fsl_diu_info[0]->var.xres;
base_plane_height = machine_data->fsl_diu_info[0]->var.yres;
+ if (mfbi->x_aoi_d < 0)
+ mfbi->x_aoi_d = 0;
+ if (mfbi->y_aoi_d < 0)
+ mfbi->y_aoi_d = 0;
switch (index) {
case 0:
if (mfbi->x_aoi_d != 0)
--
1.5.2.2
prev parent reply other threads:[~2008-08-13 20:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 20:55 [PATCH 0/2] Add virtual resolution and panning for Freescale DIU York Sun
2008-08-13 20:55 ` [PATCH 1/2] Added virtual resolution and panning support York Sun
2008-08-13 20:55 ` York Sun [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1218660906446-git-send-email-yorksun@freescale.com \
--to=yorksun@freescale.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).