summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2016-09-07 17:23:45 (GMT)
committerJani Nikula <jani.nikula@intel.com>2016-09-08 08:57:13 (GMT)
commitdec90ea1456b5a5d990d94ade2e45a2457cfd149 (patch)
tree232591c3844068e30de95da74ba80eeb941f98d6
parent30c06570cd6716ba392f674c49dee5a69f96e096 (diff)
downloadlinux-dec90ea1456b5a5d990d94ade2e45a2457cfd149.tar.xz
drm: Fix error path in drm_mode_page_flip_ioctl()
This fixes the error path for platforms that don't define the new page_flip_target() hook. Fixes: c229bfbbd04 ("drm: Add page_flip_target CRTC hook v2") Testcase: igt/kms_flip/basic-flip-vs-dpms CC: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1473269025-16148-1-git-send-email-imre.deak@intel.com
-rw-r--r--drivers/gpu/drm/drm_crtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index a33dab2..631691b 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2044,7 +2044,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
}
out:
- if (ret)
+ if (ret && crtc->funcs->page_flip_target)
drm_crtc_vblank_put(crtc);
if (fb)
drm_framebuffer_unreference(fb);