It sounds like a software issue if it does it on both displays, or possibly the video card. I would try making sure your software is updated and try an SMC reset. If that doesn't work, reinstall the OS and see if that fixes it. If that doesn't do it, call apple if you still have a warranty.