• Daniel Vetter's avatar
    drm/i915: State readout and cross-checking for ddi_pll_sel · 26804afd
    Daniel Vetter authored
    To make things a bit more manageable extract a new function for
    reading out common ddi port state. This means a bit of duplication
    between encoders and the core since both look at the same registers,
    but doesn't seem worth to make a fuzz about.
    
    We can also remove the state readout code in intel_ddi_setup_hw_pll_state.
    That code is only called from the hardware take over and not the cross
    check code, and only after the crtc state is reconstructed. So we can
    rely on an accurate value of crtc->config.ddi_pll_sel already.
    
    Compared to the old code also trust the hw state more and don't
    special-case port A - we want to cross-check the actual-state, not
    bake in our own assumptions about how this is supposed to all be
    linked up.
    
    v2: Make use of the read-out ddi_pll_sel in intel_ddi_clock_get.
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
    [imre: rebased on patchset version w/o pch/crt/fdi refactoring]
    Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    26804afd
i915_reg.h 245 KB