summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2012-09-15 17:19:49 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-26 17:43:24 -0300
commitf67e1573f08efb3225e7b1f05ecfec8b2ca8224b (patch)
tree4e07a663a7f9a661b33b750baaa46eb2cfbf49ad /drivers/media/i2c
parent53102d202fe9c0368f09055753a4ffa200fe4092 (diff)
downloadop-kernel-dev-f67e1573f08efb3225e7b1f05ecfec8b2ca8224b.zip
op-kernel-dev-f67e1573f08efb3225e7b1f05ecfec8b2ca8224b.tar.gz
[media] smiapp: Use highest bits-per-pixel for sensor internal format
The format shown on the links internal to the sensor was the first one enumerated from the sensor, not the highest bit depth data that can be produced by the sensor. Correct this. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 4f1c8d6..02bfa447 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -777,7 +777,11 @@ static int smiapp_get_mbus_formats(struct smiapp_sensor *sensor)
dev_dbg(&client->dev, "jolly good! %d\n", j);
sensor->default_mbus_frame_fmts |= 1 << j;
- if (!sensor->csi_format) {
+ if (!sensor->csi_format
+ || f->width > sensor->csi_format->width
+ || (f->width == sensor->csi_format->width
+ && f->compressed
+ > sensor->csi_format->compressed)) {
sensor->csi_format = f;
sensor->internal_csi_format = f;
}
OpenPOWER on IntegriCloud