Commit d23e12dc authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab

media: rcar-vin: Make use of V4L2_FIELD_IS_INTERLACED() macro

The V4L2_FIELD_IS_INTERLACED() can be used to make the code more
readable, use it.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent a0862a40
...@@ -557,16 +557,11 @@ static void rvin_crop_scale_comp_gen2(struct rvin_dev *vin) ...@@ -557,16 +557,11 @@ static void rvin_crop_scale_comp_gen2(struct rvin_dev *vin)
rvin_write(vin, 0, VNSPPOC_REG); rvin_write(vin, 0, VNSPPOC_REG);
rvin_write(vin, 0, VNSLPOC_REG); rvin_write(vin, 0, VNSLPOC_REG);
rvin_write(vin, vin->format.width - 1, VNEPPOC_REG); rvin_write(vin, vin->format.width - 1, VNEPPOC_REG);
switch (vin->format.field) {
case V4L2_FIELD_INTERLACED: if (V4L2_FIELD_IS_INTERLACED(vin->format.field))
case V4L2_FIELD_INTERLACED_TB:
case V4L2_FIELD_INTERLACED_BT:
rvin_write(vin, vin->format.height / 2 - 1, VNELPOC_REG); rvin_write(vin, vin->format.height / 2 - 1, VNELPOC_REG);
break; else
default:
rvin_write(vin, vin->format.height - 1, VNELPOC_REG); rvin_write(vin, vin->format.height - 1, VNELPOC_REG);
break;
}
vin_dbg(vin, vin_dbg(vin,
"Pre-Clip: %ux%u@%u:%u YS: %d XS: %d Post-Clip: %ux%u@%u:%u\n", "Pre-Clip: %ux%u@%u:%u YS: %d XS: %d Post-Clip: %ux%u@%u:%u\n",
......
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