• Tomi Valkeinen's avatar
    drm: add missing drm_mode_set_crtcinfo call · ec00d4d7
    Tomi Valkeinen authored
    commit b201e743 upstream.
    
    When setting mode via MODE_ID property,
    drm_atomic_set_mode_prop_for_crtc() does not call
    drm_mode_set_crtcinfo() which possibly causes:
    
    "[drm:drm_calc_timestamping_constants [drm]] *ERROR* crtc 32: Can't
    calculate constants, dotclock = 0!"
    
    Whether the error is seen depends on the previous data in state->mode,
    as state->mode is not cleared when setting new mode.
    
    This patch adds drm_mode_set_crtcinfo() call to
    drm_mode_convert_umode(), which is called in both legacy and atomic
    paths. This should be fine as there's no reason to call
    drm_mode_convert_umode() without also setting the crtc related fields.
    
    drm_mode_set_crtcinfo() is removed from the legacy drm_mode_setcrtc() as
    that is no longer needed.
    Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    ec00d4d7
drm_modes.c 44.7 KB