In the Valley of Elah
(2007)

After a long search, Hank Deerfield (Tommy Lee Jones) finds out his son Mike died in a drunken knife fight with a fellow soldier in his platoon. Hanks hears the soildier confess about killing his son.

Emily Sanders (Charlize Theron) helped him with the search of his son. She goes home to tell her son the story of David and Goliath and the Valley of Elah.

When Hank gets home he stops by someone raising a flag.
Hank hangs it upside down (sign of distress)

Thanks, Movie Geek!