• Daniel Vetter's avatar
    drm: WARN if drm_handle_vblank is called errornously · ee3c7795
    Daniel Vetter authored
    KMS drivers are in full control of their irq and vblank handling, if
    they get a vblank interrupt before drm_vblank_init or after
    drm_vblank_cleanup that's just a driver bug.
    
    For ums driver there's only r128 and radeon which support vblank, and
    they call drm_vblank_init in their driver load functions. Which again
    means that userspace can do whatever it wants with interrupt, vblank
    structures will always be there.
    
    So this should never happen, let's catch driver issues with a WARN_ON.
    Motivated by some discussions with Imre.
    
    v2: Use WARN_ON_ONCE as suggested by Imre.
    
    Cc: Imre Deak <imre.deak@intel.com>
    Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
    Acked-by: default avatarDave Airlie <airlied@redhat.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
    ee3c7795
drm_irq.c 51.7 KB