drm: Fix leak of damage blob id
Fixes #405 (closed)
Unfortunately I don't have any hardware that advertises this property, which means that I can't properly test this code path. As far as I can tell, the virtual drivers don't currently support this either.
This moves the creation of the blob to be earlier, to when the damage is calculated. It replaces the damage tracked inside of the plane state with the blob id itself.
This should stop creating new blob ids for TEST_ONLY commits, and them being leaked in general, as the blob ids are now freed with the plane state.
The FB_DAMAGE_CLIPS property is now always set if it's supported, and will be 0 in the case that we have no damage information, which signifies full damage to the kernel.
Signed-off-by: Scott Anderson scott.anderson@collabora.com