[Intel-gfx] [PATCH 7/9] drm/i915: Use DRM_DEBUG_KMS() for framebuffer failure debug messages
Imre Deak
imre.deak at intel.com
Thu Feb 2 16:19:06 UTC 2017
On Wed, Jan 04, 2017 at 08:42:30PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> 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.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 66 ++++++++++++++++++------------------
> 1 file changed, 33 insertions(+), 33 deletions(-)
> [...]
> @@ -15940,17 +15940,17 @@ static int intel_framebuffer_init(struct drm_device *dev,
> */
> if (INTEL_INFO(dev_priv)->gen < 4 &&
> 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");
> return -EINVAL;
> }
>
> pitch_limit = intel_fb_pitch_limit(dev_priv, mode_cmd->modifier[0],
> mode_cmd->pixel_format);
> if (mode_cmd->pitches[0] > pitch_limit) {
> - DRM_DEBUG("%s pitch (%u) must be at less than %d\n",
> - mode_cmd->modifier[0] != DRM_FORMAT_MOD_NONE ?
> - "tiled" : "linear",
> - mode_cmd->pitches[0], pitch_limit);
> + DRM_DEBUG_KMS("%s pitch (%u) must be at less than %d\n",
While at it: s/at less than/at most/
Reviewed-by: Imre Deak <imre.deak at intel.com>
> + mode_cmd->modifier[0] != DRM_FORMAT_MOD_NONE ?
> + "tiled" : "linear",
> + mode_cmd->pitches[0], pitch_limit);
> return -EINVAL;
> }
>
> @@ -15960,9 +15960,9 @@ static int intel_framebuffer_init(struct drm_device *dev,
> */
> if (tiling != I915_TILING_NONE &&
> mode_cmd->pitches[0] != i915_gem_object_get_stride(obj)) {
> - DRM_DEBUG("pitch (%d) must match tiling stride (%d)\n",
> - mode_cmd->pitches[0],
> - i915_gem_object_get_stride(obj));
> + DRM_DEBUG_KMS("pitch (%d) must match tiling stride (%d)\n",
> + mode_cmd->pitches[0],
> + i915_gem_object_get_stride(obj));
> return -EINVAL;
> }
>
> @@ -15975,16 +15975,16 @@ static int intel_framebuffer_init(struct drm_device *dev,
> break;
> case DRM_FORMAT_XRGB1555:
> if (INTEL_GEN(dev_priv) > 3) {
> - DRM_DEBUG("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd->pixel_format, &format_name));
> + DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> + drm_get_format_name(mode_cmd->pixel_format, &format_name));
> return -EINVAL;
> }
> break;
> case DRM_FORMAT_ABGR8888:
> if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv) &&
> INTEL_GEN(dev_priv) < 9) {
> - DRM_DEBUG("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd->pixel_format, &format_name));
> + DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> + drm_get_format_name(mode_cmd->pixel_format, &format_name));
> return -EINVAL;
> }
> break;
> @@ -15992,15 +15992,15 @@ static int intel_framebuffer_init(struct drm_device *dev,
> case DRM_FORMAT_XRGB2101010:
> case DRM_FORMAT_XBGR2101010:
> if (INTEL_GEN(dev_priv) < 4) {
> - DRM_DEBUG("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd->pixel_format, &format_name));
> + DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> + drm_get_format_name(mode_cmd->pixel_format, &format_name));
> return -EINVAL;
> }
> break;
> case DRM_FORMAT_ABGR2101010:
> if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv)) {
> - DRM_DEBUG("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd->pixel_format, &format_name));
> + DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> + drm_get_format_name(mode_cmd->pixel_format, &format_name));
> return -EINVAL;
> }
> break;
> @@ -16009,14 +16009,14 @@ static int intel_framebuffer_init(struct drm_device *dev,
> case DRM_FORMAT_YVYU:
> case DRM_FORMAT_VYUY:
> if (INTEL_GEN(dev_priv) < 5) {
> - DRM_DEBUG("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd->pixel_format, &format_name));
> + DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> + drm_get_format_name(mode_cmd->pixel_format, &format_name));
> return -EINVAL;
> }
> break;
> default:
> - DRM_DEBUG("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd->pixel_format, &format_name));
> + DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> + drm_get_format_name(mode_cmd->pixel_format, &format_name));
> return -EINVAL;
> }
>
> @@ -16028,8 +16028,8 @@ static int intel_framebuffer_init(struct drm_device *dev,
>
> stride_alignment = intel_fb_stride_alignment(&intel_fb->base, 0);
> if (mode_cmd->pitches[0] & (stride_alignment - 1)) {
> - DRM_DEBUG("pitch (%d) must be at least %u byte aligned\n",
> - mode_cmd->pitches[0], stride_alignment);
> + DRM_DEBUG_KMS("pitch (%d) must be at least %u byte aligned\n",
> + mode_cmd->pitches[0], stride_alignment);
> return -EINVAL;
> }
>
> --
> 2.10.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list