On Thu, 2004-04-15 at 22:00, Nathanael Nerode wrote: > This is a diff for drivers/char/drm to make r128 use userland-loadable > firmware.
Sigh, is this really necessary? :\ Anyway, I'll offer some technical comments. > It's completely untested (since I don't *have* an r128, I don't > see any way to test it), but I bet it'll work; the firmware loading interface > seems remarkably easy to use. Its return code should probably be checked and propagated though? The DRM doesn't work without the microcode. Does this work with 2.4 kernels? This patch puts Linux specific code in a file that is shared with the BSDs. > This could probably be improved by someone with a better sense of > the right way to deal with the stupid endianness issues; I went with the > simplistic "pick an endianness" choice. That's the only sane way. Linux provides convenience macros like be32_to_cpu(); not sure about the BSDs; their DRM code seems to define le32_to_cpu() for Linux compatibility, so little endian might be the easier choice. > Please do tell me if there's a major problem with this that I can fix. The one > which worries me the most is the possibility that the firmware loading is > not done in user context, or that it's done when holding a lock which means > that it mustn't sleep. (Request_firmware obviously sleeps, since it calls > into userland.) The hardware lock is probably held when the ioctl is called, but I don't think that's a problem. It's only called by the X server (or its equivalent) during initialisation. > (Incidentally, what *is* this microcode? It looks like it's actually > two separate sets of code interleaved.) My understanding is that it contains instructions for the so-called Concurrent Command Engine (CCE) how to translate command packets into register values. This forms the basis of how the DRM emits commands to the hardware. -- Earthling Michel DÃnzer | Debian (powerpc), X and DRI developer Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel