summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_ioctl.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-12-01 01:00:14 +0100
committerDave Airlie <airlied@redhat.com>2016-12-01 01:00:14 +0100
commit83fb8b055544a25ceeac34a666a2149331ea94bf (patch)
treedc37dfae6382b27dae8b93ffeb23b4e660060aff /drivers/gpu/drm/drm_ioctl.c
parentMerge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes (diff)
parentdrm: Don't call drm_for_each_crtc with a non-KMS driver (diff)
downloadlinux-83fb8b055544a25ceeac34a666a2149331ea94bf.tar.xz
linux-83fb8b055544a25ceeac34a666a2149331ea94bf.zip
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
Diffstat (limited to 'drivers/gpu/drm/drm_ioctl.c')
-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 0ad2c47f808f..71c3473476c7 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: