diff options
Diffstat (limited to 'include/drm/drm_fourcc.h')
-rw-r--r-- | include/drm/drm_fourcc.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index 156b122c0ad5..76a5fc0b2737 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h @@ -123,6 +123,25 @@ struct drm_format_info { */ u8 block_h[4]; + /** + * @pixels_per_macropixel: + * Number of pixels per macro-pixel (per plane). A macro-pixel is + * composed of multiple pixels, and there can be extra bits between + * pixels. This must be used along with @bytes_per_macropixel, only + * when single pixel size is not byte-aligned. In this case, @cpp + * is not valid and should be 0. + */ + u8 pixels_per_macropixel[3]; + + /** + * @bytes_per_macropixel: + * Number of bytes per macro-pixel (per plane). A macro-pixel is + * composed of multiple pixels. The size of single macro-pixel should + * be byte-aligned. This should be used with @pixels_per_macropixel, + * and @cpp should be 0. + */ + u8 bytes_per_macropixel[3]; + /** @hsub: Horizontal chroma subsampling factor */ u8 hsub; /** @vsub: Vertical chroma subsampling factor */ @@ -318,6 +337,8 @@ unsigned int drm_format_info_block_height(const struct drm_format_info *info, int plane); uint64_t drm_format_info_min_pitch(const struct drm_format_info *info, int plane, unsigned int buffer_width); +uint64_t drm_format_plane_width_bytes(const struct drm_format_info *info, + int plane, unsigned int width); const char *drm_get_format_name(uint32_t format, struct drm_format_name_buf *buf); #endif /* __DRM_FOURCC_H__ */ |