aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-12-01 10:00:14 +1000
committerDave Airlie <airlied@redhat.com>2016-12-01 10:00:14 +1000
commit83fb8b055544a25ceeac34a666a2149331ea94bf (patch)
treedc37dfae6382b27dae8b93ffeb23b4e660060aff
parentb14fd8efb4805ff9a3218ba16f99b58778c4441e (diff)
parente94bd1736f1f60e916a85a80c0b0ebeaae36cce5 (diff)
downloadlinux-avr32-83fb8b055544a25ceeac34a666a2149331ea94bf.tar.gz
Merge tag 'drm-misc-fixes-2016-11-30' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes
single drm fix. * tag 'drm-misc-fixes-2016-11-30' of git://anongit.freedesktop.org/git/drm-misc: drm: Don't call drm_for_each_crtc with a non-KMS driver
-rw-r--r--drivers/gpu/drm/drm_ioctl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 0ad2c47f808fc1..71c3473476c749 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -254,10 +254,12 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
req->value = dev->mode_config.async_page_flip;
break;
case DRM_CAP_PAGE_FLIP_TARGET:
- req->value = 1;
- drm_for_each_crtc(crtc, dev) {
- if (!crtc->funcs->page_flip_target)
- req->value = 0;
+ if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+ req->value = 1;
+ drm_for_each_crtc(crtc, dev) {
+ if (!crtc->funcs->page_flip_target)
+ req->value = 0;
+ }
}
break;
case DRM_CAP_CURSOR_WIDTH: