Use mgapcimatch in mga4xxdrawinit, this removes a handful of duplicated lines and detects MGA200 properly. Notes: Sat Aug 12 02:12:13 EDT 2006 rsc As far as I can tell, your patch does the opposite of your description. The code already used mgapcimatch and your patch would undo that. Reference: /n/sources/patch/sorry/vgamga4xx-use-mgapcimatch Date: Thu Jul 20 05:38:55 CES 2006 Signed-off-by: uriel@cat-v.org Reviewed-by: rsc --- /sys/src/9/pc/vgamga4xx.c Thu Jul 20 05:37:16 2006 +++ /sys/src/9/pc/vgamga4xx.c Thu Jul 20 05:37:12 2006 @@ -467,9 +467,11 @@ uchar *mga; Pcidev *p; - p = mgapcimatch(); - if(p->did == MGA200) - return; + p = pcimatch(nil, MATROX, MGA4xx); + if(p == nil) + p = pcimatch(nil, MATROX, MGA550); + if(p == nil) + return ; if(scr->mmio == 0) return;