I've been trying to find the cohomology for the trivial module for $\operatorname{PSL}\_2(r^n)$ over $\mathbb{F}\_p$ for $2 \neq p \neq r$ and have managed to reduce this to the cohomology of a maximal torus $D\_{r \pm 1}$ (where $|D\_{2n}| = 2n$), dependent on which is divisible by $p$, but am struggling to find a reference for $\operatorname{H}^i(D\_{2n}, \mathbb{F}\_p)$ for $i > 2$ though this must almost certainly be known. 


I can see by computations in magma that the answer should be $0$ for $i \equiv 1, \, 2 \mod 4$ and $\mathbb{F}\_p$ otherwise.



mod p (odd) cohomology of dihedral groups
EDIT: Thanks a lot to Mike Miller for pointing out in the comments significant simplifications to the proof I wrote


First suppose that $p$ does not divide $n$. Then we have
$$H^\*(D\_{2n};\mathbb{F}\_p)=\begin{cases}\mathbb{F}\_p & \textrm{ if }n=0\\ 0 &\textrm{ otherwise}\end{cases}\,.$$
Otherwise, let us suppose that $p$ divides $n$.


Let $C\_n$ be the subgroup of $D\_{2n}$ consisting of rotations. This is a normal cyclic subgroup of index 2. Hence, [it has cohomology of the form](https://mathoverflow.net/questions/133974/reference-for-ring-structure-on-group-cohomology)
$$H^\*(C\_n;\mathbb{F}\_p)=\mathbb{F}\_p[a,b]/a^2$$
where $a$ is in degree 1 and $b$ is in degree 2. So now we can deploy the Lyndon-Hochschild-Serre spectral sequence
$$H^\*(D\_{2n}/C\_n;\,H^\*(C\_n;\mathbb{F}\_p))\Rightarrow H^\*(D\_{2n};\mathbb{F}\_p)\,.$$
Since $D\_{2n}/C\_n$ has order prime to $p$, the spectral sequence degenerates and we arrive at
$$H^\*(D\_{2n};\mathbb{F}\_p)\cong H^\*(C\_n;\mathbb{F}\_p)^{D\_{2n}/C\_n}\,.$$
Note that $D\_{2n}/C\_n\cong \mathbb{Z}/2$ acts on $C\_n$ by sending $z$ to $z^{-1}$. To conclude then it's enough to determine the action of $\mathbb{Z}/2$ on $a$ and $b$.


Let us fix a generator $x\in S$. Then a representative for $a$ is given by the cocycle $\varphi(x^k)=k$, so $\sigma\varphi=-\varphi$, and $\sigma a = -a$. 


Moreover, by looking at the Serre spectral sequence for $BC\_n→BS^1→BS^1$, we see that $b$ is the image of the generator of $H^2(BS^1;\mathbb{F}\_p)$ under the inclusion of $C\_n$ in $S^1$, and the action of $\mathbb{Z}/2$ extends to $S^1$. By the Hurewicz theorem we have an isomorphism
$$\mathrm{Hom}(\pi\_2BS^1;\mathbb{F}\_p)\cong H^2(BS^1;\mathbb{F}\_p)\cong H^2(BC\_n;\mathbb{F}\_p)$$
compatible with the action of $\mathbb{Z}/2$. In particular the action is nontrivial (since the action on $\pi\_2BS^1\cong \pi\_1S^1\cong\mathbb{Z}$ sends $1$ to $-1$), so $\sigma b= - b$.


Finally
$$H^\*(D\_{2n};\mathbb{F}\_p)\cong \left(\mathbb{F}\_p[a,b]/a^2\right)^\sigma \cong \mathbb{F}\_p[ab,b^2]/(ab)^2$$
In particular it is $\mathbb{F}\_p$ in degrees congruent to $0$ and $3$ mod 4, and 0 otherwise.


