• Maarten Lankhorst's avatar
    drm/i915: Calculate haswell plane workaround, v5. · 99d736a2
    Maarten Lankhorst authored
    This needs to be done last after all modesets have been calculated.
    
    A modeset first disables all crtc's, so any crtc that undergoes a
    modeset counts as inactive.
    
    If no modeset's done, or > 1 crtc's stay w/a doesn't apply.
    Apply workaround on the first crtc if 1 crtc stays active.
    Apply workaround on the second crtc if no crtc was active.
    
    Changes since v1:
     - Use intel_crtc->atomic as a place to put hsw_workaround_pipe.
     - Make sure quirk only applies to haswell.
     - Use first loop to iterate over newly enabled crtc's only.
       This increases readability.
    Changes since v2:
     - Move hsw_workaround_pipe back to crtc_state.
    Changes since v3:
     - Return errors from haswell_mode_set_planes_workaround.
    Changes since v4:
    - Clean up commit message.
    Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
    Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    99d736a2
intel_display.c 438 KB