On Fri, 2004-04-16 at 23:02, Nathanael Nerode wrote:
> Michel DÃnzer wrote:
> > 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? :\
> It allows for the microcode to be updated without replacing the kernel, 
> which is not a bad thing anyway.

I'm not sure it ever has changed or will change... we both know the
background of this; IMHO it's an inconvenience for users for little or
no gain of freedom.


> >>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.
> OK; I'm not surprised at that.  I'm not entirely clear where the return 
> code needs to be returned in order to fail properly, though. 
> r128_do_init_cce returns an int; is it sufficient to propagate the error 
> code out of there?

Yes, the return code of r128_do_init_cce() is used directly as the
return code of the ioctl in r128_cce_init().


> I was working from the versions in the Linux kernel source, since that's 
> the only version I actually intended to change, and because I could 
> figure out the tree.  Should I be looking elsewhere?  I couldn't figure 
> out where the files were in the DRI CVS tree... *spends extra hour 
> looking*  OK, are they visible at 
> http://dri.freedesktop.org/cgi-bin/cvsweb/dri/drm/ ?

Yes, that's the new standalone DRM module.

> Hmm.  What's the Best Way to abstract away OS/kernel differences in this 
> case?  I had this thought:
> * shared/r128_drv.h contains the prototype for the new (error-returning) 
>   r128_cce_load_firmware
> * shared/r128_firmware.c contains the old, hard-coded firmware as an 
> implementation of that
> * linux/r128_firmware_loader.c contains the firmware loading version as 
> an implementation of that
> * bsd/r128/Makefile adds r128_firmware.c to SRCS
> * linux/Makefile.kernel adds r128_firmware.o *or* r128_firmware_loader.o 
> to r128-objs, depending on a kernel version check.  Similarly for 
> linux/Makefile.linux and R128SHARED.  

Sounds viable, but maybe it could be done simpler in drm_os_*.h? (r128
and radeon could possibly share the code?)

> linux/Kconfig adds "select FW_LOADER" to the DRM_R128 section... 
> depending on a kernel version check? (I dunno how to depend on that in 
> a Kconfig file.)

I think Kconfig is 2.6 only.


-- 
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

Reply via email to