static const struct rvin_info rcar_info_h1 = {
.model = RCAR_H1,
+ .max_width = 2048,
+ .max_height = 2048,
};
static const struct rvin_info rcar_info_m1 = {
.model = RCAR_M1,
+ .max_width = 2048,
+ .max_height = 2048,
};
static const struct rvin_info rcar_info_gen2 = {
.model = RCAR_GEN2,
+ .max_width = 2048,
+ .max_height = 2048,
};
static const struct of_device_id rvin_of_id_table[] = {
#include "rcar-vin.h"
#define RVIN_DEFAULT_FORMAT V4L2_PIX_FMT_YUYV
-#define RVIN_MAX_WIDTH 2048
-#define RVIN_MAX_HEIGHT 2048
/* -----------------------------------------------------------------------------
* Format Conversions
walign = vin->format.pixelformat == V4L2_PIX_FMT_NV16 ? 5 : 1;
/* Limit to VIN capabilities */
- v4l_bound_align_image(&pix->width, 2, RVIN_MAX_WIDTH, walign,
- &pix->height, 4, RVIN_MAX_HEIGHT, 2, 0);
+ v4l_bound_align_image(&pix->width, 2, vin->info->max_width, walign,
+ &pix->height, 4, vin->info->max_height, 2, 0);
pix->bytesperline = max_t(u32, pix->bytesperline,
rvin_format_bytesperline(pix));
/**
* struct rvin_info - Information about the particular VIN implementation
* @model: VIN model
+ * @max_width: max input width the VIN supports
+ * @max_height: max input height the VIN supports
*/
struct rvin_info {
enum model_id model;
+
+ unsigned int max_width;
+ unsigned int max_height;
};
/**