diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-06-10 04:15:10 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-06-10 18:13:54 -0400 |
commit | 6ba6d03e69125ef42a63e90d45e49c659ea3c34f (patch) | |
tree | 5a1d0fbe6fc7a61e51781ea732ce6ac049dbd1da /include/drm/drm_crtc.h | |
parent | ca793f75d91d61fd0009c4179eb88aac54a74239 (diff) |
drm: Print pretty names for pixel formats
Rather than just printing the pixel format as a hex number, decode the
fourcc into human readable form, and also decode the LE vs. BE flag.
Keep printing the raw hex number too in case it contains non-printable
characters.
Some examples what the new drm_get_format_name() produces:
DRM_FORMAT_XRGB8888: "XR24 little-endian (0x34325258)"
DRM_FORMAT_YUYV: "YUYV little-endian (0x56595559)"
DRM_FORMAT_RGB565|DRM_FORMAT_BIG_ENDIAN: "RG16 big-endian (0xb6314752)"
Unprintable characters: "D??? big-endian (0xff7f0244)"
v2: Fix patch author
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r-- | include/drm/drm_crtc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index adb3f9b625f6..2cbbfd44c6df 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -1094,5 +1094,6 @@ extern int drm_format_num_planes(uint32_t format); | |||
1094 | extern int drm_format_plane_cpp(uint32_t format, int plane); | 1094 | extern int drm_format_plane_cpp(uint32_t format, int plane); |
1095 | extern int drm_format_horz_chroma_subsampling(uint32_t format); | 1095 | extern int drm_format_horz_chroma_subsampling(uint32_t format); |
1096 | extern int drm_format_vert_chroma_subsampling(uint32_t format); | 1096 | extern int drm_format_vert_chroma_subsampling(uint32_t format); |
1097 | extern char *drm_get_format_name(uint32_t format); | ||
1097 | 1098 | ||
1098 | #endif /* __DRM_CRTC_H__ */ | 1099 | #endif /* __DRM_CRTC_H__ */ |