1ae4df11aSLaurent Pinchart /* 2ae4df11aSLaurent Pinchart * Copyright (c) 2016 Laurent Pinchart <laurent.pinchart@ideasonboard.com> 3ae4df11aSLaurent Pinchart * 4ae4df11aSLaurent Pinchart * Permission to use, copy, modify, distribute, and sell this software and its 5ae4df11aSLaurent Pinchart * documentation for any purpose is hereby granted without fee, provided that 6ae4df11aSLaurent Pinchart * the above copyright notice appear in all copies and that both that copyright 7ae4df11aSLaurent Pinchart * notice and this permission notice appear in supporting documentation, and 8ae4df11aSLaurent Pinchart * that the name of the copyright holders not be used in advertising or 9ae4df11aSLaurent Pinchart * publicity pertaining to distribution of the software without specific, 10ae4df11aSLaurent Pinchart * written prior permission. The copyright holders make no representations 11ae4df11aSLaurent Pinchart * about the suitability of this software for any purpose. It is provided "as 12ae4df11aSLaurent Pinchart * is" without express or implied warranty. 13ae4df11aSLaurent Pinchart * 14ae4df11aSLaurent Pinchart * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15ae4df11aSLaurent Pinchart * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16ae4df11aSLaurent Pinchart * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17ae4df11aSLaurent Pinchart * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18ae4df11aSLaurent Pinchart * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19ae4df11aSLaurent Pinchart * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 20ae4df11aSLaurent Pinchart * OF THIS SOFTWARE. 21ae4df11aSLaurent Pinchart */ 22ae4df11aSLaurent Pinchart #ifndef __DRM_FOURCC_H__ 23ae4df11aSLaurent Pinchart #define __DRM_FOURCC_H__ 24ae4df11aSLaurent Pinchart 25ae4df11aSLaurent Pinchart #include <linux/types.h> 26ae4df11aSLaurent Pinchart #include <uapi/drm/drm_fourcc.h> 27ae4df11aSLaurent Pinchart 28ec5e3047SDaniel Vetter uint32_t drm_mode_legacy_fb_format(uint32_t bpp, uint32_t depth); 29ae4df11aSLaurent Pinchart void drm_fb_get_bpp_depth(uint32_t format, unsigned int *depth, int *bpp); 30ae4df11aSLaurent Pinchart int drm_format_num_planes(uint32_t format); 31ae4df11aSLaurent Pinchart int drm_format_plane_cpp(uint32_t format, int plane); 32ae4df11aSLaurent Pinchart int drm_format_horz_chroma_subsampling(uint32_t format); 33ae4df11aSLaurent Pinchart int drm_format_vert_chroma_subsampling(uint32_t format); 34ae4df11aSLaurent Pinchart int drm_format_plane_width(int width, uint32_t format, int plane); 35ae4df11aSLaurent Pinchart int drm_format_plane_height(int height, uint32_t format, int plane); 36d3828147SEric Engestrom char *drm_get_format_name(uint32_t format) __malloc; 37ae4df11aSLaurent Pinchart 38ae4df11aSLaurent Pinchart #endif /* __DRM_FOURCC_H__ */ 39