Let K$K$, the field generated by the coefficients of f$f$, have t=2^n$t=2^n$ elements. If p=q=0$p=q=0$, f$f$ has a triple root. If q$q$ is not 0$0$, then f$f$ is separable. Assume q$q$ not 0$0$. If p=0$p=0$ and n odd, then f$f$ has exactly one root in K$K$. If p=0$p=0$ and n$n$ even then f$f$ has 0$0$ or 3$3$ roots in K$K$. Assume now that f$f$ has at least 1 root in K$K$. Let tr$tr$ be the trace of K$K$ over the prime field. Put B=1+(p^3/q^2)$B=1+\frac{p^3}{q^2}$. Then f$f$ has 3$3$ roots iff tr(B)=0$tr(B)=0$.
The question if f$f$ has no roots (i.e. f$f$ irreducible) can be done by Berlekamp's algorithm algorithm.