What do I do about a flickering MacBook display?

I have an early 2011 MacBook pro (13") running on High Sierra. About a month ago after I connected the laptop with my tv the screen started flickering after I disconnected from it. Particularly it flickers when I switch through windows or when I scrawl up and down a browser.

I have tried resetting the PRAM and the problem remains. I even erased the OS and reinstalled it after which the problem appeared resolved but came back after my first restart.

I have tried almost everything I can find on the net but to no avail. Any suggestions?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0