@@ -201,8 +201,7 @@ static const struct imx_media_pixfmt pixel_formats[] = {
static const struct imx_media_pixfmt *find_format(u32 fourcc,
u32 code,
- enum imx_pixfmt_sel fmt_sel,
- bool allow_non_mbus)
+ enum imx_pixfmt_sel fmt_sel)
{
bool sel_ipu = fmt_sel & PIXFMT_SEL_IPU;
unsigned int i;
@@ -221,8 +220,7 @@ static const struct imx_media_pixfmt *find_format(u32 fourcc,
((fmt->cs == IPUV3_COLORSPACE_YUV) ?
PIXFMT_SEL_YUV : PIXFMT_SEL_RGB);
- if (!(fmt_sel & sel) ||
- (!allow_non_mbus && !fmt->codes))
+ if (!(fmt_sel & sel) || (!fourcc && !fmt->codes))
continue;
if (fourcc && fmt->fourcc == fourcc)
@@ -241,8 +239,7 @@ static const struct imx_media_pixfmt *find_format(u32 fourcc,
}
static int enum_format(u32 *fourcc, u32 *code, u32 index,
- enum imx_pixfmt_sel fmt_sel,
- bool allow_non_mbus)
+ enum imx_pixfmt_sel fmt_sel)
{
bool sel_ipu = fmt_sel & PIXFMT_SEL_IPU;
unsigned int i;
@@ -261,8 +258,7 @@ static int enum_format(u32 *fourcc, u32 *code, u32 index,
((fmt->cs == IPUV3_COLORSPACE_YUV) ?
PIXFMT_SEL_YUV : PIXFMT_SEL_RGB);
- if (!(fmt_sel & sel) ||
- (!allow_non_mbus && !fmt->codes))
+ if (!(fmt_sel & sel) || (!fourcc && !fmt->codes))
continue;
if (fourcc && index == 0) {
@@ -291,41 +287,41 @@ static int enum_format(u32 *fourcc, u32 *code, u32 index,
const struct imx_media_pixfmt *
imx_media_find_format(u32 fourcc, enum imx_pixfmt_sel fmt_sel)
{
- return find_format(fourcc, 0, fmt_sel, true);
+ return find_format(fourcc, 0, fmt_sel);
}
EXPORT_SYMBOL_GPL(imx_media_find_format);
int imx_media_enum_format(u32 *fourcc, u32 index, enum imx_pixfmt_sel fmt_sel)
{
- return enum_format(fourcc, NULL, index, fmt_sel, true);
+ return enum_format(fourcc, NULL, index, fmt_sel);
}
EXPORT_SYMBOL_GPL(imx_media_enum_format);
const struct imx_media_pixfmt *
imx_media_find_mbus_format(u32 code, enum imx_pixfmt_sel fmt_sel)
{
- return find_format(0, code, fmt_sel, false);
+ return find_format(0, code, fmt_sel);
}
EXPORT_SYMBOL_GPL(imx_media_find_mbus_format);
int imx_media_enum_mbus_format(u32 *code, u32 index,
enum imx_pixfmt_sel fmt_sel)
{
- return enum_format(NULL, code, index, fmt_sel, false);
+ return enum_format(NULL, code, index, fmt_sel);
}
EXPORT_SYMBOL_GPL(imx_media_enum_mbus_format);
const struct imx_media_pixfmt *
imx_media_find_ipu_format(u32 code, enum imx_pixfmt_sel fmt_sel)
{
- return find_format(0, code, fmt_sel | PIXFMT_SEL_IPU, false);
+ return find_format(0, code, fmt_sel | PIXFMT_SEL_IPU);
}
EXPORT_SYMBOL_GPL(imx_media_find_ipu_format);
int imx_media_enum_ipu_format(u32 *code, u32 index,
enum imx_pixfmt_sel fmt_sel)
{
- return enum_format(NULL, code, index, fmt_sel | PIXFMT_SEL_IPU, false);
+ return enum_format(NULL, code, index, fmt_sel | PIXFMT_SEL_IPU);
}
EXPORT_SYMBOL_GPL(imx_media_enum_ipu_format);