From 38a833c7fd75dbbf97a5df25e1e04159693c2b1e Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Wed, 17 Sep 2014 02:54:37 -0300 Subject: [media] smiapp: Gather information on valid link rate and BPP combinations Not all link rates are possible with all BPP values. Also rearrange other initialisation a little. Obtaining possible PLL configurations earlier requires that. Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/smiapp/smiapp.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/media/i2c/smiapp/smiapp.h') diff --git a/drivers/media/i2c/smiapp/smiapp.h b/drivers/media/i2c/smiapp/smiapp.h index 874b49ffd88f..f88f8ec344d3 100644 --- a/drivers/media/i2c/smiapp/smiapp.h +++ b/drivers/media/i2c/smiapp/smiapp.h @@ -156,6 +156,11 @@ struct smiapp_csi_data_format { #define SMIAPP_PAD_SRC 1 #define SMIAPP_PADS 2 +#define SMIAPP_COMPRESSED_BASE 8 +#define SMIAPP_COMPRESSED_MAX 12 +#define SMIAPP_NR_OF_COMPRESSED (SMIAPP_COMPRESSED_MAX - \ + SMIAPP_COMPRESSED_BASE + 1) + struct smiapp_binning_subtype { u8 horizontal:4; u8 vertical:4; @@ -232,6 +237,9 @@ struct smiapp_sensor { struct smiapp_pll pll; + /* Is a default format supported for a given BPP? */ + unsigned long valid_link_freqs[SMIAPP_NR_OF_COMPRESSED]; + /* Pixel array controls */ struct v4l2_ctrl *analog_gain; struct v4l2_ctrl *exposure; -- cgit