Upon the dismissal of a prisoner action or upon the entry of judgment in favor of the responding party, the court shall make a finding as to whether the prisoner's action was frivolous. The court may award reasonable costs and attorney's fees to defendants or respondents if the court finds that:
OCGA § 42-12-6