hwc: rgz: Fix dirty region not working when blitting only one layer

The dirty region handling doesn't work properly when only one
layer is being blitted. The problem was the screen dirty state was
only set to zero when one layer reaches the dirty count to zero. In
case only one layer was being blitted the dirty region handling
is never triggered making the empty areas to be cleared on every
frame even if it was not needed.

This patch removes the screen dirty flag and instead introduces
a dirty count for the background and layers with the clear fb hint
as well, since we don't care about the handle, the dirty count
is decreased on every frame, in this way the dirty region handling
sees the background and layers with the clear fb hint as any other
layer.

Rebased from p-ics-mr1:
11e5f7e hwc: rgz: Fix dirty region not working when blitting only one layer

Change-Id: Ifbb111ce7738cd097e74ac01e2c48f3994857416
Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>

Conflicts:

	hwc/rgz_2d.c

Signed-off-by: Tony Lofthouse <a0741364@ti.com>
(cherry picked from commit a79d46bbd0438140fb6500d6243b5e3aa392068b)
2 files changed