What limits has the Supreme Court placed on gerrymandering?

What limits has the Supreme Court placed on gerrymandering?