2. If the equation $\sin ^{2} x+\cos x+m=0$ has real solutions, then the range of values for $m$ is $\qquad$
2. $-\frac{5}{4} \leqslant m \leqslant 1$.

The above text has been translated into English, retaining the original text's line breaks and format.