I have a similar problem after replacing the rear cover (incl. display): my display shows everything upside down. I disconnected / connected this 40 pin connector and it worked fine - as a new camera. But only for a few seconds, then the display turned back upside down. By touching this 40 pin connector i could reproduce the failure. To my opinion it is definitely the 40 pin connector which works sometimes good, sometimes bad.
So i installed the old rear cover (from where i know that the display works fine): same problem, everything upside down.
Then i did a hard reset on the camera by holding the MENU and the INFO button at the same time for a few seconds. No success!
After reassembling my display shows still everything upside down. I think i have to live with that.
Right now i have no solution for this lausy 40 pin connector. It seems that this is the build-in end of live item which you probably find in every camera to keep the business running.....