Re: 16-bit depth on radeonfb
Julian Coleman <[email protected]> Wed, 29 Jul 2026 11:02:43 +0200
| Newsgroups | gmane.os.netbsd.devel.kernel |
|---|---|
| Message-ID | <amnBs3l6FyR6IB3u@morava> |
Hi, > 16-bit depth makes hardware with limited memory and/or memory bandwidth > much more usable and useful. The following patch adds this to radeonfb. I think that's OK, apart from: > --- ./dev/pci/radeonfb.c.orig > +++ ./dev/pci/radeonfb.c > @@ -104,7 +104,8 @@ > #ifdef RADEONFB_DEPTH_32 > #define RADEONFB_DEFAULT_DEPTH 32 > #else > -#define RADEONFB_DEFAULT_DEPTH 8 > +/* #define RADEONFB_DEFAULT_DEPTH 8 */ > +#define RADEONFB_DEFAULT_DEPTH 16 > #endif > > static int radeonfb_match(device_t, cfdata_t, void *); where we change the default depth from 8 to 16. We already have the flag to set RADEONFB_DEPTH_32, e.g. on alpha: https://nxr.netbsd.org/search?q=RADEONFB_DEPTH_32&project=src&defs=&refs=&path=&hist= https://nxr.netbsd.org/xref/src/sys/arch/alpha/conf/GENERIC#342 so I would suggest adding a RADEONFB_DEPTH_16 flag too and setting it in your kernel config. It might make sense for it to be the default, although I'm not sure - which arch are you running on? Regards, Julian PS. Of course, we have multiple ways of doing this, so you could also add flags on the device line itself: https://nxr.netbsd.org/xref/src/sys/arch/alpha/conf/GENERIC#539 https://nxr.netbsd.org/xref/src/sys/dev/i2c/at24cxx.c#180 --