I say the first if my interest is primarily on whether the homework is in a state of completedness. I might say it to my son as he departs for school. I want to know if he is prepared for the day to come.
I say the second if my mind is focussing on the past action of the person to whom I am speaking. I might say it if I am remembering that when I saw my son last, he was going up to his room to do his homework.
Student or Learner