mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
media: rockchip: isp: fix warn of v4l_enum_fmt
WARNING: CPU: 0 PID: 391 at drivers/media/v4l2-core/v4l2-ioctl.c:1476 v4l_enum_fmt+0x20c8/0x2114 Change-Id: I5343a5c727f3f57aa9f430dedc130cb409b4d022 Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -1177,6 +1177,35 @@ static int rkisp_enum_fmt_vid_cap_mplane(struct file *file, void *priv,
|
||||
|
||||
fmt = &stream->config->fmts[f->index];
|
||||
f->pixelformat = fmt->fourcc;
|
||||
switch (f->pixelformat) {
|
||||
case V4L2_PIX_FMT_FBC2:
|
||||
strscpy(f->description,
|
||||
"Rockchip yuv422sp fbc encoder",
|
||||
sizeof(f->description));
|
||||
break;
|
||||
case V4L2_PIX_FMT_FBC0:
|
||||
strscpy(f->description,
|
||||
"Rockchip yuv420sp fbc encoder",
|
||||
sizeof(f->description));
|
||||
break;
|
||||
case V4L2_PIX_FMT_FBCG:
|
||||
strscpy(f->description,
|
||||
"Rockchip fbc gain",
|
||||
sizeof(f->description));
|
||||
break;
|
||||
case V4l2_PIX_FMT_EBD8:
|
||||
strscpy(f->description,
|
||||
"Embedded data 8-bit",
|
||||
sizeof(f->description));
|
||||
break;
|
||||
case V4l2_PIX_FMT_SPD16:
|
||||
strscpy(f->description,
|
||||
"Shield pix data 16-bit",
|
||||
sizeof(f->description));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user