Skip to content

Commit

Permalink
drm: Test funcs is not NULL in drm_fb_helper_debug_enter()
Browse files Browse the repository at this point in the history
[Why]
At least in i915, it is NULL in my tests because the code behind it was
removed a long time ago. We didn't execute this function before the
introduction of vt_drmfb, so it didn't cause any problems.
  • Loading branch information
dumbbell authored and wulf7 committed Nov 26, 2023
1 parent 0046404 commit ccda250
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ccda250

Please sign in to comment.