Let me elaborate more about $D$-affinity in characteristic $p>0$ (a good reference is the introduction to A. Langer, "$D$-affinity and Frobenius morphism on quadrics"). In general, to prove that a variety is $D$-affine, we have to check two things: (1) that every coherent quasi-coherent (over $\mathcal{O}_X$) $D$-module is globally generated over $D_X$, (2) that $H^i(X, D_X) = 0$ for $i>0$. In the characteristic $p$ case, $D_X$ has the so-called $p$-filtration (found by Haastert) by $\mathrm{End}(F^i_{\star} \mathcal{O}_X)$ by endomorphisms of the Frobenius push-forwards of the structure sheaf. It follows that if $H^i(X, \mathrm{End}(F^i_{\star} \mathcal{O}_X)) = 0$ then (2) holds (and conversely if $X$ is Frobenius split). For example, (2) holds for the projective space, and indeed projective spaces are always $D$-affine. It has been shown by Langer in the aforementioned article that if $n>1$ is odd and $p\geq n$ then the $n$-dimensional smooth quadric is $D$-affine. Since quadrics are Frobenius split, the same calculation of $F^s_\star \mathcal{O}_X$ shows that the even-dimensional quadrics are not $D$-affine in positive characteristic.
Let me elaborate more about $D$-affinity in characteristic $p>0$ (a good reference is the introduction to A. Langer, "$D$-affinity and Frobenius morphism on quadrics"). In general, to prove that a variety is $D$-affine, we have to check two things: (1) that every coherent $D$-module is globally generated over $D_X$, (2) that $H^i(X, D_X) = 0$ for $i>0$. In the characteristic $p$ case, $D_X$ has the so-called $p$-filtration (found by Haastert) by $\mathrm{End}(F^i_{\star} \mathcal{O}_X)$ by endomorphisms of the Frobenius push-forwards of the structure sheaf. It follows that if $H^i(X, \mathrm{End}(F^i_{\star} \mathcal{O}_X)) = 0$ then (2) holds (and conversely if $X$ is Frobenius split). For example, (2) holds for the projective space, and indeed projective spaces are always $D$-affine. It has been shown by Langer in the aforementioned article that if $n>1$ is odd and $p\geq n$ then the $n$-dimensional smooth quadric is $D$-affine. Since quadrics are Frobenius split, the same calculation of $F^s_\star \mathcal{O}_X$ shows that the even-dimensional quadrics are not $D$-affine in positive characteristic.