Commit 144cc143 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Use DRM_DEBUG_KMS() for framebuffer failure debug messages

DRM_UT_CORE generates way too much noise usually, so having the
framebuffer init failures use DRM_UT_CORE is a pain when trying to
find out the reason why you failed in creating a framebuffer.
Let's use DRM_UT_KMS for these debug messages instead.

v2: s/at less than/at most/ in the debug message (Imre)
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170307194210.13400-6-ville.syrjala@linux.intel.com
parent 3ca46c0a
...@@ -2454,7 +2454,7 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, ...@@ -2454,7 +2454,7 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv,
*/ */
if (i915_gem_object_is_tiled(intel_fb->obj) && if (i915_gem_object_is_tiled(intel_fb->obj) &&
(x + width) * cpp > fb->pitches[i]) { (x + width) * cpp > fb->pitches[i]) {
DRM_DEBUG("bad fb plane %d offset: 0x%x\n", DRM_DEBUG_KMS("bad fb plane %d offset: 0x%x\n",
i, fb->offsets[i]); i, fb->offsets[i]);
return -EINVAL; return -EINVAL;
} }
...@@ -2537,9 +2537,9 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, ...@@ -2537,9 +2537,9 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv,
max_size = max(max_size, offset + size); max_size = max(max_size, offset + size);
} }
if (max_size * tile_size > to_intel_framebuffer(fb)->obj->base.size) { if (max_size * tile_size > intel_fb->obj->base.size) {
DRM_DEBUG("fb too big for bo (need %u bytes, have %zu bytes)\n", DRM_DEBUG_KMS("fb too big for bo (need %u bytes, have %zu bytes)\n",
max_size * tile_size, to_intel_framebuffer(fb)->obj->base.size); max_size * tile_size, intel_fb->obj->base.size);
return -EINVAL; return -EINVAL;
} }
...@@ -14298,14 +14298,14 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14298,14 +14298,14 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
*/ */
if (tiling != I915_TILING_NONE && if (tiling != I915_TILING_NONE &&
tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) {
DRM_DEBUG("tiling_mode doesn't match fb modifier\n"); DRM_DEBUG_KMS("tiling_mode doesn't match fb modifier\n");
goto err; goto err;
} }
} else { } else {
if (tiling == I915_TILING_X) { if (tiling == I915_TILING_X) {
mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED; mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED;
} else if (tiling == I915_TILING_Y) { } else if (tiling == I915_TILING_Y) {
DRM_DEBUG("No Y tiling for legacy addfb\n"); DRM_DEBUG_KMS("No Y tiling for legacy addfb\n");
goto err; goto err;
} }
} }
...@@ -14315,7 +14315,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14315,7 +14315,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
case I915_FORMAT_MOD_Y_TILED: case I915_FORMAT_MOD_Y_TILED:
case I915_FORMAT_MOD_Yf_TILED: case I915_FORMAT_MOD_Yf_TILED:
if (INTEL_GEN(dev_priv) < 9) { if (INTEL_GEN(dev_priv) < 9) {
DRM_DEBUG("Unsupported tiling 0x%llx!\n", DRM_DEBUG_KMS("Unsupported tiling 0x%llx!\n",
mode_cmd->modifier[0]); mode_cmd->modifier[0]);
goto err; goto err;
} }
...@@ -14323,7 +14323,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14323,7 +14323,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
case I915_FORMAT_MOD_X_TILED: case I915_FORMAT_MOD_X_TILED:
break; break;
default: default:
DRM_DEBUG("Unsupported fb modifier 0x%llx!\n", DRM_DEBUG_KMS("Unsupported fb modifier 0x%llx!\n",
mode_cmd->modifier[0]); mode_cmd->modifier[0]);
goto err; goto err;
} }
...@@ -14334,14 +14334,14 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14334,14 +14334,14 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
*/ */
if (INTEL_INFO(dev_priv)->gen < 4 && if (INTEL_INFO(dev_priv)->gen < 4 &&
tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) {
DRM_DEBUG("tiling_mode must match fb modifier exactly on gen2/3\n"); DRM_DEBUG_KMS("tiling_mode must match fb modifier exactly on gen2/3\n");
goto err; goto err;
} }
pitch_limit = intel_fb_pitch_limit(dev_priv, mode_cmd->modifier[0], pitch_limit = intel_fb_pitch_limit(dev_priv, mode_cmd->modifier[0],
mode_cmd->pixel_format); mode_cmd->pixel_format);
if (mode_cmd->pitches[0] > pitch_limit) { if (mode_cmd->pitches[0] > pitch_limit) {
DRM_DEBUG("%s pitch (%u) must be at less than %d\n", DRM_DEBUG_KMS("%s pitch (%u) must be at most %d\n",
mode_cmd->modifier[0] != DRM_FORMAT_MOD_NONE ? mode_cmd->modifier[0] != DRM_FORMAT_MOD_NONE ?
"tiled" : "linear", "tiled" : "linear",
mode_cmd->pitches[0], pitch_limit); mode_cmd->pitches[0], pitch_limit);
...@@ -14353,7 +14353,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14353,7 +14353,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
* the fb pitch and fence stride match. * the fb pitch and fence stride match.
*/ */
if (tiling != I915_TILING_NONE && mode_cmd->pitches[0] != stride) { if (tiling != I915_TILING_NONE && mode_cmd->pitches[0] != stride) {
DRM_DEBUG("pitch (%d) must match tiling stride (%d)\n", DRM_DEBUG_KMS("pitch (%d) must match tiling stride (%d)\n",
mode_cmd->pitches[0], stride); mode_cmd->pitches[0], stride);
goto err; goto err;
} }
...@@ -14367,7 +14367,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14367,7 +14367,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
break; break;
case DRM_FORMAT_XRGB1555: case DRM_FORMAT_XRGB1555:
if (INTEL_GEN(dev_priv) > 3) { if (INTEL_GEN(dev_priv) > 3) {
DRM_DEBUG("unsupported pixel format: %s\n", DRM_DEBUG_KMS("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format, &format_name)); drm_get_format_name(mode_cmd->pixel_format, &format_name));
goto err; goto err;
} }
...@@ -14375,7 +14375,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14375,7 +14375,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
case DRM_FORMAT_ABGR8888: case DRM_FORMAT_ABGR8888:
if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv) && if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv) &&
INTEL_GEN(dev_priv) < 9) { INTEL_GEN(dev_priv) < 9) {
DRM_DEBUG("unsupported pixel format: %s\n", DRM_DEBUG_KMS("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format, &format_name)); drm_get_format_name(mode_cmd->pixel_format, &format_name));
goto err; goto err;
} }
...@@ -14384,14 +14384,14 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14384,14 +14384,14 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
case DRM_FORMAT_XRGB2101010: case DRM_FORMAT_XRGB2101010:
case DRM_FORMAT_XBGR2101010: case DRM_FORMAT_XBGR2101010:
if (INTEL_GEN(dev_priv) < 4) { if (INTEL_GEN(dev_priv) < 4) {
DRM_DEBUG("unsupported pixel format: %s\n", DRM_DEBUG_KMS("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format, &format_name)); drm_get_format_name(mode_cmd->pixel_format, &format_name));
goto err; goto err;
} }
break; break;
case DRM_FORMAT_ABGR2101010: case DRM_FORMAT_ABGR2101010:
if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv)) { if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv)) {
DRM_DEBUG("unsupported pixel format: %s\n", DRM_DEBUG_KMS("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format, &format_name)); drm_get_format_name(mode_cmd->pixel_format, &format_name));
goto err; goto err;
} }
...@@ -14401,13 +14401,13 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14401,13 +14401,13 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
case DRM_FORMAT_YVYU: case DRM_FORMAT_YVYU:
case DRM_FORMAT_VYUY: case DRM_FORMAT_VYUY:
if (INTEL_GEN(dev_priv) < 5) { if (INTEL_GEN(dev_priv) < 5) {
DRM_DEBUG("unsupported pixel format: %s\n", DRM_DEBUG_KMS("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format, &format_name)); drm_get_format_name(mode_cmd->pixel_format, &format_name));
goto err; goto err;
} }
break; break;
default: default:
DRM_DEBUG("unsupported pixel format: %s\n", DRM_DEBUG_KMS("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format, &format_name)); drm_get_format_name(mode_cmd->pixel_format, &format_name));
goto err; goto err;
} }
...@@ -14421,7 +14421,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, ...@@ -14421,7 +14421,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
stride_alignment = intel_fb_stride_alignment(&intel_fb->base, 0); stride_alignment = intel_fb_stride_alignment(&intel_fb->base, 0);
if (mode_cmd->pitches[0] & (stride_alignment - 1)) { if (mode_cmd->pitches[0] & (stride_alignment - 1)) {
DRM_DEBUG("pitch (%d) must be at least %u byte aligned\n", DRM_DEBUG_KMS("pitch (%d) must be at least %u byte aligned\n",
mode_cmd->pitches[0], stride_alignment); mode_cmd->pitches[0], stride_alignment);
goto err; goto err;
} }
......
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