aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/mt9m001.c6
-rw-r--r--drivers/media/video/mt9v022.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c
index 7618b3c2fce0..750ce60abac8 100644
--- a/drivers/media/video/mt9m001.c
+++ b/drivers/media/video/mt9m001.c
@@ -734,6 +734,12 @@ static int mt9m001_s_mbus_config(struct v4l2_subdev *sd,
734 struct i2c_client *client = v4l2_get_subdevdata(sd); 734 struct i2c_client *client = v4l2_get_subdevdata(sd);
735 struct soc_camera_device *icd = client->dev.platform_data; 735 struct soc_camera_device *icd = client->dev.platform_data;
736 struct soc_camera_link *icl = to_soc_camera_link(icd); 736 struct soc_camera_link *icl = to_soc_camera_link(icd);
737 /*
738 * Cannot use icd->current_fmt->host_fmt->bits_per_sample, because that
739 * is the number of bits, that the host has to sample, not the number of
740 * bits, that we have to send. See mx3_camera.c for an example of 10-bit
741 * formats being truncated to 8 bits by the host.
742 */
737 unsigned int bps = soc_mbus_get_fmtdesc(icd->current_fmt->code)->bits_per_sample; 743 unsigned int bps = soc_mbus_get_fmtdesc(icd->current_fmt->code)->bits_per_sample;
738 744
739 if (icl->set_bus_param) 745 if (icl->set_bus_param)
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c
index 2fc6ca22f31c..ddc11d0a6254 100644
--- a/drivers/media/video/mt9v022.c
+++ b/drivers/media/video/mt9v022.c
@@ -875,6 +875,12 @@ static int mt9v022_s_mbus_config(struct v4l2_subdev *sd,
875 struct soc_camera_link *icl = to_soc_camera_link(icd); 875 struct soc_camera_link *icl = to_soc_camera_link(icd);
876 struct mt9v022 *mt9v022 = to_mt9v022(client); 876 struct mt9v022 *mt9v022 = to_mt9v022(client);
877 unsigned long flags = soc_camera_apply_board_flags(icl, cfg); 877 unsigned long flags = soc_camera_apply_board_flags(icl, cfg);
878 /*
879 * Cannot use icd->current_fmt->host_fmt->bits_per_sample, because that
880 * is the number of bits, that the host has to sample, not the number of
881 * bits, that we have to send. See mx3_camera.c for an example of 10-bit
882 * formats being truncated to 8 bits by the host.
883 */
878 unsigned int bps = soc_mbus_get_fmtdesc(icd->current_fmt->code)->bits_per_sample; 884 unsigned int bps = soc_mbus_get_fmtdesc(icd->current_fmt->code)->bits_per_sample;
879 int ret; 885 int ret;
880 u16 pixclk = 0; 886 u16 pixclk = 0;