LWN.net Logo

LCA: Two talks on the state of X

LCA: Two talks on the state of X

Posted Feb 8, 2008 20:46 UTC (Fri) by flewellyn (subscriber, #5047)
Parent article: LCA: Two talks on the state of X

The only problem I see with moving the low-level graphics mode setting stuff into the kernel, is that it makes X less portable. If X depends on kernel drivers, then the kernel of any OS that wants to run X will have to have those drivers, or something similar that talks the same interface.

I don't see this being a huge issue with the BSDs, or with OpenSolaris: just write the kernel code, BSD license it, and port it over to each kernel. But what about other platforms?


(Log in to post comments)

LCA: Two talks on the state of X

Posted Feb 8, 2008 20:57 UTC (Fri) by drag (subscriber, #31333) [Link]

Gallium3D should help with that, I believe. It's a very nice idea, at least. Should support
all OSes, including Windows if you really want it to.

http://www.tungstengraphics.com/gallium3D.htm

It should reduce complexity for drivers and thus the OS-specific stuff will be easier to make.

LCA: Two talks on the state of X

Posted Feb 9, 2008 6:26 UTC (Sat) by flewellyn (subscriber, #5047) [Link]

Well, I guess it's true: you can always add another layer of indirection...

LCA: Two talks on the state of X

Posted Feb 9, 2008 17:57 UTC (Sat) by drag (subscriber, #31333) [Link]

Especially when it makes sense.. like making it easier to write simpler drivers that are as
effective as the old ones. (and making that code more portable) Or making it possible to
support APIs other then just OpenGL. Or making it easier for programmers to utilize the GPU
for things other then just making games go fast.

The thing is is that the video card is no longer just useful for accelerating 3D rendering or
making movie playback smooth. 

The GPU is more and more a co-processor for your computer then anything else. A GPU has a
massive amount of floating point performance and it usually has a fat wad of memory that has a
extraordinary amount of bandwidth between it and the GPU. For certain tasks a 300 dollar video
card can blow away a cluster of x86 machines.

LCA: Two talks on the state of X

Posted Feb 10, 2008 2:47 UTC (Sun) by flewellyn (subscriber, #5047) [Link]

This is true. I've read about projects to use the GPU's vector processing for general purpose computing. It's interesting, but it has me wondering when the vendors are going to realize the inefficiency of having two powerful but dissimilar processors on the machine, and fold GPU functions back into the CPU. IBM's Cell architecture may well be an example of this already.

But as far as what you pointed to, I'm a little bit worried about the attempts to cover over differences between OpenGL and D3D. The only reason I'm worried is because, of course, D3D is a moving target, and one for which Microsoft has every reason NOT to cooperate with portability efforts.

LCA: Two talks on the state of X

Posted Feb 10, 2008 17:27 UTC (Sun) by stevenj (subscriber, #421) [Link]

It's interesting, but it has me wondering when the vendors are going to realize the inefficiency of having two powerful but dissimilar processors on the machine, and fold GPU functions back into the CPU. IBM's Cell architecture may well be an example of this already.

This has been going on for decades... see Sutherland's wheel of reincarnation.

LCA: Two talks on the state of X

Posted Feb 10, 2008 22:40 UTC (Sun) by flewellyn (subscriber, #5047) [Link]

Oh, indeed.  That's why I brought it up.

LCA: Two talks on the state of X

Posted Feb 11, 2008 14:08 UTC (Mon) by michaeljt (subscriber, #39183) [Link]

Is that such a problem, given that mode setting is definitely not performance critical?

LCA: Two talks on the state of X

Posted Feb 12, 2008 19:22 UTC (Tue) by rfunk (subscriber, #4054) [Link]

It has nothing to don with being performance-critical, and everything to 
do with low-level hardware interaction.  The Unix philosophy is to have 
the kernel do all direct hardware interaction.

LCA: Two talks on the state of X

Posted Feb 13, 2008 14:19 UTC (Wed) by daenzer (subscriber, #7050) [Link]

> It should reduce complexity for drivers and thus the OS-specific stuff will
> be easier to make.

True, but Gallium3D doesn't really have anything to do with modesetting.

LCA: Two talks on the state of X

Posted Feb 8, 2008 21:46 UTC (Fri) by iabervon (subscriber, #722) [Link]

There's no need to lose the mode setting code entirely. Just leave it in an OS-interaction
section that's used for OSes that don't have mode setting and do allow direct access to the
graphics device. (On the other hand, are there any platforms that aren't open-source and give
the open-source X server direct access to the video card?)

LCA: Two talks on the state of X

Posted Feb 9, 2008 9:01 UTC (Sat) by LWN_net (subscriber, #47938) [Link]

As far as I know BSD's are using xfree, not xorg. Others that have a problem with that can
also just use xfree86.

Nope

Posted Feb 9, 2008 11:03 UTC (Sat) by khim (subscriber, #9252) [Link]

As of May 19th 2007, X.org 7.2 has been merged into the FreeBSD Ports Tree. Read /usr/ports/UPDATING for upgrade instructions., The XFree86 implementation is the default on NetBSD but X.Org from pkgsrc can be used alternatively, etc. BSD's either switched to X.org as default or support it as alternative - and in most cases it's only matter of legacy hardware support.

LCA: Two talks on the state of X

Posted Feb 9, 2008 12:30 UTC (Sat) by ernest (subscriber, #2355) [Link]

Hmmm. I doubted that, so I did a quick google search. 

If i combine bsd and x.org I get much more recent page, some of them with content indicating 
x.org is being used.

When combining bsd and xfree86 I get many more hits, but most of them from the xfree86 web 
site, and also usually older hits.

Specifically:
- when searching the openbsd web site faqs, x.org is mentioned in many places. not so xfree
- on the apple web site is said that X on OSX is x.org based
- from the freebsd wiki we can see that x.org is the default since about a year (but xfree is
also 
being used).
- Similarely netbsd build system explains about x.org, but mentions that xfree can also be
used. 

From all that I gather xfree usage is being dropped from the bsd community in favor of x.org.

Ernest.

LCA: Two talks on the state of X

Posted Feb 9, 2008 16:35 UTC (Sat) by rsidd (subscriber, #2582) [Link]

FreeBSD and OpenBSD switched to Xorg very early (in fact OpenBSD switched before most linux
distros did, and Theo de Raadt was one of the earliest and most vocal condemners of the
XFree86 licence change that prompted the Xorg fork).  For technical reasons (relating to their
build system) NetBSD stuck with XFree86 in their base system, but have xorg in their package
system (pkgsrc) and will be removing XFree86 soon.

LCA: Two talks on the state of X

Posted Feb 9, 2008 12:02 UTC (Sat) by airlied (subscriber, #9104) [Link]

I'm just wondering what other platforms... x drivers are mainly Linux BSDs and OSOL

I'm not sure of another kernel that ppl might care about hw drivers on

LCA: Two talks on the state of X

Posted Feb 9, 2008 17:36 UTC (Sat) by jayavarman (subscriber, #19600) [Link]

I don't understand why this issue is always brought up. Technical improvements _can_not_
become dependent on least common denominator or your so called "portability". I say f#$%
portability! There are people motivated to improve _currently_broken_ things on Linux. If
other people have problems with that they'd better get _working_ and not whine that people are
not doing their work.

Sorry for the harsh words but it's the reality.

Rui

X portability is also a trap

Posted Feb 10, 2008 21:32 UTC (Sun) by arjan (subscriber, #36785) [Link]

In the name of cross-OS portability, for the last 2 decades, X has done it's own hardware
management. [*]  
The effect of this is that while X is nicely portable from one OS to another, the portability
from one generation of hardware to the next got severely compromised, and more than a few
times X needed expanding or changing for this reason. And even more times, the OS kernel, such
as Linux, grew nasty workarounds to keep older versions of X working on newer HW or newer
kernels. 

Lets face it: 
It's the kernels job to manage system resources; doing that twice is a bad mistake. It's also
a kernels job to abstract hardware to a large degree..

For all intents and purposes, this makes the current X part of the kernel (logically). In that
light, the current split is rather bad, and needs to be fixed (and is getting fixed
thankfully). 


[*] Yes I know this is getting fixed.

X portability is also a trap

Posted Feb 10, 2008 22:42 UTC (Sun) by flewellyn (subscriber, #5047) [Link]

Oh, I agree.  I'm just hoping that this is solvable by, say, exporting a uniform interface for
the driver-level stuff on all OSes.

LCA: Two talks on the state of X

Posted Feb 14, 2008 11:36 UTC (Thu) by etienne_lorrain@yahoo.fr (subscriber, #38022) [Link]

 Another solution is to keep the video mode set by the bootloader, using the manufacturer
BIOS, before switching to protected mode.
 The video manufacturer can do whatever he likes at init in his BIOS, the kernel just manages
framebuffers, the X server just enables optimisations over framebuffer once it has recognised
the hardware - if X does not recognise the hardware it still works - but slower.
 Another advantage for CRT users (vs LCD screen) is that parameters like screen size/position
do not change depending on the operating system.

LCA: Two talks on the state of X

Posted Feb 21, 2008 15:49 UTC (Thu) by lgb (guest, #784) [Link]

Nice, but user may want to alter video mode without reboot :) However video card vendor would
ship cards with data tables on their video BIOS to explain register settings for video modes
and likes. Please note that it's possible to use 'int 10h' (real mode) interrupt service to
set up video mode even from Linux with some kind of emulation. Also video bios may contain
code can be used from protected mode directly as well?

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds