Starting the day needing five wickets to win, Warwickshire rapped it up in a dominant morning session, dismissing Yorkshire for 171 and winning by 377.