Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Dave Airlie and committed by
Daniel Vetter
57078338 3c499ea0

+1 -1
+1 -1
include/drm/drm_drv.h
··· 675 675 static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev) 676 676 { 677 677 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); 679 679 } 680 680 681 681