Commit 51e8c97d authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

media: ti-vpe: cal: Rename struct cal_fmt to cal_format_info

The cal_fmt structure stores information about a format. Its name is
ambiguous, as it could be understood as storing a format. Furthermore,
instances of the structure are called 'fmt' through the code, which
leads to confusion with the 'format' variables. Rename the structure to
cal_format_info, and the corresponding 'fmt' variables to 'fmtinfo'.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarBenoit Parrot <bparrot@ti.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b496dc90
...@@ -667,7 +667,7 @@ static int cal_camerarx_sd_enum_frame_size(struct v4l2_subdev *sd, ...@@ -667,7 +667,7 @@ static int cal_camerarx_sd_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_frame_size_enum *fse) struct v4l2_subdev_frame_size_enum *fse)
{ {
struct cal_camerarx *phy = to_cal_camerarx(sd); struct cal_camerarx *phy = to_cal_camerarx(sd);
const struct cal_fmt *fmtinfo; const struct cal_format_info *fmtinfo;
if (fse->index > 0) if (fse->index > 0)
return -EINVAL; return -EINVAL;
...@@ -720,7 +720,7 @@ static int cal_camerarx_sd_set_fmt(struct v4l2_subdev *sd, ...@@ -720,7 +720,7 @@ static int cal_camerarx_sd_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_format *format) struct v4l2_subdev_format *format)
{ {
struct cal_camerarx *phy = to_cal_camerarx(sd); struct cal_camerarx *phy = to_cal_camerarx(sd);
const struct cal_fmt *fmtinfo; const struct cal_format_info *fmtinfo;
struct v4l2_mbus_framefmt *fmt; struct v4l2_mbus_framefmt *fmt;
unsigned int bpp; unsigned int bpp;
......
...@@ -45,31 +45,31 @@ static char *fourcc_to_str(u32 fmt) ...@@ -45,31 +45,31 @@ static char *fourcc_to_str(u32 fmt)
* ------------------------------------------------------------------ * ------------------------------------------------------------------
*/ */
static const struct cal_fmt *find_format_by_pix(struct cal_ctx *ctx, static const struct cal_format_info *find_format_by_pix(struct cal_ctx *ctx,
u32 pixelformat) u32 pixelformat)
{ {
const struct cal_fmt *fmt; const struct cal_format_info *fmtinfo;
unsigned int k; unsigned int k;
for (k = 0; k < ctx->num_active_fmt; k++) { for (k = 0; k < ctx->num_active_fmt; k++) {
fmt = ctx->active_fmt[k]; fmtinfo = ctx->active_fmt[k];
if (fmt->fourcc == pixelformat) if (fmtinfo->fourcc == pixelformat)
return fmt; return fmtinfo;
} }
return NULL; return NULL;
} }
static const struct cal_fmt *find_format_by_code(struct cal_ctx *ctx, static const struct cal_format_info *find_format_by_code(struct cal_ctx *ctx,
u32 code) u32 code)
{ {
const struct cal_fmt *fmt; const struct cal_format_info *fmtinfo;
unsigned int k; unsigned int k;
for (k = 0; k < ctx->num_active_fmt; k++) { for (k = 0; k < ctx->num_active_fmt; k++) {
fmt = ctx->active_fmt[k]; fmtinfo = ctx->active_fmt[k];
if (fmt->code == code) if (fmtinfo->code == code)
return fmt; return fmtinfo;
} }
return NULL; return NULL;
...@@ -92,14 +92,14 @@ static int cal_enum_fmt_vid_cap(struct file *file, void *priv, ...@@ -92,14 +92,14 @@ static int cal_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f) struct v4l2_fmtdesc *f)
{ {
struct cal_ctx *ctx = video_drvdata(file); struct cal_ctx *ctx = video_drvdata(file);
const struct cal_fmt *fmt; const struct cal_format_info *fmtinfo;
if (f->index >= ctx->num_active_fmt) if (f->index >= ctx->num_active_fmt)
return -EINVAL; return -EINVAL;
fmt = ctx->active_fmt[f->index]; fmtinfo = ctx->active_fmt[f->index];
f->pixelformat = fmt->fourcc; f->pixelformat = fmtinfo->fourcc;
f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
return 0; return 0;
} }
...@@ -148,12 +148,12 @@ static int __subdev_set_format(struct cal_ctx *ctx, ...@@ -148,12 +148,12 @@ static int __subdev_set_format(struct cal_ctx *ctx,
} }
static int cal_calc_format_size(struct cal_ctx *ctx, static int cal_calc_format_size(struct cal_ctx *ctx,
const struct cal_fmt *fmt, const struct cal_format_info *fmtinfo,
struct v4l2_format *f) struct v4l2_format *f)
{ {
u32 bpl, max_width; u32 bpl, max_width;
if (!fmt) { if (!fmtinfo) {
ctx_dbg(3, ctx, "No cal_fmt provided!\n"); ctx_dbg(3, ctx, "No cal_fmt provided!\n");
return -EINVAL; return -EINVAL;
} }
...@@ -163,12 +163,12 @@ static int cal_calc_format_size(struct cal_ctx *ctx, ...@@ -163,12 +163,12 @@ static int cal_calc_format_size(struct cal_ctx *ctx,
* We need to recalculate the actual maxi width depending on the * We need to recalculate the actual maxi width depending on the
* number of bytes per pixels required. * number of bytes per pixels required.
*/ */
max_width = CAL_MAX_WIDTH_BYTES / (ALIGN(fmt->bpp, 8) >> 3); max_width = CAL_MAX_WIDTH_BYTES / (ALIGN(fmtinfo->bpp, 8) >> 3);
v4l_bound_align_image(&f->fmt.pix.width, 48, max_width, 2, v4l_bound_align_image(&f->fmt.pix.width, 48, max_width, 2,
&f->fmt.pix.height, 32, CAL_MAX_HEIGHT_LINES, &f->fmt.pix.height, 32, CAL_MAX_HEIGHT_LINES,
0, 0); 0, 0);
bpl = (f->fmt.pix.width * ALIGN(fmt->bpp, 8)) >> 3; bpl = (f->fmt.pix.width * ALIGN(fmtinfo->bpp, 8)) >> 3;
f->fmt.pix.bytesperline = ALIGN(bpl, 16); f->fmt.pix.bytesperline = ALIGN(bpl, 16);
f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.sizeimage = f->fmt.pix.height *
...@@ -196,18 +196,18 @@ static int cal_try_fmt_vid_cap(struct file *file, void *priv, ...@@ -196,18 +196,18 @@ static int cal_try_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f) struct v4l2_format *f)
{ {
struct cal_ctx *ctx = video_drvdata(file); struct cal_ctx *ctx = video_drvdata(file);
const struct cal_fmt *fmt; const struct cal_format_info *fmtinfo;
struct v4l2_subdev_frame_size_enum fse; struct v4l2_subdev_frame_size_enum fse;
int ret, found; int ret, found;
fmt = find_format_by_pix(ctx, f->fmt.pix.pixelformat); fmtinfo = find_format_by_pix(ctx, f->fmt.pix.pixelformat);
if (!fmt) { if (!fmtinfo) {
ctx_dbg(3, ctx, "Fourcc format (0x%08x) not found.\n", ctx_dbg(3, ctx, "Fourcc format (0x%08x) not found.\n",
f->fmt.pix.pixelformat); f->fmt.pix.pixelformat);
/* Just get the first one enumerated */ /* Just get the first one enumerated */
fmt = ctx->active_fmt[0]; fmtinfo = ctx->active_fmt[0];
f->fmt.pix.pixelformat = fmt->fourcc; f->fmt.pix.pixelformat = fmtinfo->fourcc;
} }
f->fmt.pix.field = ctx->v_fmt.fmt.pix.field; f->fmt.pix.field = ctx->v_fmt.fmt.pix.field;
...@@ -216,7 +216,7 @@ static int cal_try_fmt_vid_cap(struct file *file, void *priv, ...@@ -216,7 +216,7 @@ static int cal_try_fmt_vid_cap(struct file *file, void *priv,
ret = 0; ret = 0;
found = false; found = false;
fse.pad = 0; fse.pad = 0;
fse.code = fmt->code; fse.code = fmtinfo->code;
fse.which = V4L2_SUBDEV_FORMAT_ACTIVE; fse.which = V4L2_SUBDEV_FORMAT_ACTIVE;
for (fse.index = 0; ; fse.index++) { for (fse.index = 0; ; fse.index++) {
ret = v4l2_subdev_call(ctx->phy->sensor, pad, enum_frame_size, ret = v4l2_subdev_call(ctx->phy->sensor, pad, enum_frame_size,
...@@ -248,7 +248,7 @@ static int cal_try_fmt_vid_cap(struct file *file, void *priv, ...@@ -248,7 +248,7 @@ static int cal_try_fmt_vid_cap(struct file *file, void *priv,
* updated properly during s_fmt * updated properly during s_fmt
*/ */
f->fmt.pix.colorspace = ctx->v_fmt.fmt.pix.colorspace; f->fmt.pix.colorspace = ctx->v_fmt.fmt.pix.colorspace;
return cal_calc_format_size(ctx, fmt, f); return cal_calc_format_size(ctx, fmtinfo, f);
} }
static int cal_s_fmt_vid_cap(struct file *file, void *priv, static int cal_s_fmt_vid_cap(struct file *file, void *priv,
...@@ -260,7 +260,7 @@ static int cal_s_fmt_vid_cap(struct file *file, void *priv, ...@@ -260,7 +260,7 @@ static int cal_s_fmt_vid_cap(struct file *file, void *priv,
.which = V4L2_SUBDEV_FORMAT_ACTIVE, .which = V4L2_SUBDEV_FORMAT_ACTIVE,
.pad = CAL_CAMERARX_PAD_SINK, .pad = CAL_CAMERARX_PAD_SINK,
}; };
const struct cal_fmt *fmt; const struct cal_format_info *fmtinfo;
int ret; int ret;
if (vb2_is_busy(q)) { if (vb2_is_busy(q)) {
...@@ -272,16 +272,16 @@ static int cal_s_fmt_vid_cap(struct file *file, void *priv, ...@@ -272,16 +272,16 @@ static int cal_s_fmt_vid_cap(struct file *file, void *priv,
if (ret < 0) if (ret < 0)
return ret; return ret;
fmt = find_format_by_pix(ctx, f->fmt.pix.pixelformat); fmtinfo = find_format_by_pix(ctx, f->fmt.pix.pixelformat);
v4l2_fill_mbus_format(&sd_fmt.format, &f->fmt.pix, fmt->code); v4l2_fill_mbus_format(&sd_fmt.format, &f->fmt.pix, fmtinfo->code);
ret = __subdev_set_format(ctx, &sd_fmt.format); ret = __subdev_set_format(ctx, &sd_fmt.format);
if (ret) if (ret)
return ret; return ret;
/* Just double check nothing has gone wrong */ /* Just double check nothing has gone wrong */
if (sd_fmt.format.code != fmt->code) { if (sd_fmt.format.code != fmtinfo->code) {
ctx_dbg(3, ctx, ctx_dbg(3, ctx,
"%s subdev changed format on us, this should not happen\n", "%s subdev changed format on us, this should not happen\n",
__func__); __func__);
...@@ -290,13 +290,13 @@ static int cal_s_fmt_vid_cap(struct file *file, void *priv, ...@@ -290,13 +290,13 @@ static int cal_s_fmt_vid_cap(struct file *file, void *priv,
v4l2_fill_pix_format(&ctx->v_fmt.fmt.pix, &sd_fmt.format); v4l2_fill_pix_format(&ctx->v_fmt.fmt.pix, &sd_fmt.format);
ctx->v_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ctx->v_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
ctx->v_fmt.fmt.pix.pixelformat = fmt->fourcc; ctx->v_fmt.fmt.pix.pixelformat = fmtinfo->fourcc;
ctx->v_fmt.fmt.pix.field = sd_fmt.format.field; ctx->v_fmt.fmt.pix.field = sd_fmt.format.field;
cal_calc_format_size(ctx, fmt, &ctx->v_fmt); cal_calc_format_size(ctx, fmtinfo, &ctx->v_fmt);
v4l2_subdev_call(&ctx->phy->subdev, pad, set_fmt, NULL, &sd_fmt); v4l2_subdev_call(&ctx->phy->subdev, pad, set_fmt, NULL, &sd_fmt);
ctx->fmt = fmt; ctx->fmtinfo = fmtinfo;
*f = ctx->v_fmt; *f = ctx->v_fmt;
return 0; return 0;
...@@ -306,13 +306,13 @@ static int cal_enum_framesizes(struct file *file, void *fh, ...@@ -306,13 +306,13 @@ static int cal_enum_framesizes(struct file *file, void *fh,
struct v4l2_frmsizeenum *fsize) struct v4l2_frmsizeenum *fsize)
{ {
struct cal_ctx *ctx = video_drvdata(file); struct cal_ctx *ctx = video_drvdata(file);
const struct cal_fmt *fmt; const struct cal_format_info *fmtinfo;
struct v4l2_subdev_frame_size_enum fse; struct v4l2_subdev_frame_size_enum fse;
int ret; int ret;
/* check for valid format */ /* check for valid format */
fmt = find_format_by_pix(ctx, fsize->pixel_format); fmtinfo = find_format_by_pix(ctx, fsize->pixel_format);
if (!fmt) { if (!fmtinfo) {
ctx_dbg(3, ctx, "Invalid pixel code: %x\n", ctx_dbg(3, ctx, "Invalid pixel code: %x\n",
fsize->pixel_format); fsize->pixel_format);
return -EINVAL; return -EINVAL;
...@@ -320,7 +320,7 @@ static int cal_enum_framesizes(struct file *file, void *fh, ...@@ -320,7 +320,7 @@ static int cal_enum_framesizes(struct file *file, void *fh,
fse.index = fsize->index; fse.index = fsize->index;
fse.pad = 0; fse.pad = 0;
fse.code = fmt->code; fse.code = fmtinfo->code;
fse.which = V4L2_SUBDEV_FORMAT_ACTIVE; fse.which = V4L2_SUBDEV_FORMAT_ACTIVE;
ret = v4l2_subdev_call(ctx->phy->sensor, pad, enum_frame_size, NULL, ret = v4l2_subdev_call(ctx->phy->sensor, pad, enum_frame_size, NULL,
...@@ -366,7 +366,7 @@ static int cal_enum_frameintervals(struct file *file, void *priv, ...@@ -366,7 +366,7 @@ static int cal_enum_frameintervals(struct file *file, void *priv,
struct v4l2_frmivalenum *fival) struct v4l2_frmivalenum *fival)
{ {
struct cal_ctx *ctx = video_drvdata(file); struct cal_ctx *ctx = video_drvdata(file);
const struct cal_fmt *fmt; const struct cal_format_info *fmtinfo;
struct v4l2_subdev_frame_interval_enum fie = { struct v4l2_subdev_frame_interval_enum fie = {
.index = fival->index, .index = fival->index,
.width = fival->width, .width = fival->width,
...@@ -375,11 +375,11 @@ static int cal_enum_frameintervals(struct file *file, void *priv, ...@@ -375,11 +375,11 @@ static int cal_enum_frameintervals(struct file *file, void *priv,
}; };
int ret; int ret;
fmt = find_format_by_pix(ctx, fival->pixel_format); fmtinfo = find_format_by_pix(ctx, fival->pixel_format);
if (!fmt) if (!fmtinfo)
return -EINVAL; return -EINVAL;
fie.code = fmt->code; fie.code = fmtinfo->code;
ret = v4l2_subdev_call(ctx->phy->sensor, pad, enum_frame_interval, ret = v4l2_subdev_call(ctx->phy->sensor, pad, enum_frame_interval,
NULL, &fie); NULL, &fie);
if (ret) if (ret)
...@@ -623,7 +623,7 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx) ...@@ -623,7 +623,7 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx)
{ {
struct v4l2_subdev_mbus_code_enum mbus_code; struct v4l2_subdev_mbus_code_enum mbus_code;
struct v4l2_mbus_framefmt mbus_fmt; struct v4l2_mbus_framefmt mbus_fmt;
const struct cal_fmt *fmt; const struct cal_format_info *fmtinfo;
unsigned int i, j, k; unsigned int i, j, k;
int ret = 0; int ret = 0;
...@@ -647,14 +647,14 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx) ...@@ -647,14 +647,14 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx)
ctx->phy->sensor->name, mbus_code.code, j); ctx->phy->sensor->name, mbus_code.code, j);
for (k = 0; k < cal_num_formats; k++) { for (k = 0; k < cal_num_formats; k++) {
const struct cal_fmt *fmt = &cal_formats[k]; fmtinfo = &cal_formats[k];
if (mbus_code.code == fmt->code) { if (mbus_code.code == fmtinfo->code) {
ctx->active_fmt[i] = fmt; ctx->active_fmt[i] = fmtinfo;
ctx_dbg(2, ctx, ctx_dbg(2, ctx,
"matched fourcc: %s: code: %04x idx: %u\n", "matched fourcc: %s: code: %04x idx: %u\n",
fourcc_to_str(fmt->fourcc), fourcc_to_str(fmtinfo->fourcc),
fmt->code, i); fmtinfo->code, i);
ctx->num_active_fmt = ++i; ctx->num_active_fmt = ++i;
} }
} }
...@@ -670,8 +670,8 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx) ...@@ -670,8 +670,8 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx)
if (ret) if (ret)
return ret; return ret;
fmt = find_format_by_code(ctx, mbus_fmt.code); fmtinfo = find_format_by_code(ctx, mbus_fmt.code);
if (!fmt) { if (!fmtinfo) {
ctx_dbg(3, ctx, "mbus code format (0x%08x) not found.\n", ctx_dbg(3, ctx, "mbus code format (0x%08x) not found.\n",
mbus_fmt.code); mbus_fmt.code);
return -EINVAL; return -EINVAL;
...@@ -680,10 +680,10 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx) ...@@ -680,10 +680,10 @@ static int cal_ctx_v4l2_init_formats(struct cal_ctx *ctx)
/* Save current format */ /* Save current format */
v4l2_fill_pix_format(&ctx->v_fmt.fmt.pix, &mbus_fmt); v4l2_fill_pix_format(&ctx->v_fmt.fmt.pix, &mbus_fmt);
ctx->v_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ctx->v_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
ctx->v_fmt.fmt.pix.pixelformat = fmt->fourcc; ctx->v_fmt.fmt.pix.pixelformat = fmtinfo->fourcc;
ctx->v_fmt.fmt.pix.field = mbus_fmt.field; ctx->v_fmt.fmt.pix.field = mbus_fmt.field;
cal_calc_format_size(ctx, fmt, &ctx->v_fmt); cal_calc_format_size(ctx, fmtinfo, &ctx->v_fmt);
ctx->fmt = fmt; ctx->fmtinfo = fmtinfo;
return 0; return 0;
} }
......
...@@ -48,7 +48,7 @@ MODULE_PARM_DESC(debug, "activates debug info"); ...@@ -48,7 +48,7 @@ MODULE_PARM_DESC(debug, "activates debug info");
* ------------------------------------------------------------------ * ------------------------------------------------------------------
*/ */
const struct cal_fmt cal_formats[] = { const struct cal_format_info cal_formats[] = {
{ {
.fourcc = V4L2_PIX_FMT_YUYV, .fourcc = V4L2_PIX_FMT_YUYV,
.code = MEDIA_BUS_FMT_YUYV8_2X8, .code = MEDIA_BUS_FMT_YUYV8_2X8,
...@@ -146,7 +146,7 @@ const struct cal_fmt cal_formats[] = { ...@@ -146,7 +146,7 @@ const struct cal_fmt cal_formats[] = {
const unsigned int cal_num_formats = ARRAY_SIZE(cal_formats); const unsigned int cal_num_formats = ARRAY_SIZE(cal_formats);
const struct cal_fmt *cal_format_by_fourcc(u32 fourcc) const struct cal_format_info *cal_format_by_fourcc(u32 fourcc)
{ {
unsigned int i; unsigned int i;
...@@ -158,7 +158,7 @@ const struct cal_fmt *cal_format_by_fourcc(u32 fourcc) ...@@ -158,7 +158,7 @@ const struct cal_fmt *cal_format_by_fourcc(u32 fourcc)
return NULL; return NULL;
} }
const struct cal_fmt *cal_format_by_code(u32 code) const struct cal_format_info *cal_format_by_code(u32 code)
{ {
unsigned int i; unsigned int i;
...@@ -309,7 +309,7 @@ void cal_ctx_pix_proc_config(struct cal_ctx *ctx) ...@@ -309,7 +309,7 @@ void cal_ctx_pix_proc_config(struct cal_ctx *ctx)
{ {
u32 val, extract, pack; u32 val, extract, pack;
switch (ctx->fmt->bpp) { switch (ctx->fmtinfo->bpp) {
case 8: case 8:
extract = CAL_PIX_PROC_EXTRACT_B8; extract = CAL_PIX_PROC_EXTRACT_B8;
pack = CAL_PIX_PROC_PACK_B8; pack = CAL_PIX_PROC_PACK_B8;
...@@ -338,7 +338,7 @@ void cal_ctx_pix_proc_config(struct cal_ctx *ctx) ...@@ -338,7 +338,7 @@ void cal_ctx_pix_proc_config(struct cal_ctx *ctx)
*/ */
dev_warn_once(ctx->cal->dev, dev_warn_once(ctx->cal->dev,
"%s:%d:%s: bpp:%d unsupported! Overwritten with 8.\n", "%s:%d:%s: bpp:%d unsupported! Overwritten with 8.\n",
__FILE__, __LINE__, __func__, ctx->fmt->bpp); __FILE__, __LINE__, __func__, ctx->fmtinfo->bpp);
extract = CAL_PIX_PROC_EXTRACT_B8; extract = CAL_PIX_PROC_EXTRACT_B8;
pack = CAL_PIX_PROC_PACK_B8; pack = CAL_PIX_PROC_PACK_B8;
break; break;
......
...@@ -60,7 +60,7 @@ enum cal_camerarx_field { ...@@ -60,7 +60,7 @@ enum cal_camerarx_field {
F_MAX_FIELDS, F_MAX_FIELDS,
}; };
struct cal_fmt { struct cal_format_info {
u32 fourcc; u32 fourcc;
u32 code; u32 code;
/* Bits per pixel */ /* Bits per pixel */
...@@ -126,7 +126,7 @@ struct cal_camerarx { ...@@ -126,7 +126,7 @@ struct cal_camerarx {
struct v4l2_subdev subdev; struct v4l2_subdev subdev;
struct media_pad pads[2]; struct media_pad pads[2];
struct v4l2_mbus_framefmt formats[2]; struct v4l2_mbus_framefmt formats[2];
const struct cal_fmt *fmtinfo; const struct cal_format_info *fmtinfo;
}; };
struct cal_dev { struct cal_dev {
...@@ -172,12 +172,12 @@ struct cal_ctx { ...@@ -172,12 +172,12 @@ struct cal_ctx {
struct cal_dmaqueue vidq; struct cal_dmaqueue vidq;
/* video capture */ /* video capture */
const struct cal_fmt *fmt; const struct cal_format_info *fmtinfo;
/* Used to store current pixel format */ /* Used to store current pixel format */
struct v4l2_format v_fmt; struct v4l2_format v_fmt;
/* Current subdev enumerated format */ /* Current subdev enumerated format */
const struct cal_fmt **active_fmt; const struct cal_format_info **active_fmt;
unsigned int num_active_fmt; unsigned int num_active_fmt;
unsigned int sequence; unsigned int sequence;
...@@ -254,10 +254,10 @@ static inline void cal_set_field(u32 *valp, u32 field, u32 mask) ...@@ -254,10 +254,10 @@ static inline void cal_set_field(u32 *valp, u32 field, u32 mask)
*valp = val; *valp = val;
} }
extern const struct cal_fmt cal_formats[]; extern const struct cal_format_info cal_formats[];
extern const unsigned int cal_num_formats; extern const unsigned int cal_num_formats;
const struct cal_fmt *cal_format_by_fourcc(u32 fourcc); const struct cal_format_info *cal_format_by_fourcc(u32 fourcc);
const struct cal_fmt *cal_format_by_code(u32 code); const struct cal_format_info *cal_format_by_code(u32 code);
void cal_quickdump_regs(struct cal_dev *cal); void cal_quickdump_regs(struct cal_dev *cal);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment