forked from Minki/linux
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: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
4bb6f1f327
commit
06da8da2b0
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user