diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-06-20 12:07:08 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-04-15 04:36:03 +0300 |
commit | 3e9a0e0bfafdf6c28c520d43fd64c5775d04662f (patch) | |
tree | 80f6bed9a8978beefe863a4e3a0d0ad6bc33ee8a /drivers/media/platform/vsp1/vsp1_rwpf.c | |
parent | 99bb078eee469f7284b1dca36cf9edf7af1a92bf (diff) | |
download | linux-3e9a0e0bfafdf6c28c520d43fd64c5775d04662f.tar.xz |
[media] v4l: vsp1: wpf: Implement rotation support
Some WPF instances, on Gen3 devices, can perform 90° rotation when
writing frames to memory. Implement support for this using the
V4L2_CID_ROTATE control.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_rwpf.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_rwpf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.c b/drivers/media/platform/vsp1/vsp1_rwpf.c index 7d52c88a583e..cfd8f1904fa6 100644 --- a/drivers/media/platform/vsp1/vsp1_rwpf.c +++ b/drivers/media/platform/vsp1/vsp1_rwpf.c @@ -121,6 +121,11 @@ static int vsp1_rwpf_set_format(struct v4l2_subdev *subdev, RWPF_PAD_SOURCE); *format = fmt->format; + if (rwpf->flip.rotate) { + format->width = fmt->format.height; + format->height = fmt->format.width; + } + done: mutex_unlock(&rwpf->entity.lock); return ret; |