linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Andrew Morton <akpm@osdl.org>, Aurelien Jacobs <aurel@gnuage.org>
Cc: linux-fbdev-devel@lists.sourceforge.net, Gerd Knorr <kraxel@bytesex.org>
Subject: Re: Re: [PATCH] vesafb memory size mismatch
Date: Sun, 3 Oct 2004 16:46:38 +0800	[thread overview]
Message-ID: <200410031646.38894.adaplas@hotpop.com> (raw)
In-Reply-To: <20041002185936.1b7421d6.akpm@osdl.org>

On Sunday 03 October 2004 09:59, Andrew Morton wrote:
> (Gerd re-added to Cc)
>
> Aurelien Jacobs <aurel@gnuage.org> wrote:
> > On 01 Oct 2004 17:48:21 +0200
> >
> > Gerd Knorr <kraxel@bytesex.org> wrote:
> > > Aurelien Jacobs <aurel@gnuage.org> writes:
> > > > Hi,
> > > >
> > > > I found a bug in the vesafb driver. The video memory size which is
> > > > reserved by vesafb do not correspond to the really needed memory.
> > >
> > > Oh, while we are at it, I've hacked a patch as well some time ago.
> > > All the size calculation in vesafb is a bit tricky.  I've tried to
> > > cleanup that a bit and fix some bugs along the way, but never managed
> > > to submit it.  I think the boundary check cleanups should also fix the
> > > bug you've seen.
> >
> > Unfortunately not :-(
> > Your patch still keep the same way to calculate minimum memory
> > required for the video mode (based on xres*bytes_per_pixel). It's
> > wrong ! With video cards such as 3dfx in 24 bits mode, line_length
> > is bigger than xres*bytes_per_pixel (probably for alignment pupose).
> > So not enough memory is allocated, leading to a crash.
> >
> > Here is an updated version of your patch with the right way to
> > calculate size_vmode.
>
> OK, I'll drop the patch which I added to -mm.  Could someone please resend
> the final version when it's all sorted out?
>

Yes, Aurelien is correct, calculating the memory needed for a mode is more
accurate if line_length * yres is used.

I'll submit a patch combining Gerd's, Aurelien's and a few of my changes
later today.

Tony




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

      reply	other threads:[~2004-10-03  8:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01 13:36 [PATCH] vesafb memory size mismatch Aurelien Jacobs
2004-10-01 15:48 ` Gerd Knorr
2004-10-01 20:22   ` [Linux-fbdev-devel] " Antonino A. Daplas
2004-10-04  9:27     ` Gerd Knorr
2004-10-03  0:53   ` Aurelien Jacobs
2004-10-03  1:59     ` Andrew Morton
2004-10-03  8:46       ` Antonino A. Daplas [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=200410031646.38894.adaplas@hotpop.com \
    --to=adaplas@hotpop.com \
    --cc=akpm@osdl.org \
    --cc=aurel@gnuage.org \
    --cc=kraxel@bytesex.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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).