dri2,dumb: add dirty flag to omap bo and propagate it to mali-driver
Add a dirty flag to omap dumb buffers, set when host writes to a buffer.
The flag is conveyed to mali-driver via bit 0 in flags field of DRI2 buffer
structure and reset when rendered buffer arrives from mali-driver via
SwapBuffers. The flag is used by mali-driver to invalidate CRC surface
attached to the buffer, otherwise GPU would not write over what host has
written for the tiles that it thinks are identical to previous frame
(because they have the same CRC). Additionally the flag is also set on
newly created buffers to make sure CRC is not used for them as well.
While we are here, also move update of acquire_cnt and acquire_exclusive
to after ioctl succeeds.
TEST=connect 1080 monitor to PeachPi, switch to mirror mode, disconnect\
monitor, powerd_dbus_suspend, connect monitor, resume
Signed-off-by: Dominik Behr <email@example.com>
Reviewed-by: Stéphane Marchesin <firstname.lastname@example.org>
4 files changed