Erectile dysfunction means not being able to get an erection which you clearly can, so you are good. That you have ejaculation after 5 minutes with porn isn't a sign of ED and that you then can't get hard right away isn't either. I wouldn't worry.
It's called PE (premature ejaculation). The treatment sometimes includes antidepressants. Please talk to your doctor about the down sides to the drugs... I know of a guy that now has ED from taking the drugs too long.