hwc: rgz: Fix invalid dirty region state when HDMI is connected

It is possible when the HDMI cable is plugged in a geometry change
doesn't happen, hence the layers handled by the DSS and the
regionizer differ, since the dirty region counters are only reset
when a geometry change happens, this causes them to enter into
an invalid state leading to visual artifacts.

This fix compares  if at any given time, the layers handled in the
regionizer differ in number from the previous frame, if that happens,
the dirty region counters are reset for all the layers.

Change-Id: If756b526cf52d66612729d7367c26d131c8a1ac0
Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
(cherry picked from commit f683df8b15dcc60d497ca1ef9e0bad2bf280fb5b)
1 file changed