linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: linux-fbdev-devel@lists.sourceforge.net, Kronos <kronos@people.it>
Cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.4.29-pre1] radeonfb: don't try to ioreamp the entire VRAM [was: Re: why does radeonfb work fine in 2.6, but not in 2.4.29-pre1?]
Date: Thu, 2 Dec 2004 05:50:38 +0800	[thread overview]
Message-ID: <200412020550.38324.adaplas@hotpop.com> (raw)
In-Reply-To: <20041201203711.GA21008@dreamland.darkstar.lan>

On Thursday 02 December 2004 04:37, Kronos wrote:
> Il Wed, Dec 01, 2004 at 05:25:52PM +0100, Geert Uytterhoeven ha scritto:
> > > Make fb layer aware of the difference between the ioremap()'ed VRAM and
> > > total available VRAM.
> > > smem_len in struct fb_fix_screeninfo still contains the amount of
> > > physical VRAM (reported to userspace via FBIOGET_FSCREENINFO ioctl) and
> > > the new field mapped_vram contains the amount of VRAM actually
> > > ioremap()'ed by drivers (used in read/write/mmap operations).
> > > Since there was unused padding at the end of struct fb_fix_screeninfo
> > > binary compatibility with userspace utilities is retained.
> > > If mapped_vram is not set it's assumed that the entire framebuffer is
> > > mapped, thus other drivers are unaffected by this patch.
> > >
> > > The patch has been tested by Jurriaan <thunder7@xs4all.nl>.
> > >
> > > Signed-off-by: Luca Tettamanti <kronos@people.it>
> > >
> > > --- a/include/linux/fb.h	2004-11-30 18:30:08.000000000 +0100
> > > +++ b/include/linux/fb.h	2004-11-30 18:33:00.000000000 +0100
> > > @@ -126,7 +126,8 @@
> > >  					/* (physical address) */
> > >  	__u32 mmio_len;			/* Length of Memory Mapped I/O  */
> > >  	__u32 accel;			/* Type of acceleration available */
> > > -	__u16 reserved[3];		/* Reserved for future compatibility */
> > > +	__u32 mapped_vram;		/* Amount of ioremap()'ed VRAM */
> > > +	__u16 reserved[1];		/* Reserved for future compatibility */
> > >  };
> >
> > I don't really like this patch. mapped_vram doesn't matter for user space
> > at all, so it does not belong to fb_fix_screeninfo.
>
> Hmm, it looked sensible to me since it's the max amount of data that
> userspace can read (or write) from /dev/fb%d.

Userspace already use fix.line_length * var.yres_virtual to compute the
amount it can access, which is not necessarily equal to the mapped vram.

> Putting mapped_vram in fb_info would be acceptable?

Yes, that is a more sensible solution.

Tony




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/

      parent reply	other threads:[~2004-12-01 21:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-28 18:46 why does radeonfb work fine in 2.6, but not in 2.4.29-pre1? Jurriaan
2004-11-29 20:27 ` Jurriaan
2004-11-29 21:35 ` Kronos
2004-11-30  6:55   ` Jurriaan
2004-11-30 17:56     ` Kronos
2004-12-01 16:14 ` [PATCH 2.4.29-pre1] radeonfb: don't try to ioreamp the entire VRAM [was: Re: [Linux-fbdev-devel] why does radeonfb work fine in 2.6, but not in 2.4.29-pre1?] Kronos
2004-12-01 16:25   ` Geert Uytterhoeven
2004-12-01 20:37     ` [PATCH 2.4.29-pre1] radeonfb: don't try to ioreamp the entire VRAM [was: " Kronos
2004-12-01 21:25       ` [PATCH 2.4.29-pre1] radeonfb: don't try to ioreamp the entire VRAM [was: Re: [Linux-fbdev-devel] " Geert Uytterhoeven
2004-12-02 15:28         ` Kronos
2004-12-02 15:39           ` Geert Uytterhoeven
2004-12-02 15:53             ` [PATCH 2.4.29-pre1] radeonfb: don't try to ioreamp the entire VRAM [was: " Kronos
2004-12-02 12:43               ` [PATCH 2.4.29-pre1] radeonfb: don't try to ioreamp the entire VRAM [was: Re: [Linux-fbdev-devel] " Marcelo Tosatti
2004-12-01 21:50       ` 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=200412020550.38324.adaplas@hotpop.com \
    --to=adaplas@hotpop.com \
    --cc=kronos@people.it \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /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).