gcnfb: Report the visual using an appropriate fourcc code
Daniel Thompson <[email protected]> Sun, 23 Dec 2007 11:58:03 +0000
| Newsgroups | gmane.linux.ports.game-cube.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Folks I've been fiddling again looking at porting a few more frame buffer code to operate with the 'cube not-RGB frame buffer. It struck me that instead of lying about the visual reporting it with a fourcc code would be quite useful for detecting and adapting to strange pixel formats (and the resulting code could be ported to other weird hardware without conditional compilation). The attached patch shows what I have in mind. -- Daniel Thompson <[email protected]> ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Gc-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gc-linux-devel
linux-2.6.23-gcnfb_fourcc_visual.patch
(text/x-patch, 1003 B)
gcnfb: Report a fourcc visual (UYVY) Instead of pretending to be a truecolor visual use the fourcc code that represents the actual visual offered by the hardware. This will reduce the compatiblity of off the shelf software, meaning it won't start up, unported software looks so bad anyway I doubt this will be a big problem. In return we get a reliable means to discover the actual visual. Signed-off-by: Daniel Thompson <[email protected]> Index: linux-2.6.23/drivers/video/gcnfb.c =================================================================== --- linux-2.6.23.orig/drivers/video/gcnfb.c +++ linux-2.6.23/drivers/video/gcnfb.c @@ -186,7 +186,7 @@ static struct vi_video_mode vi_video_mod static struct fb_fix_screeninfo gcnfb_fix = { .id = DRV_MODULE_NAME, .type = FB_TYPE_PACKED_PIXELS, - .visual = FB_VISUAL_TRUECOLOR, /* lies, lies, lies, ... */ + .visual = 0x59565955 /* 'UYVY', http://www.fourcc.org/yuv.php#UYVY */ .accel = FB_ACCEL_NONE, };
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBHbk1Frr8Ifkjg/MwRAuNFAJwMribXaoi52RRG8msElESQUQX4zQCfSt7b 9C2RSwdesHqDxb8PmnfQXug= =81cT -----END PGP SIGNATURE-----