Skip to content

Commit 83fb8b0

Browse files
committed
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
2 parents b14fd8e + e94bd17 commit 83fb8b0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/gpu/drm/drm_ioctl.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,12 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
254254
req->value = dev->mode_config.async_page_flip;
255255
break;
256256
case DRM_CAP_PAGE_FLIP_TARGET:
257-
req->value = 1;
258-
drm_for_each_crtc(crtc, dev) {
259-
if (!crtc->funcs->page_flip_target)
260-
req->value = 0;
257+
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
258+
req->value = 1;
259+
drm_for_each_crtc(crtc, dev) {
260+
if (!crtc->funcs->page_flip_target)
261+
req->value = 0;
262+
}
261263
}
262264
break;
263265
case DRM_CAP_CURSOR_WIDTH:

0 commit comments

Comments
 (0)