Commit 610eb5a4 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab

[media] V4L: mt9m001, mt9v022: add a clarifying comment

Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 579cea03
...@@ -734,6 +734,12 @@ static int mt9m001_s_mbus_config(struct v4l2_subdev *sd, ...@@ -734,6 +734,12 @@ static int mt9m001_s_mbus_config(struct v4l2_subdev *sd,
struct i2c_client *client = v4l2_get_subdevdata(sd); struct i2c_client *client = v4l2_get_subdevdata(sd);
struct soc_camera_device *icd = client->dev.platform_data; struct soc_camera_device *icd = client->dev.platform_data;
struct soc_camera_link *icl = to_soc_camera_link(icd); struct soc_camera_link *icl = to_soc_camera_link(icd);
/*
* Cannot use icd->current_fmt->host_fmt->bits_per_sample, because that
* is the number of bits, that the host has to sample, not the number of
* bits, that we have to send. See mx3_camera.c for an example of 10-bit
* formats being truncated to 8 bits by the host.
*/
unsigned int bps = soc_mbus_get_fmtdesc(icd->current_fmt->code)->bits_per_sample; unsigned int bps = soc_mbus_get_fmtdesc(icd->current_fmt->code)->bits_per_sample;
if (icl->set_bus_param) if (icl->set_bus_param)
......
...@@ -875,6 +875,12 @@ static int mt9v022_s_mbus_config(struct v4l2_subdev *sd, ...@@ -875,6 +875,12 @@ static int mt9v022_s_mbus_config(struct v4l2_subdev *sd,
struct soc_camera_link *icl = to_soc_camera_link(icd); struct soc_camera_link *icl = to_soc_camera_link(icd);
struct mt9v022 *mt9v022 = to_mt9v022(client); struct mt9v022 *mt9v022 = to_mt9v022(client);
unsigned long flags = soc_camera_apply_board_flags(icl, cfg); unsigned long flags = soc_camera_apply_board_flags(icl, cfg);
/*
* Cannot use icd->current_fmt->host_fmt->bits_per_sample, because that
* is the number of bits, that the host has to sample, not the number of
* bits, that we have to send. See mx3_camera.c for an example of 10-bit
* formats being truncated to 8 bits by the host.
*/
unsigned int bps = soc_mbus_get_fmtdesc(icd->current_fmt->code)->bits_per_sample; unsigned int bps = soc_mbus_get_fmtdesc(icd->current_fmt->code)->bits_per_sample;
int ret; int ret;
u16 pixclk = 0; u16 pixclk = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment