Hi,
Took my iMac mid 2011 into an Apple store and it was replaced with a new "late 2013" 21.5 inch Processor 2.7 GHz Intel Core i5 8GB 1600 MHz DDR3.
The mid 2011 iMac was non-re-repairable.
After initial research (which finally led me to make an appointment via Apple Support for the 'genius bar', I found that the graphics board was failing which is mounted on another card (forgot which card).
Via 'Macworld' UK I found a statement (date not on printout) that "Apple has begun a graphics card replacement program for select mid-2011 iMac configurations, after determining that the graphics cards in some 2011 iMacs may fail. ......Apple says that some AMD Radeon HD 6970M video card used in 27in iMacs with 3.1 GHz quad-core Intel i7 processors may fail.
The graphics card failure in these models can cause "the computer's display to appear distorted, white or blue with vertical lines, or to turn back," Apple says."
At the Apple 'Genius Station' a deeper test was run then I had seen previously and it supported the fact of 'graphics card' failure. In upgrading to Yosemite just to see what would happen, I had numerous warnings upon a restart that "A graphics problem has been detected" and I did click report and sent each incident to Apple.
My suggestion....get an appointment at 'genius' or where ever you get service.
Great service by Apple after I chose to take the iMac mid 2011 into the Apple store for my appointment. I was called 6 days after taking it in and was informed of the internal issues and that I would receive a new Mac. Fantastic. iMac was covered by the 'warranty' I was told, 100%.