Commit df63860d authored by Imre Deak's avatar Imre Deak

drm/i915: Handle CCS CC planes separately from CCS AUX planes

CCS CC planes are quite different from CCS AUX planes, even though we
regard the CC planes as a linear buffer having a 64 byte stride.  Thus
it's clearer to check for either CCS plane types explicitly when we need
to handle them; add the required CCS CC planes check here, while the
next patch will change all is_ccs_plane()/is_gen12_ccs_plane() checks to
consider only the CCS AUX planes.

Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211020195138.1841242-9-imre.deak@intel.com
parent b0f1670d
...@@ -409,7 +409,8 @@ static bool is_semiplanar_uv_plane(const struct drm_framebuffer *fb, int color_p ...@@ -409,7 +409,8 @@ static bool is_semiplanar_uv_plane(const struct drm_framebuffer *fb, int color_p
bool is_surface_linear(const struct drm_framebuffer *fb, int color_plane) bool is_surface_linear(const struct drm_framebuffer *fb, int color_plane)
{ {
return fb->modifier == DRM_FORMAT_MOD_LINEAR || return fb->modifier == DRM_FORMAT_MOD_LINEAR ||
is_gen12_ccs_plane(fb, color_plane); is_gen12_ccs_plane(fb, color_plane) ||
is_gen12_ccs_cc_plane(fb, color_plane);
} }
int main_to_ccs_plane(const struct drm_framebuffer *fb, int main_plane) int main_to_ccs_plane(const struct drm_framebuffer *fb, int main_plane)
...@@ -502,7 +503,8 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane) ...@@ -502,7 +503,8 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)
case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS: case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS:
case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC: case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC:
case I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS: case I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS:
if (is_ccs_plane(fb, color_plane)) if (is_ccs_plane(fb, color_plane) ||
is_gen12_ccs_cc_plane(fb, color_plane))
return 64; return 64;
fallthrough; fallthrough;
case I915_FORMAT_MOD_Y_TILED: case I915_FORMAT_MOD_Y_TILED:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment