Sounds like graphics driver got corrupted or was previously corrupted and Avast triggered the problem. Uninstalling/reinstalling or upgrading graphics drivers should do the trick. If you have nVidia drivers, you should temporarily disable Avast shields before installing drivers if you downloaded them from the nVidia site. You don’t have to disable Avast if driver update from Windows Update.

BTW - XP graphics drivers can corrupted all the time unfortunately.