summaryrefslogtreecommitdiff
path: root/drivers/staging/media/imx/imx-media.h
diff options
context:
space:
mode:
authorSteve Longerbeam <slongerbeam@gmail.com>2020-04-06 19:39:00 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-21 14:17:57 +0300
commita7d5003cab01458941907815d169999f885ecec3 (patch)
tree1e01cf3e556a000497d7e90f519a85e97b62fbc1 /drivers/staging/media/imx/imx-media.h
parent3130c45c2ba357d0f495f178fc34b6b76c215596 (diff)
downloadlinux-a7d5003cab01458941907815d169999f885ecec3.tar.xz
media: imx: utils: Rename pixel format selection enumeration
After the introduction of the CS_SEL_BAYER flag, the "codespace" pixel format selection enumeration wording no longer makes sense (and even before, when selecting between YUV or RGB formats, "codespace" was a misuse of the term). Rename - 'enum codespace_sel' to 'enum imx_pixfmt_sel' - CS_SEL_* to PIXFMT_SEL_* - local vars named cs_sel to fmt_sel or just sel No functional changes. Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/imx/imx-media.h')
-rw-r--r--drivers/staging/media/imx/imx-media.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/staging/media/imx/imx-media.h b/drivers/staging/media/imx/imx-media.h
index 652673a703cd..ac7c521d8148 100644
--- a/drivers/staging/media/imx/imx-media.h
+++ b/drivers/staging/media/imx/imx-media.h
@@ -79,6 +79,14 @@ struct imx_media_pixfmt {
bool ipufmt; /* is one of the IPU internal formats */
};
+enum imx_pixfmt_sel {
+ PIXFMT_SEL_YUV = BIT(0), /* select YUV formats */
+ PIXFMT_SEL_RGB = BIT(1), /* select RGB formats */
+ PIXFMT_SEL_BAYER = BIT(2), /* select BAYER formats */
+ PIXFMT_SEL_YUV_RGB = PIXFMT_SEL_YUV | PIXFMT_SEL_RGB,
+ PIXFMT_SEL_ANY = PIXFMT_SEL_YUV | PIXFMT_SEL_RGB | PIXFMT_SEL_BAYER,
+};
+
struct imx_media_buffer {
struct vb2_v4l2_buffer vbuf; /* v4l buffer must be first */
struct list_head list;
@@ -149,24 +157,16 @@ struct imx_media_dev {
struct v4l2_subdev *sync_sd[2][NUM_IPU_SUBDEVS];
};
-enum codespace_sel {
- CS_SEL_YUV = BIT(0),
- CS_SEL_RGB = BIT(1),
- CS_SEL_BAYER = BIT(2),
- CS_SEL_YUV_RGB = CS_SEL_YUV | CS_SEL_RGB,
- CS_SEL_ANY = CS_SEL_YUV | CS_SEL_RGB | CS_SEL_BAYER,
-};
-
/* imx-media-utils.c */
const struct imx_media_pixfmt *
-imx_media_find_format(u32 fourcc, enum codespace_sel cs_sel);
-int imx_media_enum_format(u32 *fourcc, u32 index, enum codespace_sel cs_sel);
+imx_media_find_format(u32 fourcc, enum imx_pixfmt_sel sel);
+int imx_media_enum_format(u32 *fourcc, u32 index, enum imx_pixfmt_sel sel);
const struct imx_media_pixfmt *
-imx_media_find_mbus_format(u32 code, enum codespace_sel cs_sel);
-int imx_media_enum_mbus_format(u32 *code, u32 index, enum codespace_sel cs_sel);
+imx_media_find_mbus_format(u32 code, enum imx_pixfmt_sel sel);
+int imx_media_enum_mbus_format(u32 *code, u32 index, enum imx_pixfmt_sel sel);
const struct imx_media_pixfmt *
-imx_media_find_ipu_format(u32 code, enum codespace_sel cs_sel);
-int imx_media_enum_ipu_format(u32 *code, u32 index, enum codespace_sel cs_sel);
+imx_media_find_ipu_format(u32 code, enum imx_pixfmt_sel sel);
+int imx_media_enum_ipu_format(u32 *code, u32 index, enum imx_pixfmt_sel sel);
int imx_media_init_mbus_fmt(struct v4l2_mbus_framefmt *mbus,
u32 width, u32 height, u32 code, u32 field,
const struct imx_media_pixfmt **cc);