Understanding the photostability of perovskite solar cell