• Ville Syrjälä's avatar
    drm/i915: Stop using mode->private_flags · af157b76
    Ville Syrjälä authored
    Replace the use of mode->private_flags with a truly private bitmaks
    in our own crtc state. We also need a copy in the crtc itself so the
    vblank code can get at it. We already have scanline_offset in there
    for a similar reason, as well as the vblank->hwmode which is assigned
    via drm_calc_timestamping_constants(). Fortunately we now have a
    nice place for doing the crtc_state->crtc copy in
    intel_crtc_update_active_timings() which gets called both for
    modesets and init/resume readout.
    
    The one slightly iffy spot is the INHERITED flag which we want to
    preserve until userspace/fb_helper does the first proper commit after
    actually calling .detecti() on the connectors. Otherwise we don't have
    the full sink capabilities (audio,infoframes,etc.) when .compute_config()
    gets called and thus we will fail to enable those features when the
    first userspace commit happens. The only internal commit we do prior to
    that should be from intel_initial_commit() and there we can simply
    preserve the INHERITED flag from the readout.
    
    v2: Deal with INHERITED in sanitize_watermarks() as well
    
    CC: Sam Ravnborg <sam@ravnborg.org>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200429103904.11727-1-ville.syrjala@linux.intel.com
    af157b76
icl_dsi.c 58.2 KB