Skip to content

Commit

Permalink
[media] smiapp: Use highest bits-per-pixel for sensor internal format
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sakari Ailus authored and Mauro Carvalho Chehab committed Sep 26, 2012
1 parent 53102d2 commit f67e157
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/media/i2c/smiapp/smiapp-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f67e157

Please sign in to comment.