Davis struck out five and walked four in his first win since April 29, a span of seven starts. Daniel Schlereth, Esmerling Vasquez and Chad Qualls finished the Arizona's fifth shutout.
Chris Snyder drove in three runs, including two during the Diamondbacks' four-run fifth inning that gave Davis a 5-0 lead.
Chris Young added a solo home run and scored twice for Arizona, which won for just the second time in five games.
Diamondbacks right fielder Justin Upton threw out a runner at home in the sixth inning during the Padres' only serious scoring threat.