• Imre Deak's avatar
    drm/i915: Unify the FB and plane state view information into one struct · 61169987
    Imre Deak authored
    To allow the simplification of FB/plane view computation in the
    follow-up patches, unify the corresponding state in the
    intel_framebuffer and intel_plane_state structs into a new intel_fb_view
    struct.
    
    This adds some overhead to intel_framebuffer as the rotated view will
    have now space for 4 color planes instead of the required 2 and it'll
    also contain the unused offset for each color_plane info. Imo this is an
    acceptable trade-off to get a simplified way of the remap computation.
    
    Use the new intel_fb_view struct for the FB normal view as well, so (in
    the follow-up patches) we can remove the special casing for normal view
    calculation wrt. the calculation of remapped/rotated views. This also
    adds an overhead to the intel_framebuffer struct, as the gtt remap info
    and per-color plane offset/pitch is not required for the normal view,
    but imo this is an acceptable trade-off as above. The per-color plane
    pitch filed will be used by a follow-up patch, so we can retrieve the
    pitch for each view in the same way.
    
    No functional changes in this patch.
    
    v2:
    - Make the patch have _no functional change_.
      (fix skl_check_nv12_aux_surface() and skl_check_main_surface()).
    - s/i915_color_plane_view::pitch/stride/ (Ville)
    Suggested-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
    Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-17-imre.deak@intel.com
    61169987
intel_cursor.c 22.2 KB