diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 0092a8f70d3..b4f5edbca65 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -169,7 +169,11 @@ int drm_fb_helper_debug_enter(struct fb_info *info) continue; funcs = mode_set->crtc->helper_private; +#ifdef __linux__ if (funcs->mode_set_base_atomic == NULL) +#elif defined(__FreeBSD__) + if (funcs == NULL || funcs->mode_set_base_atomic == NULL) +#endif continue; if (drm_drv_uses_atomic_modeset(mode_set->crtc->dev))