Skip to content
  • Daniel Stone's avatar
    compositor-drm: Use plane_state_coords_for_view for scanout · 7cdf231c
    Daniel Stone authored
    
    
    Now that we have a helper to fill the plane state co-ordinates from a
    view, use this for the scanout plane.
    
    We now explicitly check that the view fills exactly the fullscreen area
    and nothing else. We then use the new helper to fill out the plane state
    values, and do further checks against the filled-in co-ordinates, i.e.
    that we're not trying to show an offset into the buffer, or to scale the
    image.
    
    This now allows cases where the buffer -> surface -> view -> output
    transform chain cancels each other out for scaling: previously, we would
    never consider a buffer for scanout unless its scale matched the
    output's. We now only look at the final result of the buffer -> output
    transformation, to check that this does not result in translation or
    scaling.
    
    An audit of the error paths found some places where we would leave a
    plane state hanging; this makes them all consistent.
    
    Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
    Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    Tested-by: default avatarEmre Ucan <eucan@de.adit-jv.com>
    7cdf231c