diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-03-25 10:51:06 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-14 00:16:10 +0200 |
commit | 0d268dcc693a56efb009316d83e0d732cafb9f9c (patch) | |
tree | 976b0df5c2d3ed30f54eaf77be2a65a53e90daa1 | |
parent | [media] v4l: vsp1: Fix V4L2_PIX_FMT_XRGB444 format definition (diff) | |
download | linux-0d268dcc693a56efb009316d83e0d732cafb9f9c.tar.xz linux-0d268dcc693a56efb009316d83e0d732cafb9f9c.zip |
[media] v4l: vsp1: Update WPF and LIF maximum sizes for Gen3
The maximum image size supported by the WPF is 2048x2048 on Gen2 and
8190x8190 on Gen3. Update the code accordingly, and fix the maximum LIF
size for both Gen2 and Gen3.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_lif.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_wpf.c | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_lif.c b/drivers/media/platform/vsp1/vsp1_lif.c index 579e142b4e94..0217393f22df 100644 --- a/drivers/media/platform/vsp1/vsp1_lif.c +++ b/drivers/media/platform/vsp1/vsp1_lif.c @@ -21,7 +21,7 @@ #include "vsp1_lif.h" #define LIF_MIN_SIZE 2U -#define LIF_MAX_SIZE 2048U +#define LIF_MAX_SIZE 8190U /* ----------------------------------------------------------------------------- * Device Access diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c index ce1d0b4094db..6c91eaa35e75 100644 --- a/drivers/media/platform/vsp1/vsp1_wpf.c +++ b/drivers/media/platform/vsp1/vsp1_wpf.c @@ -21,8 +21,10 @@ #include "vsp1_rwpf.h" #include "vsp1_video.h" -#define WPF_MAX_WIDTH 2048 -#define WPF_MAX_HEIGHT 2048 +#define WPF_GEN2_MAX_WIDTH 2048U +#define WPF_GEN2_MAX_HEIGHT 2048U +#define WPF_GEN3_MAX_WIDTH 8190U +#define WPF_GEN3_MAX_HEIGHT 8190U /* ----------------------------------------------------------------------------- * Device Access @@ -201,8 +203,13 @@ struct vsp1_rwpf *vsp1_wpf_create(struct vsp1_device *vsp1, unsigned int index) if (wpf == NULL) return ERR_PTR(-ENOMEM); - wpf->max_width = WPF_MAX_WIDTH; - wpf->max_height = WPF_MAX_HEIGHT; + if (vsp1->info->gen == 2) { + wpf->max_width = WPF_GEN2_MAX_WIDTH; + wpf->max_height = WPF_GEN2_MAX_HEIGHT; + } else { + wpf->max_width = WPF_GEN3_MAX_WIDTH; + wpf->max_height = WPF_GEN3_MAX_HEIGHT; + } wpf->entity.ops = &wpf_entity_ops; wpf->entity.type = VSP1_ENTITY_WPF; |