From: daniel@caiaq.de (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: pxafb: Use the passed fb_var_screeninfo struct in pxafb_pan_display()
Date: Fri, 30 Oct 2009 12:19:20 +0100 [thread overview]
Message-ID: <20091030111920.GC14091@buzzloop.caiaq.de> (raw)
In-Reply-To: <20091029195156.GI22046@sci.fi>
On Thu, Oct 29, 2009 at 09:51:56PM +0200, Ville Syrj?l? wrote:
> On Wed, Oct 28, 2009 at 10:13:17AM +0800, Eric Miao wrote:
> > I see no problem with this patch, applied to 'devel'.
>
> This patch looks broken to me. The only fields of of the fb_var_screeninfo
> passed to pan_display that should be used are xoffset, yoffset and
> vmode & FB_VMODE_YWRAP. The rest are not checked by the common code at
> all and depending on the hardware the pan operation may involve looking
> at any number of fields from fb_var_screeninfo so if other fields are
> taken from the passed fb_var_screeninfo the pan operation may end up doing
> a lot more than panning (eg. it could change the video mode). Even worse
> things could happen since the values are not checked at all.
>
> To prevent driver authors' from shooting themselves in the foot it might
> make sense to change the common code to make a copy of info->var and
> merge those three fields from the passed fb_var_screeninfo into the copy,
> which would then be passed to the driver.
Agreed. See the fixup patch below. I did that locally now for pxafb to
fix the potential regression. Eventually code like this could go to some
more generic place.
Thanks for pointing this out!
Daniel
next prev parent reply other threads:[~2009-10-30 11:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 6:34 [PATCH] ARM: pxafb: Use the passed fb_var_screeninfo struct in pxafb_pan_display() Daniel Mack
2009-10-28 0:18 ` Daniel Mack
2009-10-28 2:13 ` Eric Miao
2009-10-29 19:51 ` Ville Syrjälä
2009-10-30 3:19 ` Eric Miao
2009-10-30 11:19 ` Daniel Mack [this message]
2009-11-04 14:44 ` Eric Miao
-- strict thread matches above, loose matches on Subject: below --
2009-05-06 14:22 Sven Neumann
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=20091030111920.GC14091@buzzloop.caiaq.de \
--to=daniel@caiaq.de \
--cc=linux-arm-kernel@lists.infradead.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).