Why does my screen flip all four sides in HTC One Mini?

A

AC Question

Screen flips all four sides in HTC One Mini

I'm a proud owner of HTC One Mini. Just today, my auto rotate function stopped working. The screen flips in all four sides even when i off the auto rotate option. I did a G sensor calibration and also i did a soft reset. Still the screen flips all four sides.
Please help