The Court just agreed to hear this case, Free Speech Coalition v. Paxton. You can read the majority and dissenting opinions in the Fifth Circuit here, and the petition, response, and reply here. Here's the issue in a nutshell:
1. Ginsberg v. N.Y.(1968) held (in a majority opinion by Justice Brennan) that states may ban sales to minors of pornographic material that's "obscene as to minors" (even if it's fully protected for adults). This meant that stores and theaters that wanted to sell or exhibit such material would have to make "a reasonable bona fide attempt to ascertain the true age of" young-seeming patrons, even though that would of course in some measure affect the rights of adults (who might, for instance, be required to show identification cards, and thus lose part of their privacy). In the process, the majority applied the highly deferential "rational basis" test, though only after it essentially concluded that the law fell within a recognized First Amendment exception.
2. Ashcroft v. ACLU (II)(2004) upheld (in a majority opinion by Justice Kennedy) a preliminary injunction against enforcement of a federal law that required credit card or age verification for commercial online distribution of such "obscene as to minors" material. The majority concluded that the law burdened the rights of adults, and that the government hadn't shown that other alternatives (such as filtering) would be inadequate for protecting children. In the process, the majority applied the highly undeferential "strict scrutiny" test, and didn't discuss Ginsberg.