Message ID | 20200922165813.19378-3-dafna.hirschfeld@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add format MEDIA_BUS_FMT_METADATA_FIXED and use it in rkisp1 | expand |
On 9/22/20 1:58 PM, Dafna Hirschfeld wrote: > Set the code of the metadata pads of the isp entity to > MEDIA_BUS_FMT_METADATA_FIXED and set the width and > height of their formats to 0. This solves the TODO > item: > "Fix pad format size for statistics and parameters entities." > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Acked-by: Helen Koike <helen.koike@collabora.com> Thanks Helen > --- > drivers/staging/media/rkisp1/TODO | 1 - > drivers/staging/media/rkisp1/rkisp1-isp.c | 8 ++++---- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/media/rkisp1/TODO b/drivers/staging/media/rkisp1/TODO > index f0c90d1c86a8..f4a94eca6d31 100644 > --- a/drivers/staging/media/rkisp1/TODO > +++ b/drivers/staging/media/rkisp1/TODO > @@ -1,4 +1,3 @@ > -* Fix pad format size for statistics and parameters entities. > * Fix checkpatch errors. > * Review and comment every lock > * Handle quantization > diff --git a/drivers/staging/media/rkisp1/rkisp1-isp.c b/drivers/staging/media/rkisp1/rkisp1-isp.c > index 02eafea92863..a6c0f1eb0c5a 100644 > --- a/drivers/staging/media/rkisp1/rkisp1-isp.c > +++ b/drivers/staging/media/rkisp1/rkisp1-isp.c > @@ -574,7 +574,7 @@ static int rkisp1_isp_enum_mbus_code(struct v4l2_subdev *sd, > } else { > if (code->index > 0) > return -EINVAL; > - code->code = MEDIA_BUS_FMT_FIXED; > + code->code = MEDIA_BUS_FMT_METADATA_FIXED; > return 0; > } > > @@ -630,10 +630,10 @@ static int rkisp1_isp_init_config(struct v4l2_subdev *sd, > RKISP1_ISP_PAD_SINK_PARAMS); > src_fmt = v4l2_subdev_get_try_format(sd, cfg, > RKISP1_ISP_PAD_SOURCE_STATS); > - sink_fmt->width = RKISP1_DEFAULT_WIDTH; > - sink_fmt->height = RKISP1_DEFAULT_HEIGHT; > + sink_fmt->width = 0; > + sink_fmt->height = 0; > sink_fmt->field = V4L2_FIELD_NONE; > - sink_fmt->code = MEDIA_BUS_FMT_FIXED; > + sink_fmt->code = MEDIA_BUS_FMT_METADATA_FIXED; > *src_fmt = *sink_fmt; > > return 0; >
diff --git a/drivers/staging/media/rkisp1/TODO b/drivers/staging/media/rkisp1/TODO index f0c90d1c86a8..f4a94eca6d31 100644 --- a/drivers/staging/media/rkisp1/TODO +++ b/drivers/staging/media/rkisp1/TODO @@ -1,4 +1,3 @@ -* Fix pad format size for statistics and parameters entities. * Fix checkpatch errors. * Review and comment every lock * Handle quantization diff --git a/drivers/staging/media/rkisp1/rkisp1-isp.c b/drivers/staging/media/rkisp1/rkisp1-isp.c index 02eafea92863..a6c0f1eb0c5a 100644 --- a/drivers/staging/media/rkisp1/rkisp1-isp.c +++ b/drivers/staging/media/rkisp1/rkisp1-isp.c @@ -574,7 +574,7 @@ static int rkisp1_isp_enum_mbus_code(struct v4l2_subdev *sd, } else { if (code->index > 0) return -EINVAL; - code->code = MEDIA_BUS_FMT_FIXED; + code->code = MEDIA_BUS_FMT_METADATA_FIXED; return 0; } @@ -630,10 +630,10 @@ static int rkisp1_isp_init_config(struct v4l2_subdev *sd, RKISP1_ISP_PAD_SINK_PARAMS); src_fmt = v4l2_subdev_get_try_format(sd, cfg, RKISP1_ISP_PAD_SOURCE_STATS); - sink_fmt->width = RKISP1_DEFAULT_WIDTH; - sink_fmt->height = RKISP1_DEFAULT_HEIGHT; + sink_fmt->width = 0; + sink_fmt->height = 0; sink_fmt->field = V4L2_FIELD_NONE; - sink_fmt->code = MEDIA_BUS_FMT_FIXED; + sink_fmt->code = MEDIA_BUS_FMT_METADATA_FIXED; *src_fmt = *sink_fmt; return 0;
Set the code of the metadata pads of the isp entity to MEDIA_BUS_FMT_METADATA_FIXED and set the width and height of their formats to 0. This solves the TODO item: "Fix pad format size for statistics and parameters entities." Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> --- drivers/staging/media/rkisp1/TODO | 1 - drivers/staging/media/rkisp1/rkisp1-isp.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-)