After that we need to define the macros for MMIO in DRM and write someHi Jose,
utility functions for stuff like "wait for card is idle". Both these
things can be based on what is done on the existing DDX driver.
don't we allready have this macros for MMIO? At the end of savage_drv.h in the kernel directory:
[...]
#define SAVAGE_BASE(reg) ((unsigned long)(dev_priv->mmio->handle))
#define SAVAGE_ADDR(reg) (SAVAGE_BASE( reg ) + reg)
#define SAVAGE_READ(reg) DRM_READ32( (volatile u32 *) SAVAGE_ADDR(reg) )
#define SAVAGE_WRITE(reg,val) DRM_WRITE32( (volatile u32 *) SAVAGE_ADDR(reg),
(val) )
#define SAVAGE_READ8(reg) DRM_READ8( (volatile u8 *) SAVAGE_ADDR(reg) )
#define SAVAGE_WRITE8(reg,val) DRM_WRITE8( (volatile u8 *) SAVAGE_ADDR(reg), (v
al) )
#endif /* __SAVAGE_DRV_H__ */
I'm currently working on this waiting for idle thing. It's really a pain in the ass because it is completely different for the each chip family. The DDX driver solves this by setting pointers to the proper functions on initialisation according to the detected chip. For now I decided only to support the Savage4 series (which includes the Pro Savage) because my chip belongs to that family and it's the only one I can perform tests on. When we want to support more than this we have to think about a way which chip is used and then do a similar thing like in the DDX driver.
Regards, Andreas Karrenbauer
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel
