Commit 0bd39e30 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915/fb: Add debug spew for misaligned CC plane



We're currently failing to provide any debug output when the
user passes in a misaligned offset for the clear color plane.
Add some debugs prints to make debugging actually possible.

Cc: Sagar Ghuge <sagar.ghuge@intel.com>
Cc: Nanley Chery <nanley.g.chery@intel.com>
Cc: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241129065014.8363-3-ville.syrjala@linux.intel.com


Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
parent ed3a892e
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1694,12 +1694,16 @@ int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *
		 * arithmetic related to alignment and offset calculation.
		 */
		if (is_gen12_ccs_cc_plane(&fb->base, i)) {
			if (IS_ALIGNED(fb->base.offsets[i], 64))
				continue;
			else
			if (!IS_ALIGNED(fb->base.offsets[i], 64)) {
				drm_dbg_kms(&i915->drm,
					    "fb misaligned clear color plane %d offset (0x%x)\n",
					    i, fb->base.offsets[i]);
				return -EINVAL;
			}

			continue;
		}

		intel_fb_plane_dims(fb, i, &width, &height);

		ret = convert_plane_offset_to_xy(fb, i, width, &x, &y);