linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Smirl <jonsmirl@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Jon Smirl" <jonsmirl@yahoo.com>,
	"Michel Dänzer" <michel@daenzer.net>,
	dri-devel@lists.sourceforge.net,
	"Linux Fbdev development list"
	<linux-fbdev-devel@lists.sourceforge.net>,
	xorg@lists.freedesktop.org
Subject: Re: FB model basic issues (WAS: radeon, apertures & memory mapping)
Date: Tue, 15 Mar 2005 00:30:48 -0500	[thread overview]
Message-ID: <9e473391050314213075ce0e47@mail.gmail.com> (raw)
In-Reply-To: <1110839873.5673.41.camel@gaston>

On Tue, 15 Mar 2005 09:37:53 +1100, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> 
> > Be that as it may, it remains a fact that such a change would break
> > existing installations...
> >
> > I think that mode setting and memory allocation should be separated. X
> > will always reserve enough video RAM for the largest resolution it uses
> > for the screen contents.
> 
> But X has no control on where fbdev will allocate memory. We are
> thinking with the "new model" in mind, and so far, a mode setting is
> under control of the framebuffer. Content of video memory (framebuffer,
> textures, overlay, whatever) simply cannot be considered as preserved
> accross mode switches.

I can agree that all video memory for that head can be booted. But
just because one head changes mode we shouldn't boot the objects for
the other head. You wouldn't want the two user case of one user
changing modes making the other user's display blink.

> 
> We can't also block all evolutions just because we have to support a
> broken model. We'll need to find a way to deal with that. An idea would
> be for me to do the clearing only when I come from a different bit depth
> or from text mode. That is, what i want to avoid, is those artifacts
> caused by incorrect bit depth content. A strict mode change isn't an
> issue in this case. That would solve my immediate problem.
> 
> _BUT_ in the long run, X will have to be smarter. Current UseFBDev or X
> "fbdev" can't support dual head properly on top of fbdev anyway, so that
> means I have some flexibility. The second head will probably" move on
> mode switches since I intend to allocate it at the top of the accessible
> aperture as described by Jon.

I agree that X has to be fixed to work cooperatively in this environment. 
The alternative is to just leave X alone and make all of this work for XGL.
The user would then choose which environment they want to run.

I'm leaning toward just leaving X alone and spending the resources on 
making XGL work. After all XGL is a complete X replacement.

If you want to run existing X load an old fbdev driver.  We can keep both
fbdev drivers in the kernel until it is clear if XGL is going mainstream.

One thing that does need to get fixed is mesa support for non-accelerated
fbdev drivers but mesa can add all of the appropriate locking.

> 
> All of that just keep uncovering more and more issues with our current
> fbdev model though. From discussions we had so far, it uncovers the
> problem of arbitration. That is, can we simply afford having a process
> mmap /dev/fb and blast things to it without any arbitration like we do
> today ?
> 
> If the answer is yes, then we are in deep trouble for lots of reason:
> 
>  - VGA Arbitration might require us to flip/flop MEM/IO enable bits
>  - Swapper control as explained earlier unless I can "reserve" a swapper
>    for each head, that is manage to have one aperture per head
>  - Engine discipline. What if the client on head 0 (like current X) uses
>    the engine ? Even if the one on head 1 doesn't, simple framebuffer
>    accesses can be enough to lock up the card.
>  - etc....
> 
> I think that Jon's dream of having totally independant heads that can
> run 2 separate applications is a long way away and we have sort-of to
> tie /dev/fb's together, though I don't know how to acheive that in
> practice, unless we switch to a new API that can enforce it. The current
> fbdev API cannot.

This is definitely something to works towards. There is a lot of
application for this in schools, libraries, internet cafe, etc. There
are several companies selling variations on this.

I don't expect an immediate solution but I want to make sure the
redesign allows it to be built.

> 
> DRI can do such things afaik (manage several contexts etc...), at least
> provides the infrastructure for it. But until all clients are DRI
> clients, we have a problem. That means that any direct fb client has to
> take over the entire card. All heads. There is simply no choice, and
> that doesn't even help with the VGA arbitration issue which still
> require explicit lock/unlock around accesses.
> 
> I'm open to suggestions...

Can we put in our own fault handler for the mmap, trap the directfb
accesses and do the proper locking?

> 
> Ben.
> 
> _______________________________________________
> xorg mailing list
> xorg@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
> 


-- 
Jon Smirl
jonsmirl@gmail.com

  parent reply	other threads:[~2005-03-15  5:30 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-13  1:35 radeon, apertures & memory mapping Benjamin Herrenschmidt
2005-03-13  3:22 ` Jon Smirl
2005-03-13  6:43   ` Benjamin Herrenschmidt
2005-03-13 16:22     ` Jon Smirl
2005-03-14  4:28     ` [Linux-fbdev-devel] " Michel Dänzer
2005-03-14  7:12       ` Benjamin Herrenschmidt
2005-03-14 16:20         ` Michel Dänzer
2005-03-14 21:52           ` Benjamin Herrenschmidt
2005-03-14 22:12             ` Michel Dänzer
2005-03-14 22:37               ` FB model basic issues (WAS: radeon, apertures & memory mapping) Benjamin Herrenschmidt
2005-03-15  4:59                 ` Michel Dänzer
2005-03-15  5:14                   ` Jon Smirl
2005-03-15  6:01                   ` Ville Syrjälä
2005-03-15  6:59                     ` Benjamin Herrenschmidt
2005-03-15 14:00                       ` Ville Syrjälä
2005-03-15 14:29                         ` Jon Smirl
2005-03-15 17:25                           ` Jan Gukelberger
2005-03-15 23:34                         ` Benjamin Herrenschmidt
2005-03-15  8:51                     ` Geert Uytterhoeven
2005-03-15 13:36                       ` [Linux-fbdev-devel] " Ville Syrjälä
2005-03-15 23:33                         ` Benjamin Herrenschmidt
2005-03-15 23:37                         ` Antonino A. Daplas
2005-03-15 23:50                           ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2005-03-16  1:47                             ` Ville Syrjälä
2005-03-16  1:51                               ` Benjamin Herrenschmidt
2005-03-16 19:51                                 ` Ville Syrjälä
2005-03-16 21:00                                   ` Michel Dänzer
2005-03-16 21:07                                     ` Ville Syrjälä
2005-03-16 23:28                                     ` Benjamin Herrenschmidt
2005-03-16 23:53                                       ` Michel Dänzer
2005-03-16 23:25                                   ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
     [not found]                         ` <1110929582.25201.34.camel@gaston>
2005-03-16  5:21                           ` Michel Dänzer
2005-03-16  6:31                             ` Benjamin Herrenschmidt
2005-03-16 14:09                               ` Ville Syrjälä
2005-03-16 16:48                                 ` Adam Jackson
2005-03-16 23:20                                   ` Benjamin Herrenschmidt
2005-03-15 11:30                     ` Roland Scheidegger
2005-03-15 13:27                       ` Ville Syrjälä
2005-03-15 17:17                       ` Michel Dänzer
2005-03-16  3:09                         ` Benjamin Herrenschmidt
2005-03-16 20:08                           ` Ville Syrjälä
2005-03-16 20:42                             ` [Linux-fbdev-devel] " Michel Dänzer
2005-03-16 23:26                               ` Benjamin Herrenschmidt
2005-03-16 23:35                                 ` Jon Smirl
2005-03-17  0:06                                   ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2005-03-16 20:58                             ` Alex Deucher
2005-03-16 21:08                               ` Ville Syrjälä
2005-03-16 21:17                                 ` Alex Deucher
2005-03-16 23:30                                 ` Benjamin Herrenschmidt
2005-03-17  0:47                                   ` Ville Syrjälä
2005-03-17  1:12                                     ` Benjamin Herrenschmidt
2005-03-17  1:25                                       ` Ville Syrjälä
2005-03-17  2:00                                         ` Benjamin Herrenschmidt
2005-03-17  9:08                                         ` Geert Uytterhoeven
2005-03-17 19:54                                           ` [Linux-fbdev-devel] " Ville Syrjälä
2005-03-15 22:44                     ` Benjamin Herrenschmidt
2005-03-15 23:05                       ` Ville Syrjälä
2005-03-15 23:49                         ` Benjamin Herrenschmidt
2005-03-16 20:55                           ` Ville Syrjälä
2005-03-16 23:27                             ` Benjamin Herrenschmidt
2005-03-17  0:14                               ` Ville Syrjälä
2005-03-17  0:28                                 ` Benjamin Herrenschmidt
2005-03-15  6:45                   ` Benjamin Herrenschmidt
2005-03-15  5:30                 ` Jon Smirl [this message]
2005-03-15  6:58                   ` Benjamin Herrenschmidt
2005-03-15 21:58                   ` Ian Romanick
2005-03-13  3:55 ` radeon, apertures & memory mapping Vladimir Dergachev
2005-03-13  6:44   ` Benjamin Herrenschmidt
2005-03-13  8:22 ` Ville Syrjälä
2005-03-13  9:20   ` Benjamin Herrenschmidt
2005-03-13 10:39     ` Ville Syrjälä
2005-03-13 12:04       ` Benjamin Herrenschmidt
2005-03-13 16:19         ` Jon Smirl
2005-03-13 17:47           ` Ville Syrjälä
2005-03-13 17:56             ` [Linux-fbdev-devel] " Jon Smirl
2005-03-13 21:52               ` Benjamin Herrenschmidt
2005-03-13 22:17                 ` Jon Smirl
2005-03-13 22:41                   ` Benjamin Herrenschmidt
2005-03-13 21:51             ` Benjamin Herrenschmidt
2005-03-13 21:49           ` Benjamin Herrenschmidt
2005-03-13 22:10             ` Jon Smirl
2005-03-13 22:20               ` Benjamin Herrenschmidt
2005-03-13 23:00                 ` Jon Smirl
2005-03-13 23:11                   ` Benjamin Herrenschmidt
2005-03-13 23:27                   ` Ville Syrjälä
2005-03-13 23:48                     ` Benjamin Herrenschmidt
2005-03-14  0:08                       ` Ville Syrjälä
2005-03-14  0:10                         ` Benjamin Herrenschmidt
2005-03-14  0:25                       ` Jon Smirl
2005-03-14  0:39                         ` Ville Syrjälä
2005-03-14  1:02                           ` Benjamin Herrenschmidt
2005-03-14  0:54                         ` Benjamin Herrenschmidt
2005-03-14  0:41                   ` Paul Mackerras
2005-03-14  0:56                     ` Ville Syrjälä
2005-03-14  1:05                       ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2005-03-14  1:47                         ` Jon Smirl
2005-03-14  3:59                           ` Benjamin Herrenschmidt
2005-03-14  4:07                           ` Paul Mackerras
2005-03-14  4:40                             ` Jon Smirl
2005-03-14  5:09                               ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2005-03-14 16:30                         ` Soeren Sandmann
2005-03-14 16:40                           ` Ville Syrjälä
2005-03-14 21:54                           ` Benjamin Herrenschmidt
2005-03-14 16:16         ` Ville Syrjälä
2005-03-14 21:27           ` Donnie Berkholz
2005-03-14 21:51           ` Benjamin Herrenschmidt

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=9e473391050314213075ce0e47@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=jonsmirl@yahoo.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=michel@daenzer.net \
    --cc=xorg@lists.freedesktop.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).