Commit 4ee62c76 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Dave Airlie

drm/i915: Print pretty names for pixel formats

Use drm_get_format_name to print more readable pixel format names
in debug output.

Also unify the debug messages to say "unsupported pixel format",
which better describes what is going on.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 6ba6d03e
...@@ -8945,7 +8945,8 @@ int intel_framebuffer_init(struct drm_device *dev, ...@@ -8945,7 +8945,8 @@ int intel_framebuffer_init(struct drm_device *dev,
case DRM_FORMAT_XRGB1555: case DRM_FORMAT_XRGB1555:
case DRM_FORMAT_ARGB1555: case DRM_FORMAT_ARGB1555:
if (INTEL_INFO(dev)->gen > 3) { if (INTEL_INFO(dev)->gen > 3) {
DRM_DEBUG("invalid format: 0x%08x\n", mode_cmd->pixel_format); DRM_DEBUG("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format));
return -EINVAL; return -EINVAL;
} }
break; break;
...@@ -8956,7 +8957,8 @@ int intel_framebuffer_init(struct drm_device *dev, ...@@ -8956,7 +8957,8 @@ int intel_framebuffer_init(struct drm_device *dev,
case DRM_FORMAT_XBGR2101010: case DRM_FORMAT_XBGR2101010:
case DRM_FORMAT_ABGR2101010: case DRM_FORMAT_ABGR2101010:
if (INTEL_INFO(dev)->gen < 4) { if (INTEL_INFO(dev)->gen < 4) {
DRM_DEBUG("invalid format: 0x%08x\n", mode_cmd->pixel_format); DRM_DEBUG("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format));
return -EINVAL; return -EINVAL;
} }
break; break;
...@@ -8965,12 +8967,14 @@ int intel_framebuffer_init(struct drm_device *dev, ...@@ -8965,12 +8967,14 @@ int intel_framebuffer_init(struct drm_device *dev,
case DRM_FORMAT_YVYU: case DRM_FORMAT_YVYU:
case DRM_FORMAT_VYUY: case DRM_FORMAT_VYUY:
if (INTEL_INFO(dev)->gen < 5) { if (INTEL_INFO(dev)->gen < 5) {
DRM_DEBUG("invalid format: 0x%08x\n", mode_cmd->pixel_format); DRM_DEBUG("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format));
return -EINVAL; return -EINVAL;
} }
break; break;
default: default:
DRM_DEBUG("unsupported pixel format 0x%08x\n", mode_cmd->pixel_format); DRM_DEBUG("unsupported pixel format: %s\n",
drm_get_format_name(mode_cmd->pixel_format));
return -EINVAL; return -EINVAL;
} }
......
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