Skip to content

Commit 5707833

Browse files
airlieddanvet
authored andcommitted
drm: fix drm_drv_uses_atomic_modeset on non modesetting drivers.
vgem seems to oops on the intel CI due to the vgem debugfs init hitting this path now. Check if we have mode_config funcs before checking one. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20180918062018.24942-1-airlied@gmail.com
1 parent 3c499ea commit 5707833

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/drm/drm_drv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ static inline bool drm_core_check_feature(struct drm_device *dev, int feature)
675675
static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev)
676676
{
677677
return drm_core_check_feature(dev, DRIVER_ATOMIC) ||
678-
dev->mode_config.funcs->atomic_commit != NULL;
678+
(dev->mode_config.funcs && dev->mode_config.funcs->atomic_commit != NULL);
679679
}
680680

681681

0 commit comments

Comments
 (0)