Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06da8da2 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter
Browse files

drm/i915: Use alphabetical names for sprites



Add sprite_name() macro which should be used with the kind of sprites
that are fixed to pipes (gen4.5+).

Also use dev_priv->num_plane to calculate the sprite index insted
assuming two sprites per pipe. This should make it print the right
name.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 4bb6f1f3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@ enum plane {
};
#define plane_name(p) ((p) + 'A')

#define sprite_name(p, s) ((p) * dev_priv->num_plane + (s) + 'A')

enum port {
	PORT_A = 0,
	PORT_B,
+4 −4
Original line number Diff line number Diff line
@@ -1302,8 +1302,8 @@ static void assert_sprites_disabled(struct drm_i915_private *dev_priv,
		reg = SPCNTR(pipe, i);
		val = I915_READ(reg);
		WARN((val & SP_ENABLE),
		     "sprite %d assertion failure, should be off on pipe %c but is still active\n",
		     pipe * 2 + i, pipe_name(pipe));
		     "sprite %c assertion failure, should be off on pipe %c but is still active\n",
		     sprite_name(pipe, i), pipe_name(pipe));
	}
}

@@ -9051,8 +9051,8 @@ void intel_modeset_init(struct drm_device *dev)
		for (j = 0; j < dev_priv->num_plane; j++) {
			ret = intel_plane_init(dev, i, j);
			if (ret)
				DRM_DEBUG_KMS("pipe %c plane %d init failed: %d\n",
					      pipe_name(i), j, ret);
				DRM_DEBUG_KMS("pipe %c sprite %c init failed: %d\n",
					      pipe_name(i), sprite_name(i, j), ret);
		}
	}