  We establish Bernstein-centre type of results for the category of mod $p$
representations of $\mathrm{GL}_2(\mathbb{Q}_p)$. We treat all the remaining
open cases, which occur when $p$ is $2$ or $3$. Our arguments carry over for
all primes $p$. This allows us to remove the restrictions on the residual
representation at $p$ in Lue Pan's recent proof of the Fontaine--Mazur
conjecture for Hodge--Tate representations of $\mathrm{Gal}(\overline{\mathbb
Q}/\mathbb{Q})$ with equal Hodge--Tate weights.
