Skip to content
  • Stanislav Lisovskiy's avatar
    igt/tests/kms_atomic_transition: Tolerate if can't have all planes · 5941f371
    Stanislav Lisovskiy authored
    
    
    With some upcoming changes i915 might not allow
    all sprite planes enabled, depending on available
    bandwidth limitation. Thus the test need to decrement
    amount of planes and try again, instead of panicking.
    
    v2: Removed excessive nested conditions, making code a bit
        more readable(hopefully).
    
    v3: Stopped using global n_planes variable as it might cause
        resources being unreleased.
        Using now parms[i].mask as a way to determine if plane
        has to be included into commit.
    
    v4: Removed unneeded n_overlays initialization.
    
    v5: Randomize which of sprite planes to remove if hitting
        resource limits.
    
    v6: Replace igt_warn with igt_info, to make IGT tests happier.
    
    v7: Removed unneeded retry logic, made plane random removal simplier.
        Great thanks to Maarten Lankhorst for suggestions.
    
    v8: Fail if we have less than 3 planes
    
    v9: Remove unneeded diffs
    
    Signed-off-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
    Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
    5941f371