While looking for a Tipitaka reference to citta vipallāsa, I found a short sentence in Peṭakopadesa that seems to give a good insight into vipallāsa to all.
Tattha manāpike vatthumhi indriyavatthe vaṇṇāyatane vā yo nimittassa uggāho, ayaṁ saññāvipallāso.
Tattha viparītacittassa vatthumhi sati viññatti, ayaṁ cittavipallāso.
Tattha viparītacittassa tamhi rūpe “asubhe subhan”ti yā khanti ruci upekkhanā nicchayo diṭṭhi nidassanaṁ santīraṇā, ayaṁ diṭṭhivipallāso.
–
Ps 1.8 quoted in #14 clearly explains that sotapanna(diṭṭhisampanna) removed nicca and atta vipallasa in all levels (ditthi, sanna, citta).
I think Ne 20 could also elaborate on the reason why nicca and atta vipallasa are removed in the sotapanna stage but subha and sukha vipallasa are still remaining. Those are needed to remove by Anapanasati/Satipatthana bhavana meditation.
Taṇhānivutaṁ cittaṁ dvīhi vipallāsehi vipallāsīyati “asubhe subhan”ti “dukkhe sukhan”ti.
Diṭṭhinivutaṁ cittaṁ dvīhi vipallāsehi vipallāsīyati “anicce niccan”ti “anattani attā”ti.
–
Q. In recent posts, they said that saññā vipallāsa is completely removed only when one becomes Arahant, so is it wrong that saññā vipallāsa is removed in the Anagami stage?
The remaining akusala of Anagami is only manokamma. This level of akusala is closer to instability caused by rupa’s aññathā characteristics than to evil or immorality in a general meaning. So I guess citta vipallāsa is connected with mana samyojana, uddacca samyojana, and avijja samyojana. Therefore, it seems reasonable for me to explain that Anagami removed saññā vipallāsa and Arahant removed citta vipallāsa(so all vipallāsa is completely gone).
Pe 8 gives some comments worth considering about this topic.
Yaṁ manassa pasādanaṁ, idamassa cittavipallāsappahānanti akusalavipallāsānaṁ vikkhambhanaṁ pahānaṁ paccayo.