diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-10-03 14:15:44 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-10-03 18:45:41 +0300 |
commit | d5c45330c8986aff945de997383e19b5b7a85b9a (patch) | |
tree | 2020229255d2352ea9a4839ee9142b3f61594c3e /drivers/gpu/drm/i915/display/intel_fb.c | |
parent | 334810f82024815283a6e7febd3d2de1fed6c232 (diff) |
drm/i915: Simplify modifier lookup in watermark code
Replace the huge modifier lists in the watermark code with
a few calls to intel_fb.c.
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221003111544.8007-7-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_fb.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_fb.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c index b191915ab351..cc755cc017c1 100644 --- a/drivers/gpu/drm/i915/display/intel_fb.c +++ b/drivers/gpu/drm/i915/display/intel_fb.c @@ -301,6 +301,19 @@ static bool plane_caps_contain_all(u8 caps, u8 mask) } /** + * intel_fb_is_tiled_modifier: Check if a modifier is a tiled modifier type + * @modifier: Modifier to check + * + * Returns: + * Returns %true if @modifier is a tiled modifier. + */ +bool intel_fb_is_tiled_modifier(u64 modifier) +{ + return plane_caps_contain_any(lookup_modifier(modifier)->plane_caps, + INTEL_PLANE_CAP_TILING_MASK); +} + +/** * intel_fb_is_ccs_modifier: Check if a modifier is a CCS modifier type * @modifier: Modifier to check * |