After struggling in his previous five starts, Miguel Gonzalez decided to keep things simple Sunday.

"Strike one from the get-go," the Chicago White Sox righthander said.

It worked well. Gonzalez took a perfect game into the seventh inning and Todd Frazier hit a two-run homer, leading the host White Sox to a 7-3 victory over the Detroit Tigers.

Melky Cabrera and Matt Davidson also connected, helping the White Sox take three of four in the series.

Gonzalez gave up three runs and six hits in 7⅔ innings while ending a five-start losing streak. He struck out six and walked none.

"[The key was] getting ahead, especially against this team that's aggressive," he said. "It was fun to be out there again and get back on track."

Gonzalez retired his first 18 batters before Andrew Romine led off the seventh with a hard one-hop liner to shortstop Tim Anderson, who couldn't field the ball cleanly and was originally charged with an error. The play was later changed to a hit.

New York 9, Oakland 5: Aaron Judge hit his first career grand slam as the Yankees beat the host Athletics. Michael Pineda tossed six innings of three-hit ball to win his third consecutive start. Judge's homer was his 16th, tying him with the Angels' Mike Trout for the major league lead.

Houston 8, Baltimore 4: George Springer homered during a six-run second inning as the host Astros sent the Orioles to their season-worst seventh consecutive loss. Houston has won four games in a row. Jonathan Schoop homered and drove in three runs for Baltimore.

Texas 3, Toronto 1: Joey Gallo hit his 15th home run and Andrew Cashner posted a rare road victory as the Rangers beat the Blue Jays, ending their longest losing streak of the season at five. Cashner, who gave up one run in seven innings, had been 0-9 in 18 road starts since September 2015.

Seattle 5, Boston 0: Christian Bergman pitched seven shutout innings and the Mariners halted the host Red Sox's season-high six-game winning streak. Robinson Cano hit a two-run homer and Guillermo Heredia a solo shot for Seattle.

Cleveland 10, Kansas City 1: Jason Kipnis went 4-for-4 with a home run and two RBI, and Josh Tomlin pitched his first complete game in two years as the Indians beat the visiting Royals.

National League

Los Angeles 9, Chicago 4: Cody Bellinger and Kike Hernandez hit three-run homers in the second and third innings, respectively, off Jon Lester that upstaged the anticipated duel between him and Clayton Kershaw, helping the Dodgers beat Cubs. Chicago was swept in three games at home for the first time since August 2012. Lester and Kershaw were rocked for 10 runs and 18 hits in a combined 7⅔ innings.

Cincinnati 8, Philadelphia 4: Adam Duvall hit a pair of two-run homers, and Patrick Kivlehan had two solo shots as the Reds beat the host Phillies.

Milwaukee 9, Arizona 5: Domingo Santana hit his first career grand slam and the host Brewers held off the Diamondbacks.

Colorado 8, St. Louis 4: Rookie German Marquez pitched into the sixth inning, Gerardo Parra hit a three-run homer and the host Rockies beat the Cardinals.

San Diego 5, Washington 3: Ryan Schimpf hit a two-run homer and the visiting Padres had a season-high 14 hits in beating the Nationals.

San Francisco 7, Atlanta 1: Johnny Cueto pitched six strong innings and Brandon Crawford drove in three runs as the Giants defeated the visiting Braves.

New York 7, Pittsburgh 2: Matt Harvey pitched one-run ball over six innings to win his second consecutive start and the Mets beat the host Pirates.

Interleague

Miami 9, L.A. Angels 2: Giancarlo Stanton hit his 13th home run and J.T. Riddle his third homer and drove in three runs as the host Marlins routed the Angels.