From patchwork Fri Jul 29 10:56:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 1019762 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6TAvSbh007639 for ; Fri, 29 Jul 2011 10:57:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756346Ab1G2K5Q (ORCPT ); Fri, 29 Jul 2011 06:57:16 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:61864 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756170Ab1G2K5E (ORCPT ); Fri, 29 Jul 2011 06:57:04 -0400 Received: from axis700.grange (dslb-084-061-105-216.pools.arcor-ip.net [84.61.105.216]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MMcRu-1Ql6Jc2wcI-008GTZ; Fri, 29 Jul 2011 12:57:03 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 67C3918B04F for ; Fri, 29 Jul 2011 12:57:01 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1QmkkX-0007og-Ao for linux-media@vger.kernel.org; Fri, 29 Jul 2011 12:57:01 +0200 From: Guennadi Liakhovetski To: linux-media@vger.kernel.org Subject: [PATCH 35/59] V4L: mt9m001, mt9v022: add a clarifying comment Date: Fri, 29 Jul 2011 12:56:35 +0200 Message-Id: <1311937019-29914-36-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1311937019-29914-1-git-send-email-g.liakhovetski@gmx.de> References: <1311937019-29914-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:YONKEdQQsjRdsYE6WZ8BqdYVJ2hHKPLi7CdwOzvi5/9 GzLMCBZe2+EnD8YpZQ3IKG2+sNbycNF/dD2pdFDgUzawS9ZIK3 Zigo6AaxRJXQ6bEEsAnw3On4vEu8QyHXdm6VohbEO0X4QUwMBJ zHNfeW1h1byuYf4vnSEssD1zD+D/n/MJ8/R/5TaLgzuPDX1UA/ JOrJa3/BO71MV6jyk6Ro9YQrK7xsSgdvQ1cdjbTHek= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 29 Jul 2011 10:57:28 +0000 (UTC) Signed-off-by: Guennadi Liakhovetski --- drivers/media/video/mt9m001.c | 6 ++++++ drivers/media/video/mt9v022.c | 6 ++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c index 7618b3c..750ce60 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, struct i2c_client *client = v4l2_get_subdevdata(sd); struct soc_camera_device *icd = client->dev.platform_data; 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; if (icl->set_bus_param) diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index 2fc6ca2..ddc11d0 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, struct soc_camera_link *icl = to_soc_camera_link(icd); struct mt9v022 *mt9v022 = to_mt9v022(client); 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; int ret; u16 pixclk = 0;