Hello, > Okay, I have a concern this. As far as I can tell, the cookie is > passed to the driver, but I cannot see how the driver can make sense > of it. The cookie that wsdisplay passes seems to be a struct > wsscreen, which is a private structure to wsdisplay(4) -- it is not > declared in any external headers. struct wsscreen is not really defined anywhere I can see. What you get in ioctl() and mmap() is supposedly the screen struct your alloc_screen() method produced ( or vcons_alloc_screen(), in this case it's a struct vcons_screen * ). Since its content is driver specific it's handled as opaque cookie in wsdisplay.c > So how is a display driver (e.g. machfb, or more to the point, my > radeonfb driver) supposed to use this member argument? Cast it to your driver-specific struct screen. > Pass an opaque cookie is useless to the driver unless there is some > way for the driver to do something meaningful with it. The driver defines this cookie, it's opaque to anyone /but/ the driver. have fun Michael
Attachment:
pgpgm2E6Q9l_6.pgp
Description: PGP signature