sorry, the data layout is like this.
å 2019/9/23 äå9:06, Daniel Vetter åé:
On Mon, Sep 23, 2019 at 2:40 PM Sandy Huang <hjc@xxxxxxxxxxxxxx> wrote:
The drm_format_info.cpp[3] unit is BytePerPlane, when we add defineWhatever the layout you have for these (it's not really defined in
10bit YUV format, here have some problem.
So we change cpp to bpp, use unit BitPerPlane to describe the data
format.
Signed-off-by: Sandy Huang <hjc@xxxxxxxxxxxxxx>
your patch here down to the level of detail we want) I think this
should be described with the block_h/w and char_per_block
functionality. Not by extending the legacy and depcrecated cpp
somehow.
-Daniel
Hi Daniel,
It seems the char_per_block and block_h/w can't describing the following data format:
/*
Â* 2x2 subsampled Cr:Cb plane 10 bits per channel
Â* index 0 = Y plane, [9:0]
Â* index 1 = Cr:Cb plane, [19:0] Cr:x:Cb:x [19:0]
Â*/
---
 drivers/gpu/drm/drm_client.c | 4 +-
 drivers/gpu/drm/drm_fb_helper.c | 8 +-
 drivers/gpu/drm/drm_format_helper.c | 4 +-
 drivers/gpu/drm/drm_fourcc.c | 172 +++++++++++++++++++-----------------
 drivers/gpu/drm/drm_framebuffer.c | 2 +-
 include/drm/drm_fourcc.h | 4 +-
 include/uapi/drm/drm_fourcc.h | 15 ++++
 7 files changed, 115 insertions(+), 94 deletions(-)
diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c
index d9a2e36..a36ffbe 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -263,7 +263,7 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u
ÂÂÂÂÂÂÂÂ dumb_args.width = width;
ÂÂÂÂÂÂÂÂ dumb_args.height = height;
-ÂÂÂÂÂÂ dumb_args.bpp = info->cpp[0] * 8;
+ÂÂÂÂÂÂ dumb_args.bpp = info->bpp[0];
ÂÂÂÂÂÂÂÂ ret = drm_mode_create_dumb(dev, &dumb_args, client->file);
ÂÂÂÂÂÂÂÂ if (ret)
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ goto err_delete;
@@ -366,7 +366,7 @@ static int drm_client_buffer_addfb(struct drm_client_buffer *buffer,
ÂÂÂÂÂÂÂÂ int ret;
ÂÂÂÂÂÂÂÂ info = drm_format_info(format);
-ÂÂÂÂÂÂ fb_req.bpp = info->cpp[0] * 8;
+ÂÂÂÂÂÂ fb_req.bpp = info->bpp[0];
ÂÂÂÂÂÂÂÂ fb_req.depth = info->depth;
ÂÂÂÂÂÂÂÂ fb_req.width = width;
ÂÂÂÂÂÂÂÂ fb_req.height = height;
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index a7ba5b4..b30e782 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -382,7 +382,7 @@ static void drm_fb_helper_dirty_blit_real(struct drm_fb_helper *fb_helper,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ struct drm_clip_rect *clip)
 {
ÂÂÂÂÂÂÂÂ struct drm_framebuffer *fb = fb_helper->fb;
-ÂÂÂÂÂÂ unsigned int cpp = fb->format->cpp[0];
+ÂÂÂÂÂÂ unsigned int cpp = fb->format->bpp[0] / 8;
ÂÂÂÂÂÂÂÂ size_t offset = clip->y1 * fb->pitches[0] + clip->x1 * cpp;
ÂÂÂÂÂÂÂÂ void *src = fb_helper->fbdev->screen_buffer + offset;
ÂÂÂÂÂÂÂÂ void *dst = fb_helper->buffer->vaddr + offset;
@@ -1320,14 +1320,14 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
ÂÂÂÂÂÂÂÂÂ * Changes struct fb_var_screeninfo are currently not pushed back
ÂÂÂÂÂÂÂÂÂ * to KMS, hence fail if different settings are requested.
ÂÂÂÂÂÂÂÂÂ */
-ÂÂÂÂÂÂ if (var->bits_per_pixel != fb->format->cpp[0] * 8 ||
+ÂÂÂÂÂÂ if (var->bits_per_pixel != fb->format->bpp[0] ||
ÂÂÂÂÂÂÂÂÂÂÂÂ var->xres > fb->width || var->yres > fb->height ||
ÂÂÂÂÂÂÂÂÂÂÂÂ var->xres_virtual > fb->width || var->yres_virtual > fb->height) {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ DRM_DEBUG("fb requested width/height/bpp can't fit in current fb "
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ "request %dx%d-%d (virtual %dx%d) > %dx%d-%d\n",
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ var->xres, var->yres, var->bits_per_pixel,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ var->xres_virtual, var->yres_virtual,
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ fb->width, fb->height, fb->format->cpp[0] * 8);
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ fb->width, fb->height, fb->format->bpp[0]);
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ return -EINVAL;
ÂÂÂÂÂÂÂÂ }
@@ -1678,7 +1678,7 @@ static void drm_fb_helper_fill_var(struct fb_info *info,
ÂÂÂÂÂÂÂÂ info->pseudo_palette = fb_helper->pseudo_palette;
ÂÂÂÂÂÂÂÂ info->var.xres_virtual = fb->width;
ÂÂÂÂÂÂÂÂ info->var.yres_virtual = fb->height;
-ÂÂÂÂÂÂ info->var.bits_per_pixel = fb->format->cpp[0] * 8;
+ÂÂÂÂÂÂ info->var.bits_per_pixel = fb->format->bpp[0];
ÂÂÂÂÂÂÂÂ info->var.accel_flags = FB_ACCELF_TEXT;
ÂÂÂÂÂÂÂÂ info->var.xoffset = 0;
ÂÂÂÂÂÂÂÂ info->var.yoffset = 0;
diff --git a/drivers/gpu/drm/drm_format_helper.c b/drivers/gpu/drm/drm_format_helper.c
index 0897cb9..eea3afb 100644
--- a/drivers/gpu/drm/drm_format_helper.c
+++ b/drivers/gpu/drm/drm_format_helper.c
@@ -36,7 +36,7 @@ static unsigned int clip_offset(struct drm_rect *clip,
 void drm_fb_memcpy(void *dst, void *vaddr, struct drm_framebuffer *fb,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ struct drm_rect *clip)
 {
-ÂÂÂÂÂÂ unsigned int cpp = fb->format->cpp[0];
+ÂÂÂÂÂÂ unsigned int cpp = fb->format->bpp[0] / 8;
ÂÂÂÂÂÂÂÂ size_t len = (clip->x2 - clip->x1) * cpp;
ÂÂÂÂÂÂÂÂ unsigned int y, lines = clip->y2 - clip->y1;
@@ -63,7 +63,7 @@ void drm_fb_memcpy_dstclip(void __iomem *dst, void *vaddr,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ struct drm_framebuffer *fb,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ struct drm_rect *clip)
 {
-ÂÂÂÂÂÂ unsigned int cpp = fb->format->cpp[0];
+ÂÂÂÂÂÂ unsigned int cpp = fb->format->bpp[0] / 8;
ÂÂÂÂÂÂÂÂ unsigned int offset = clip_offset(clip, fb->pitches[0], cpp);
ÂÂÂÂÂÂÂÂ size_t len = (clip->x2 - clip->x1) * cpp;
ÂÂÂÂÂÂÂÂ unsigned int y, lines = clip->y2 - clip->y1;
diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
index c630064..071dc07 100644
--- a/drivers/gpu/drm/drm_fourcc.c
+++ b/drivers/gpu/drm/drm_fourcc.c
@@ -157,89 +157,95 @@ EXPORT_SYMBOL(drm_get_format_name);
 const struct drm_format_info *__drm_format_info(u32 format)
 {
ÂÂÂÂÂÂÂÂ static const struct drm_format_info formats[] = {
- { .format = DRM_FORMAT_C8, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub = 1 },
- { .format = DRM_FORMAT_RGB332, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub = 1 },
- { .format = DRM_FORMAT_BGR233, .depth = 8, .num_planes = 1, .cpp = { 1, 0, 0 }, .hsub = 1, .vsub = 1 },
- { .format = DRM_FORMAT_XRGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
- { .format = DRM_FORMAT_XBGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
- { .format = DRM_FORMAT_RGBX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
- { .format = DRM_FORMAT_BGRX4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
- { .format = DRM_FORMAT_ARGB4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
- { .format = DRM_FORMAT_ABGR4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
- { .format = DRM_FORMAT_RGBA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
- { .format = DRM_FORMAT_BGRA4444, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XRGB1555,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XBGR1555,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBX5551,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRX5551,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ARGB1555,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ABGR1555,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBA5551,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRA5551,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGB565,ÂÂÂÂÂÂÂÂÂ .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGR565,ÂÂÂÂÂÂÂÂÂ .depth = 16, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGB888,ÂÂÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGR888,ÂÂÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XRGB8888,ÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XBGR8888,ÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBX8888,ÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRX8888,ÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGB565_A8,ÂÂÂÂÂÂ .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGR565_A8,ÂÂÂÂÂÂ .depth = 24, .num_planes = 2, .cpp = { 2, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XRGB2101010,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XBGR2101010,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBX1010102,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRX1010102,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ARGB2101010,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ABGR2101010,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBA1010102,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRA1010102,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ARGB8888,ÂÂÂÂÂÂÂ .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ABGR8888,ÂÂÂÂÂÂÂ .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBA8888,ÂÂÂÂÂÂÂ .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRA8888,ÂÂÂÂÂÂÂ .depth = 32, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
- { .format = DRM_FORMAT_XRGB16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 },
- { .format = DRM_FORMAT_XBGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 },
- { .format = DRM_FORMAT_ARGB16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
- { .format = DRM_FORMAT_ABGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGB888_A8,ÂÂÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGR888_A8,ÂÂÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 3, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XRGB8888_A8,ÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XBGR8888_A8,ÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBX8888_A8,ÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRX8888_A8,ÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 4, 1, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
- { .format = DRM_FORMAT_YUV410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub = 4, .is_yuv = true },
- { .format = DRM_FORMAT_YVU410, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub = 4, .is_yuv = true },
- { .format = DRM_FORMAT_YUV411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_YVU411, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 4, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_YUV420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub = 2, .is_yuv = true },
- { .format = DRM_FORMAT_YVU420, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub = 2, .is_yuv = true },
- { .format = DRM_FORMAT_YUV422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_YVU422, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_YUV444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 1, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_YVU444, .depth = 0, .num_planes = 3, .cpp = { 1, 1, 1 }, .hsub = 1, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_NV12, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true },
- { .format = DRM_FORMAT_NV21, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true },
- { .format = DRM_FORMAT_NV16, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_NV61, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_NV24, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_NV42, .depth = 0, .num_planes = 2, .cpp = { 1, 2, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_YUYV, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_YVYU, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_XYUV8888, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_VUY888, .depth = 0, .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true },
- { .format = DRM_FORMAT_Y210, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_Y212, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_Y216, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_Y410, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true },
- { .format = DRM_FORMAT_Y412, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true },
- { .format = DRM_FORMAT_Y416, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true },
- { .format = DRM_FORMAT_XVYU2101010, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_XVYU12_16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
- { .format = DRM_FORMAT_XVYU16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_C8, .depth = 8, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 },
+ { .format = DRM_FORMAT_RGB332, .depth = 8, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 },
+ { .format = DRM_FORMAT_BGR233, .depth = 8, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 },
+ { .format = DRM_FORMAT_XRGB4444, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ { .format = DRM_FORMAT_XBGR4444, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ { .format = DRM_FORMAT_RGBX4444, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ { .format = DRM_FORMAT_BGRX4444, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ { .format = DRM_FORMAT_ARGB4444, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ { .format = DRM_FORMAT_ABGR4444, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ { .format = DRM_FORMAT_RGBA4444, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ { .format = DRM_FORMAT_BGRA4444, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XRGB1555,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XBGR1555,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBX5551,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRX5551,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ARGB1555,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ABGR1555,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBA5551,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRA5551,ÂÂÂÂÂÂÂ .depth = 15, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGB565,ÂÂÂÂÂÂÂÂÂ .depth = 16, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGR565,ÂÂÂÂÂÂÂÂÂ .depth = 16, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGB888,ÂÂÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 24, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGR888,ÂÂÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 24, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XRGB8888,ÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XBGR8888,ÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBX8888,ÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRX8888,ÂÂÂÂÂÂÂ .depth = 24, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGB565_A8,ÂÂÂÂÂÂ .depth = 24, .num_planes = 2, .cpp = { 16, 8, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGR565_A8,ÂÂÂÂÂÂ .depth = 24, .num_planes = 2, .cpp = { 16, 8, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XRGB2101010,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XBGR2101010,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBX1010102,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRX1010102,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1 },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ARGB2101010,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ABGR2101010,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBA1010102,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRA1010102,ÂÂÂÂ .depth = 30, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ARGB8888,ÂÂÂÂÂÂÂ .depth = 32, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_ABGR8888,ÂÂÂÂÂÂÂ .depth = 32, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBA8888,ÂÂÂÂÂÂÂ .depth = 32, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRA8888,ÂÂÂÂÂÂÂ .depth = 32, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ { .format = DRM_FORMAT_XRGB16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 },
+ { .format = DRM_FORMAT_XBGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1 },
+ { .format = DRM_FORMAT_ARGB16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ { .format = DRM_FORMAT_ABGR16161616F, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGB888_A8,ÂÂÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 24, 8, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGR888_A8,ÂÂÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 24, 8, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XRGB8888_A8,ÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 32, 8, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_XBGR8888_A8,ÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 32, 8, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_RGBX8888_A8,ÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 32, 8, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ { .format = DRM_FORMAT_BGRX8888_A8,ÂÂÂÂ .depth = 32, .num_planes = 2, .cpp = { 32, 8, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true },
+ { .format = DRM_FORMAT_YUV410, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 4, .vsub = 4, .is_yuv = true },
+ { .format = DRM_FORMAT_YVU410, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 4, .vsub = 4, .is_yuv = true },
+ { .format = DRM_FORMAT_YUV411, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 4, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_YVU411, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 4, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_YUV420, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 2, .vsub = 2, .is_yuv = true },
+ { .format = DRM_FORMAT_YVU420, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 2, .vsub = 2, .is_yuv = true },
+ { .format = DRM_FORMAT_YUV422, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_YVU422, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_YUV444, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_YVU444, .depth = 0, .num_planes = 3, .cpp = { 8, 8, 8 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_NV12, .depth = 0, .num_planes = 2, .cpp = { 8, 16, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true },
+ { .format = DRM_FORMAT_NV21, .depth = 0, .num_planes = 2, .cpp = { 8, 16, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true },
+ { .format = DRM_FORMAT_NV16, .depth = 0, .num_planes = 2, .cpp = { 8, 16, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_NV61, .depth = 0, .num_planes = 2, .cpp = { 8, 16, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_NV24, .depth = 0, .num_planes = 2, .cpp = { 8, 16, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_NV42, .depth = 0, .num_planes = 2, .cpp = { 8, 16, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_NV12_10, .depth = 0, .num_planes = 2, .cpp = { 10, 20, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true },
+ { .format = DRM_FORMAT_NV21_10, .depth = 0, .num_planes = 2, .cpp = { 10, 20, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true },
+ { .format = DRM_FORMAT_NV16_10, .depth = 0, .num_planes = 2, .cpp = { 10, 20, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_NV61_10, .depth = 0, .num_planes = 2, .cpp = { 10, 20, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_NV24_10, .depth = 0, .num_planes = 2, .cpp = { 10, 20, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_NV42_10, .depth = 0, .num_planes = 2, .cpp = { 10, 20, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_YUYV, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_YVYU, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 16, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_XYUV8888, .depth = 0, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_VUY888, .depth = 0, .num_planes = 1, .cpp = { 24, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true },
+ { .format = DRM_FORMAT_Y210, .depth = 0, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_Y212, .depth = 0, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_Y216, .depth = 0, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_Y410, .depth = 0, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true },
+ { .format = DRM_FORMAT_Y412, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true },
+ { .format = DRM_FORMAT_Y416, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, .is_yuv = true },
+ { .format = DRM_FORMAT_XVYU2101010, .depth = 0, .num_planes = 1, .cpp = { 32, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_XVYU12_16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+ { .format = DRM_FORMAT_XVYU16161616, .depth = 0, .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
 { .format = DRM_FORMAT_Y0L0, .depth = 0, .num_planes = 1,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ .char_per_block = { 8, 0, 0 }, .block_w = { 2, 0, 0 }, .block_h = { 2, 0, 0 },
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ .hsub = 2, .vsub = 2, .has_alpha = true, .is_yuv = true },
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 0b72468..7b29e97 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -530,7 +530,7 @@ int drm_mode_getfb(struct drm_device *dev,
ÂÂÂÂÂÂÂÂ r->height = fb->height;
ÂÂÂÂÂÂÂÂ r->width = fb->width;
ÂÂÂÂÂÂÂÂ r->depth = fb->format->depth;
-ÂÂÂÂÂÂ r->bpp = fb->format->cpp[0] * 8;
+ÂÂÂÂÂÂ r->bpp = fb->format->bpp[0];
ÂÂÂÂÂÂÂÂ r->pitch = fb->pitches[0];
ÂÂÂÂÂÂÂÂ /* GET_FB() is an unprivileged ioctl so we must not return a
diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
index 306d1ef..021358d 100644
--- a/include/drm/drm_fourcc.h
+++ b/include/drm/drm_fourcc.h
@@ -73,12 +73,12 @@ struct drm_format_info {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ /**
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * @cpp:
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ *
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * Number of bytes per pixel (per plane), this is aliased with
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * Number of bits per pixel (per plane), this is aliased with
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * @char_per_block. It is deprecated in favour of using the
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * triplet @char_per_block, @block_w, @block_h for better
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * describing the pixel format.
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ */
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ u8 cpp[3];
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ u8 bpp[3];
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ /**
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * @char_per_block:
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index 3feeaa3..5fe89e9 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -266,6 +266,21 @@ extern "C" {
 #define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */
 /*
+ * 2 plane YCbCr 10bit
+ * index 0 = Y plane, [9:0] Y
+ * index 1 = Cr:Cb plane, [19:0] Cr:Cb little endian
+ * or
+ * index 1 = Cb:Cr plane, [19:0] Cb:Cr little endian
+ */
+
+#define DRM_FORMAT_NV12_10ÂÂÂÂ fourcc_code('N', 'A', '1', '2') /* 2x2 subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV21_10ÂÂÂÂ fourcc_code('N', 'A', '2', '1') /* 2x2 subsampled Cb:Cr plane */
+#define DRM_FORMAT_NV16_10ÂÂÂÂ fourcc_code('N', 'A', '1', '6') /* 2x1 subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV61_10ÂÂÂÂ fourcc_code('N', 'A', '6', '1') /* 2x1 subsampled Cb:Cr plane */
+#define DRM_FORMAT_NV24_10ÂÂÂÂ fourcc_code('N', 'A', '2', '4') /* non-subsampled Cr:Cb plane */
+#define DRM_FORMAT_NV42_10ÂÂÂÂ fourcc_code('N', 'A', '4', '2') /* non-subsampled Cb:Cr plane */
+
+/*
ÂÂ * 3 plane YCbCr
ÂÂ * index 0: Y plane, [7:0] Y
ÂÂ * index 1: Cb plane, [7:0] Cb
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel