[media] v4l: vsp1: Disable VYUY on Gen3

The VYUY format isn't supported on Gen3 hardware, disable it.

Gen2 hardware supports VYUY in practice even though the documentation
doesn't advertise it, so keep it for Gen2 devices.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
此提交包含在:
Laurent Pinchart
2016-09-15 16:08:09 -03:00
提交者 Mauro Carvalho Chehab
父節點 225c2926d8
當前提交 c9f49607f1
共有 4 個檔案被更改,包括 12 行新增5 行删除

查看文件

@@ -286,7 +286,7 @@ int vsp1_du_atomic_update(struct device *dev, unsigned int rpf_index,
/* Store the format, stride, memory buffer address, crop and compose
* rectangles and Z-order position and for the input.
*/
fmtinfo = vsp1_get_format_info(cfg->pixelformat);
fmtinfo = vsp1_get_format_info(vsp1, cfg->pixelformat);
if (!fmtinfo) {
dev_dbg(vsp1->dev, "Unsupport pixel format %08x for RPF\n",
cfg->pixelformat);

查看文件

@@ -138,15 +138,21 @@ static const struct vsp1_format_info vsp1_video_formats[] = {
/*
* vsp1_get_format_info - Retrieve format information for a 4CC
* @vsp1: the VSP1 device
* @fourcc: the format 4CC
*
* Return a pointer to the format information structure corresponding to the
* given V4L2 format 4CC, or NULL if no corresponding format can be found.
*/
const struct vsp1_format_info *vsp1_get_format_info(u32 fourcc)
const struct vsp1_format_info *vsp1_get_format_info(struct vsp1_device *vsp1,
u32 fourcc)
{
unsigned int i;
/* Special case, the VYUY format is supported on Gen2 only. */
if (vsp1->info->gen != 2 && fourcc == V4L2_PIX_FMT_VYUY)
return NULL;
for (i = 0; i < ARRAY_SIZE(vsp1_video_formats); ++i) {
const struct vsp1_format_info *info = &vsp1_video_formats[i];

查看文件

@@ -130,6 +130,7 @@ void vsp1_pipeline_propagate_alpha(struct vsp1_pipeline *pipe,
void vsp1_pipelines_suspend(struct vsp1_device *vsp1);
void vsp1_pipelines_resume(struct vsp1_device *vsp1);
const struct vsp1_format_info *vsp1_get_format_info(u32 fourcc);
const struct vsp1_format_info *vsp1_get_format_info(struct vsp1_device *vsp1,
u32 fourcc);
#endif /* __VSP1_PIPE_H__ */

查看文件

@@ -117,9 +117,9 @@ static int __vsp1_video_try_format(struct vsp1_video *video,
/* Retrieve format information and select the default format if the
* requested format isn't supported.
*/
info = vsp1_get_format_info(pix->pixelformat);
info = vsp1_get_format_info(video->vsp1, pix->pixelformat);
if (info == NULL)
info = vsp1_get_format_info(VSP1_VIDEO_DEF_FORMAT);
info = vsp1_get_format_info(video->vsp1, VSP1_VIDEO_DEF_FORMAT);
pix->pixelformat = info->fourcc;
pix->colorspace = V4L2_COLORSPACE_SRGB;