drm/i915/fbc: Split plane tiling checks per-platform
Carve up tiling_is_valid() into per-platform variants to make it easier to see what limits are actually being imposed. TODO: maybe go for vfuncs later Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231003194256.28569-3-ville.syrjala@linux.intel.com
This commit is contained in:
parent
a8a3b4cd74
commit
9fbe915b88
@ -994,16 +994,21 @@ static bool intel_fbc_hw_tracking_covers_screen(const struct intel_plane_state *
|
||||
return effective_w <= max_w && effective_h <= max_h;
|
||||
}
|
||||
|
||||
static bool tiling_is_valid(const struct intel_plane_state *plane_state)
|
||||
static bool i8xx_fbc_tiling_valid(const struct intel_plane_state *plane_state)
|
||||
{
|
||||
const struct drm_framebuffer *fb = plane_state->hw.fb;
|
||||
|
||||
return fb->modifier == I915_FORMAT_MOD_X_TILED;
|
||||
}
|
||||
|
||||
static bool skl_fbc_tiling_valid(const struct intel_plane_state *plane_state)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev);
|
||||
const struct drm_framebuffer *fb = plane_state->hw.fb;
|
||||
|
||||
switch (fb->modifier) {
|
||||
case DRM_FORMAT_MOD_LINEAR:
|
||||
case I915_FORMAT_MOD_Y_TILED:
|
||||
case I915_FORMAT_MOD_Yf_TILED:
|
||||
return DISPLAY_VER(i915) >= 9;
|
||||
case I915_FORMAT_MOD_4_TILED:
|
||||
case I915_FORMAT_MOD_X_TILED:
|
||||
return true;
|
||||
@ -1012,6 +1017,16 @@ static bool tiling_is_valid(const struct intel_plane_state *plane_state)
|
||||
}
|
||||
}
|
||||
|
||||
static bool tiling_is_valid(const struct intel_plane_state *plane_state)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(plane_state->uapi.plane->dev);
|
||||
|
||||
if (DISPLAY_VER(i915) >= 9)
|
||||
return skl_fbc_tiling_valid(plane_state);
|
||||
else
|
||||
return i8xx_fbc_tiling_valid(plane_state);
|
||||
}
|
||||
|
||||
static void intel_fbc_update_state(struct intel_atomic_state *state,
|
||||
struct intel_crtc *crtc,
|
||||
struct intel_plane *plane)
|
||||
|
Loading…
x
Reference in New Issue
Block a user