drm/atomic: Fix bookkeeping with TEST_ONLY, v3.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 31 Aug 2015 10:25:04 +0000 (12:25 +0200)
committerJani Nikula <jani.nikula@intel.com>
Tue, 1 Sep 2015 08:57:06 +0000 (11:57 +0300)
commitc4749c9a4a9ddc16200ce46a19078357727bf4b1
treed5496cf9517b7eea1ca822c2a14db8da8ec9fa6f
parent879a37d00f1882b1e56a66e626af4194d592d257
drm/atomic: Fix bookkeeping with TEST_ONLY, v3.

Commit ec9f932ed41622d120de52a5b525e4d77b9ef17e
"drm/atomic: Cleanup on error properly in the atomic ioctl."
cleaned up some error paths, but didn't fix the TEST_ONLY path.
In the check only case plane->fb shouldn't be updated, and
the vblank events should be cleared as on failure.

Changes since v1:
- Fix -EDEADLK handling of vblank events too.
- Free state last with CHECK_ONLY.
Changes since v2:
- Add comment about freeing crtc_state->event with TEST_ONLY.
  (Daniel Stone)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/drm_atomic.c