Lines Matching full:modifier
127 u64 modifier; member
160 .modifier = I915_FORMAT_MOD_4_TILED_DG2_MC_CCS,
164 .modifier = I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC,
172 .modifier = I915_FORMAT_MOD_4_TILED_DG2_RC_CCS,
176 .modifier = I915_FORMAT_MOD_4_TILED,
180 .modifier = I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS,
189 .modifier = I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS,
197 .modifier = I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC,
206 .modifier = I915_FORMAT_MOD_Yf_TILED_CCS,
214 .modifier = I915_FORMAT_MOD_Y_TILED_CCS,
222 .modifier = I915_FORMAT_MOD_Yf_TILED,
226 .modifier = I915_FORMAT_MOD_Y_TILED,
230 .modifier = I915_FORMAT_MOD_X_TILED,
234 .modifier = DRM_FORMAT_MOD_LINEAR,
239 static const struct intel_modifier_desc *lookup_modifier_or_null(u64 modifier) in lookup_modifier_or_null() argument
244 if (intel_modifiers[i].modifier == modifier) in lookup_modifier_or_null()
250 static const struct intel_modifier_desc *lookup_modifier(u64 modifier) in lookup_modifier() argument
252 const struct intel_modifier_desc *md = lookup_modifier_or_null(modifier); in lookup_modifier()
275 * intel_fb_get_format_info: Get a modifier specific format information
279 * Returns the format information for @cmd->pixel_format specific to @cmd->modifier[0],
280 * or %NULL if the modifier doesn't override the format.
285 const struct intel_modifier_desc *md = lookup_modifier_or_null(cmd->modifier[0]); in intel_fb_get_format_info()
304 * intel_fb_is_ccs_modifier: Check if a modifier is a CCS modifier type
305 * @modifier: Modifier to check
308 * Returns %true if @modifier is a render, render with color clear or
309 * media compression modifier.
311 bool intel_fb_is_ccs_modifier(u64 modifier) in intel_fb_is_ccs_modifier() argument
313 return plane_caps_contain_any(lookup_modifier(modifier)->plane_caps, in intel_fb_is_ccs_modifier()
318 * intel_fb_is_rc_ccs_cc_modifier: Check if a modifier is an RC CCS CC modifier type
319 * @modifier: Modifier to check
322 * Returns %true if @modifier is a render with color clear modifier.
324 bool intel_fb_is_rc_ccs_cc_modifier(u64 modifier) in intel_fb_is_rc_ccs_cc_modifier() argument
326 return plane_caps_contain_any(lookup_modifier(modifier)->plane_caps, in intel_fb_is_rc_ccs_cc_modifier()
331 * intel_fb_is_mc_ccs_modifier: Check if a modifier is an MC CCS modifier type
332 * @modifier: Modifier to check
335 * Returns %true if @modifier is a media compression modifier.
337 bool intel_fb_is_mc_ccs_modifier(u64 modifier) in intel_fb_is_mc_ccs_modifier() argument
339 return plane_caps_contain_any(lookup_modifier(modifier)->plane_caps, in intel_fb_is_mc_ccs_modifier()
376 int count = 1; /* +1 for invalid modifier terminator */ in intel_fb_plane_get_modifiers()
391 *p++ = intel_modifiers[i].modifier; in intel_fb_plane_get_modifiers()
399 * intel_fb_plane_supports_modifier: Determine if a modifier is supported by the given plane
400 * @plane: Plane to check the modifier support for
401 * @modifier: The modifier to check the support for
404 * %true if the @modifier is supported on @plane.
406 bool intel_fb_plane_supports_modifier(struct intel_plane *plane, u64 modifier) in intel_fb_plane_supports_modifier() argument
411 if (plane->base.modifiers[i] == modifier) in intel_fb_plane_supports_modifier()
432 * @modifier: modifier used with the format
435 * %true if @info / @modifier is YUV semiplanar.
438 u64 modifier) in intel_format_info_is_yuv_semiplanar() argument
440 return format_is_yuv_semiplanar(lookup_modifier(modifier), info); in intel_format_info_is_yuv_semiplanar()
462 const struct intel_modifier_desc *md = lookup_modifier(fb->modifier); in intel_fb_is_ccs_aux_plane()
477 const struct intel_modifier_desc *md = lookup_modifier(fb->modifier); in intel_fb_is_gen12_ccs_aux_plane()
489 * framebuffer using a render compression/color clear modifier.
493 const struct intel_modifier_desc *md = lookup_modifier(fb->modifier); in intel_fb_rc_ccs_cc_plane()
510 return intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier) && in is_semiplanar_uv_plane()
516 return fb->modifier == DRM_FORMAT_MOD_LINEAR || in is_surface_linear()
523 drm_WARN_ON(fb->dev, !intel_fb_is_ccs_modifier(fb->modifier) || in main_to_ccs_plane()
531 drm_WARN_ON(fb->dev, !intel_fb_is_ccs_modifier(fb->modifier) || in skl_ccs_to_main_plane()
551 const struct intel_modifier_desc *md = lookup_modifier(fb->modifier); in skl_main_to_aux_plane()
574 switch (fb->modifier) { in intel_tile_width_bytes()
627 MISSING_CASE(fb->modifier); in intel_tile_width_bytes()
706 static bool intel_modifier_uses_dpt(struct drm_i915_private *i915, u64 modifier) in intel_modifier_uses_dpt() argument
708 return DISPLAY_VER(i915) >= 13 && modifier != DRM_FORMAT_MOD_LINEAR; in intel_modifier_uses_dpt()
713 return fb && intel_modifier_uses_dpt(to_i915(fb->dev), fb->modifier); in intel_fb_uses_dpt()
759 if (fb->modifier == DRM_FORMAT_MOD_LINEAR) in intel_surf_alignment()
770 switch (fb->modifier) { in intel_surf_alignment()
792 MISSING_CASE(fb->modifier); in intel_surf_alignment()
1050 else if (fb->modifier != DRM_FORMAT_MOD_LINEAR) in intel_fb_offset_to_xy()
1159 if (intel_fb_is_ccs_modifier(fb->modifier)) in intel_plane_can_remap()
1163 if (fb->modifier == DRM_FORMAT_MOD_LINEAR) { in intel_plane_can_remap()
1179 return IS_ALDERLAKE_P(i915) && fb->base.modifier != DRM_FORMAT_MOD_LINEAR; in intel_fb_needs_pot_stride_remap()
1215 fb->base.modifier, rotation); in intel_plane_needs_remap()
1520 return fb->base.modifier == I915_FORMAT_MOD_Y_TILED || in intel_fb_supports_90_270_rotation()
1521 fb->base.modifier == I915_FORMAT_MOD_Yf_TILED; in intel_fb_supports_90_270_rotation()
1553 * Plane 2 of Render Compression with Clear Color fb modifier in intel_fill_fb_info()
1631 drm_WARN_ON(&i915->drm, intel_fb_is_ccs_modifier(fb->modifier)); in intel_plane_remap_gtt()
1686 u32 pixel_format, u64 modifier) in intel_fb_max_stride() argument
1694 if (DISPLAY_VER(dev_priv) < 4 || intel_fb_is_ccs_modifier(modifier) || in intel_fb_max_stride()
1695 intel_modifier_uses_dpt(dev_priv, modifier)) in intel_fb_max_stride()
1696 return intel_plane_fb_max_stride(dev_priv, pixel_format, modifier); in intel_fb_max_stride()
1712 fb->modifier); in intel_fb_stride_alignment()
1719 !intel_fb_is_ccs_modifier(fb->modifier)) in intel_fb_stride_alignment()
1726 if (intel_fb_is_ccs_modifier(fb->modifier)) { in intel_fb_stride_alignment()
1769 fb->modifier, rotation); in intel_plane_check_stride()
1886 * the fb modifier and tiling mode match. in intel_framebuffer_init()
1889 tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { in intel_framebuffer_init()
1891 "tiling_mode doesn't match fb modifier\n"); in intel_framebuffer_init()
1896 mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED; in intel_framebuffer_init()
1906 mode_cmd->modifier[0])) { in intel_framebuffer_init()
1908 "unsupported pixel format %p4cc / modifier 0x%llx\n", in intel_framebuffer_init()
1909 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in intel_framebuffer_init()
1915 * so the tiling mode must match the fb modifier exactly. in intel_framebuffer_init()
1918 tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { in intel_framebuffer_init()
1920 "tiling_mode must match fb modifier exactly on gen2/3\n"); in intel_framebuffer_init()
1925 mode_cmd->modifier[0]); in intel_framebuffer_init()
1929 mode_cmd->modifier[0] != DRM_FORMAT_MOD_LINEAR ? in intel_framebuffer_init()