• D
    drm/i915: check fdi B/C lane sharing constraint · 01a415fd
    Daniel Vetter 提交于
    And properly toggle the chicken bit in the pch to enable/disable fdi C
    rx. If we don't set this bit correctly, the rx gets confused in link
    training, which can result in an fdi link that silently fails to train
    the link (since the corresponding register reports success). Note that
    both fdi link B and C can suffer when this bit is not set correctly.
    
    The code as-is has a few deficiencies:
    - We presume all pipes use the pch which is not the case for cpu edp.
    - We don't bother with disabling both pipes when we could make things
      work, e.g. when pipe B switched from 4 to 2 lanes due to a mode
      change, we don't bother updating the w/a bit.
    - It's ugly.
    
    All of these are because we compute ->fdi_lanes way too late, when
    we're already setting up individual pipes. We need to have this
    information in ->modeset_global_resources already, to set things up
    correctly. But that is a much larger reorg of the code.
    
    Note that we actually hit the 2 lanes limit in practice rather
    quickly: Even though the 1920x1200 mode native mode of my screen fits
    into 2 lanes, it needs 3 lanes for the 1920x1080 (since that somehow
    has much more blanking ...). Not obeying this restriction seems to
    results in cute-looking digital noise.
    
    v2: Only ever clear the chicken bit when both pipes are off.
    
    v3: Use the new ->modeset_global_resources callback.
    
    v4: Move the WARNs to the right place. Oh how I hate hacks.
    
    v5: Fix spelling, noticed by Paulo Zanoni.
    Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
    Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
    01a415fd
i915_reg.h 165.4 KB