diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-10-15 21:06:51 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-11-06 13:29:34 +1000 |
commit | 23c453a4af187e06d3d16649f1f3f2d16c132f83 (patch) | |
tree | d321912e9b3f4cb329534395374ee1acee8e651d /drivers/gpu/drm/drm_crtc.c | |
parent | e7bfa5c407a39fa1eb0e85180451dda228acc97f (diff) | |
download | linux-23c453a4af187e06d3d16649f1f3f2d16c132f83.tar.bz2 |
drm: Pretty print pixel format in drm_fb_get_bpp_depth() and format_check()
drm_fb_get_bpp_depth() likes to complain about unsupported pixel formats
but doesn't bother telling us what the format was. Also format_check()
just returns an error when it encouters an invalid format, leaving the
user scratching his head trying to figure out why addfb failed. Make
life a bit easier by using drm_get_format_name() in both places.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index b6a8f7ffb47f..d6cf77c472e7 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2489,6 +2489,8 @@ static int format_check(const struct drm_mode_fb_cmd2 *r) case DRM_FORMAT_YVU444: return 0; default: + DRM_DEBUG_KMS("invalid pixel format %s\n", + drm_get_format_name(r->pixel_format)); return -EINVAL; } } @@ -3828,7 +3830,8 @@ void drm_fb_get_bpp_depth(uint32_t format, unsigned int *depth, *bpp = 32; break; default: - DRM_DEBUG_KMS("unsupported pixel format\n"); + DRM_DEBUG_KMS("unsupported pixel format %s\n", + drm_get_format_name(format)); *depth = 0; *bpp = 0; break; |