Skip to content
  • Ville Syrjälä's avatar
    lib/igt_fb: Fix intel_buf surface init · 2d5cf56c
    Ville Syrjälä authored
    
    
    The current coed is populating buf->ccs[] and buf->surface[]
    in a rather inconsistent way.
    
    It looks like for flat CCS platforms:
    - we populate buf->ccs[] with some nonsense even though
      we shouldn't since the AUX stuff is completely hidden by
      the hardware
    - we seem to stick data about the clear color into both
      both buf->ccs[] and buf->surfaces[] when it should be in neither
    
    For non-flat CCS platforms the code seems more reasonable,
    except it only manages to skip the clear color fumble by
    the fact that num_planes is always odd with clear color
    and thus the /2 will truncate it away.
    
    Anyways, let's make the code make actual sense for all platforms
    by properly calculating how many main surfaces and ccs surfaces
    there should be.
    
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
    2d5cf56c
Loading