That's a bad video card, and since yours is integrated, it means a motherboard replacement. If it's under warranty still, make it HP's problem, otherwise you're probably looking at a sizable chunk of a new laptop to get it repaired.
There's also a small possibility the display is bad, or simply the video cable, but in my experience with laptop repairs, that is a bad video chip. Actually had a Dell Latitude D510 in my office with a similar issue. Tried about 3 different displays -- because the original display worked, it just had a yellow tint -- and every combination of video cables, before deciding that the new motherboard Dell sent me was bad. That cleared it right up.
HP Pavillion dv5170us
Duo Processor T2300 1.66ghz, .99gb ram,
Video Card adapter mobile intel 945gm exprss chipset family, 128mb...
I have no idea what this is...I've had the problem before and went to the computer repair store to replace a video card...? or chip..it fixed it..til now...I use the laptop for gaming and work...