aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/media/platform/rcar-vin/rcar-v4l2.c
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2019-07-04 13:16:01 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-07-25 11:46:58 -0400
commit1d99e68ce7fd9b5f5ab01d72455e8acd699e49cc (patch)
treedc866044ea7e792fd5df015cd722997cc115a8b7 /drivers/media/platform/rcar-vin/rcar-v4l2.c
parentmedia: rcar-vin: Add control for alpha component (diff)
downloadwireguard-linux-1d99e68ce7fd9b5f5ab01d72455e8acd699e49cc.tar.xz
wireguard-linux-1d99e68ce7fd9b5f5ab01d72455e8acd699e49cc.zip
media: rcar-vin: Add support for RGB formats with alpha component
The R-Car VIN module supports V4L2_PIX_FMT_ARGB555 and V4L2_PIX_FMT_ABGR32 pixel formats. Add the hardware register setup and allow the alpha component to be changed while streaming using the V4L2_CID_ALPHA_COMPONENT control. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: fix checkpatch warning for macro VNDMR_A8BIT] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/rcar-vin/rcar-v4l2.c')
-rw-r--r--drivers/media/platform/rcar-vin/rcar-v4l2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
index 04d798d8070f..192390c784f7 100644
--- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
+++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
@@ -54,6 +54,14 @@ static const struct rvin_video_format rvin_formats[] = {
.fourcc = V4L2_PIX_FMT_XBGR32,
.bpp = 4,
},
+ {
+ .fourcc = V4L2_PIX_FMT_ARGB555,
+ .bpp = 2,
+ },
+ {
+ .fourcc = V4L2_PIX_FMT_ABGR32,
+ .bpp = 4,
+ },
};
const struct rvin_video_format *rvin_format_from_pixel(struct rvin_dev *vin,