• Imre Deak's avatar
    drm/i915: Add a table with a descriptor for all i915 modifiers · e2b83294
    Imre Deak authored
    Add a table describing all the framebuffer modifiers used by i915 at one
    place. This has the benefit of deduplicating the listing of supported
    modifiers for each platform and checking the support of these modifiers
    on a given plane. This also simplifies in a similar way getting some
    attribute for a modifier, for instance checking if the modifier is a
    CCS modifier type.
    
    While at it drop the cursor plane filtering from skl_plane_has_rc_ccs(),
    as the cursor plane is registered with DRM core elsewhere.
    
    v1: Unchanged.
    v2:
    - Keep the plane caps calculation in the plane code and pass an enum
      with these caps to intel_fb_get_modifiers(). (Ville)
    - Get the modifiers calling intel_fb_get_modifiers() in i9xx_plane.c as
      well.
    v3:
    - s/.id/.modifier/ (Ville)
    - Keep modifier_desc vs. plane_cap filter conditions consistent. (Ville)
    - Drop redundant cursor plane check from skl_plane_has_rc_ccs(). (Ville)
    - Use from, until display version fields in modifier_desc instead of a mask. (Jani)
    - Unexport struct intel_modifier_desc, separate its decl and init. (Jani)
    - Remove enum pipe, plane_id forward decls from intel_fb.h, which are
      not needed after v2.
    v4:
    - Reuse IS_DISPLAY_VER() instead of open-coding it. (Jani)
    - Preserve the current modifier order exposed to user space. (Ville)
    v5: Use }, { on one line to seperate the descriptor array elements. (Jani)
    
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
    Cc: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
    Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> (v3)
    Link: https://patchwork.freedesktop.org/patch/msgid/20211020195138.1841242-2-imre.deak@intel.com
    e2b83294
intel_fb.c 46.2 KB