LWN.net Logo

Bad NIH, good NIH

Bad NIH, good NIH

Posted Mar 14, 2013 5:45 UTC (Thu) by Cyberax (✭ supporter ✭, #52523)
In reply to: Bad NIH, good NIH by Serge
Parent article: Canonical reveals plans to launch Mir display server (The H)

> Both X and Wayland request information from display. If that information is available there they can read it. Both. Or do you thing that Wayland is reading the mind of display creators, while Xorg can't do that? ;-)
Yep. Try that trick with Xrandr on legacy NVidia drivers (hint: it doesn't work).

Of course, your app can also read display EDIDs and parse them. Through the X protocol! But that kinda says that you should probably stop doing it.

> Run `xrandr --verbose` and see "Subpixel" there.
Lessee:

>cyberax@whale2:~$ xrandr --verbose
> SZ: Pixels Physical Refresh
>*0 1024 x 768 ( 260mm x 195mm ) *60
>Current rotation - normal
>Current reflection - none
>Rotations possible - normal
>Reflections possible - none
>Setting size to 0, rotation to normal
>Setting reflection on neither axis

Yeah, robust X protocol and all that....

> Indeed, it's a surprise, could you point me to that part of the Wayland protocol?
See "enum transform" and various related events and requests in http://cgit.freedesktop.org/wayland/wayland/tree/protocol... .


(Log in to post comments)

Bad NIH, good NIH

Posted Mar 14, 2013 8:35 UTC (Thu) by Serge (guest, #84957) [Link]

> cyberax@whale2:~$ xrandr --verbose
> SZ: Pixels Physical Refresh
> *0 1024 x 768 ( 260mm x 195mm ) *60
> ...
> Yeah, robust X protocol and all that....

Ha-ha, that was fun. Either you have done that on purpose, or you're testing that on a server back from 2005. :-) You can check `xdpyinfo -ext RENDER` too, it's supported since about 2003.

Xrandr is just a tool to request that information. Xdpyinfo is another one. X-server knows about subpixels and uses them for a loooong time.

> Try that trick with Xrandr on legacy NVidia drivers (hint: it doesn't work).

Why do you think it won't work? Hah! Try Wayland with legacy NVidia driver (hint: it doesn't work)!

> See "enum transform" and various related events and requests

Have you seen that yourself? It's just display rotation, similar to xrandr, not the surface rotation done by compositor.

Bad NIH, good NIH

Posted Mar 14, 2013 10:59 UTC (Thu) by nye (guest, #51576) [Link]

>You can check `xdpyinfo -ext RENDER` too, it's supported since about 2003.

"Screen 0 (sub-pixel order Unknown)"

i915 driver FWIW.

Bad NIH, good NIH

Posted Mar 14, 2013 17:31 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

Can you provide a reference to X specification about subpixel order and its relationship with display transformation? And not for xrandr, please.

Bad NIH, good NIH

Posted Mar 15, 2013 7:15 UTC (Fri) by Serge (guest, #84957) [Link]

> Can you provide a reference to X specification about subpixel order and its relationship with display transformation? And not for xrandr, please.

http://www.x.org/releases/X11R6.9.0/doc/render-protocol.txt

Bad NIH, good NIH

Posted Mar 15, 2013 16:04 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

That's an extension, not the X protocol itself.

Bad NIH, good NIH

Posted Mar 16, 2013 0:15 UTC (Sat) by HelloWorld (guest, #56129) [Link]

Yes, that's true. It also doesn't matter at all.

Bad NIH, good NIH

Posted Mar 16, 2013 7:22 UTC (Sat) by Serge (guest, #84957) [Link]

> That's an extension, not the X protocol itself.

In X world extensions are part of the X11 protocol. For example this particular extension is part of X11R6.9, you can see that in its URL.

Bad NIH, good NIH

Posted Mar 16, 2013 9:08 UTC (Sat) by Cyberax (✭ supporter ✭, #52523) [Link]

But it's not a part of my X server.

Waaahhhh! X encourages fragmentation!

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