Bug 7814 - Add a color swizzling mode
Summary: Add a color swizzling mode
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xephyr (show other bugs)
Version: 7.0.0
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Matthew Allum
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-08 10:28 UTC by Manu Cornet
Modified: 2018-06-11 18:44 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch implementing swizzle + simple antialiasing (8.54 KB, patch)
2006-08-08 10:32 UTC, Manu Cornet
no flags Details | Splinter Review
(Shorter) Patch implementing swizzle + simple antialiasing (7.44 KB, patch)
2006-08-08 11:13 UTC, Manu Cornet
no flags Details | Splinter Review
Patch for swizzle mode with a new postprocessing algorithm (29.71 KB, patch)
2006-08-14 13:44 UTC, Manu Cornet
no flags Details | Splinter Review
Patch for color swizzling mode (-swizzle option) (33.69 KB, patch)
2006-08-18 08:52 UTC, Manu Cornet
no flags Details | Splinter Review

Description Manu Cornet 2006-08-08 10:28:59 UTC
In order to simulate the display of the "One Laptop per Child" laptop, Xephyr
needs a "color swizzling" mode.

To match the actual hardware as well as possible, this mode only keeps the red
component of the signal for the first pixel, the green one for the second pixel,
etc.

Moreover, it performs a very simple antialiasing (only taking into account the
four nearest neighbors).

See the attached patch, against Xephyr 6.6.1.
Comment 1 Manu Cornet 2006-08-08 10:32:11 UTC
Created attachment 6499 [details] [review]
Patch implementing swizzle + simple antialiasing

Before integrating this code into Xephyr, you might want to change two things:

1) Enable/disable swizzling with an option (right now, just a "swizzle"
variable).
2) When the depth is not 16 (which is best for emulating the OLPC), maybe do
something else than just spit out an error message. Just switch to 16bit depth?
I was not sure how to do this.

Comments/suggestions/bug reports/insults welcome ;-)
Comment 2 Matthew Allum 2006-08-08 11:11:26 UTC
Some thoughts from a quick look;

 - How about some comments in the code, explaining why it is doing what is it 
   in terms of emulating a display.

 - I think the code could be simpler, more compact and self contained.

 - You shouldn't need to use the extra shm image, just a chunk of memory
   like fbdata. That should make the code simpler.

 - How about a switch to enable the swizzle mode ?
Comment 3 Manu Cornet 2006-08-08 11:13:08 UTC
Created attachment 6500 [details] [review]
(Shorter) Patch implementing swizzle + simple antialiasing

Shorter and a bit simpler version of the same patch.
Comment 4 Manu Cornet 2006-08-14 13:44:00 UTC
Created attachment 6548 [details] [review]
Patch for swizzle mode with a new postprocessing algorithm
Comment 5 Manu Cornet 2006-08-18 08:52:30 UTC
Created attachment 6597 [details] [review]
Patch for color swizzling mode (-swizzle option)
Comment 6 Manu Cornet 2006-08-19 06:23:35 UTC
BTW I did ask David Turner about licensing this code with the MIT license, he
said no problem.
Comment 7 Matthew Allum 2006-08-19 07:27:02 UTC
(In reply to comment #6)
> BTW I did ask David Turner about licensing this code with the MIT license, he
> said no problem.

Cool. The patch looks good. Id like to make a few small tweaks to what it does
in hostx.c ( move more of it into the seperate source file if pos). Can you just
hang on in there till I get a bit of free time to do this ? You have the ubuntu
packages anyway people can use right ?   
Comment 8 Manu Cornet 2006-08-22 07:16:36 UTC
Sure, no problem. Tweak everything you like as you see fit :) People can
directly use my patch anyway, or an Ubuntu package indeed (I need to update it).

Thanks!
Comment 9 Dan Williams 2006-09-13 13:25:14 UTC
mallum; any movement on this?  Would be nice to get it upstream and into distro
packages so we can make the OLPC emulator/testbed story more complete as quickly
as we can...
Comment 10 Matthew Allum 2006-09-14 09:31:39 UTC
(In reply to comment #9)
> mallum; any movement on this?  Would be nice to get it upstream and into distro
> packages so we can make the OLPC emulator/testbed story more complete as quickly
> as we can...

Hi, Im wondering with the size of the patch ( esp. when compared too Xephyr
source  size ) and it being very *specific* to the hardware, its maybe not
better kept as its own kdrive server ( i.e Xswizzle ) in its own driver directory. 

To avoid a load of code duplication it could pull in Xehyr's core like other
servers ( Xati ) pull in parts of Xvesa or Xfbdev. 
Comment 11 Daniel Stone 2007-02-27 01:33:08 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 12 chemtech 2013-03-15 14:48:46 UTC
Manu Cornet 
Do you still experience this issue with newer soft ?
Please check the status of your issue.
Comment 13 Adam Jackson 2018-06-11 18:44:19 UTC
This patch very much no longer applies. The idea is interesting, but at this point we should probably prefer to do this with a fragment shader in glamor.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.