From patchwork Sun Jul 15 21:23:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 1199511 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id F0676E0004 for ; Sun, 15 Jul 2012 21:49:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751996Ab2GOVti (ORCPT ); Sun, 15 Jul 2012 17:49:38 -0400 Received: from queueout02-winn.ispmail.ntl.com ([81.103.221.56]:35598 "EHLO queueout02-winn.ispmail.ntl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972Ab2GOVti (ORCPT ); Sun, 15 Jul 2012 17:49:38 -0400 X-Greylist: delayed 1587 seconds by postgrey-1.27 at vger.kernel.org; Sun, 15 Jul 2012 17:49:38 EDT Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20120715212308.VRVY15330.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com>; Sun, 15 Jul 2012 22:23:08 +0100 Received: from zog.reactivated.net ([86.14.215.141]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20120715212308.PDFW8396.aamtaout01-winn.ispmail.ntl.com@zog.reactivated.net>; Sun, 15 Jul 2012 22:23:08 +0100 Received: by zog.reactivated.net (Postfix, from userid 1000) id F2DC99D401E; Sun, 15 Jul 2012 22:23:05 +0100 (BST) From: Daniel Drake To: corbet@lwn.net, mchehab@infradead.org Cc: linux-media@vger.kernel.org Subject: [PATCH resend] via-camera: pass correct format settings to sensor Message-Id: <20120715212305.F2DC99D401E@zog.reactivated.net> Date: Sun, 15 Jul 2012 22:23:05 +0100 (BST) X-Cloudmark-Analysis: v=1.1 cv=GaEGOwq9FwezmTggA+b6yC6zDZF2HYaK6RN/tSqdnVA= c=1 sm=0 a=j6DE4j-GrHMA:10 a=vJ1w_8FsMGIA:10 a=Op-mwl0xAAAA:8 a=Un1VCh2g6Q8DAYcKQxgA:9 a=d4CUUju0HPYA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The code attempts to maintain a "user format" and a "sensor format", but in this case it looks like a typo is passing the user format down to the sensor. This was preventing display of video at anything other than 640x480. Signed-off-by: Daniel Drake --- drivers/media/video/via-camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/via-camera.c b/drivers/media/video/via-camera.c index 308e150..eb404c2 100644 --- a/drivers/media/video/via-camera.c +++ b/drivers/media/video/via-camera.c @@ -963,7 +963,7 @@ static int viacam_do_try_fmt(struct via_camera *cam, upix->pixelformat = f->pixelformat; viacam_fmt_pre(upix, spix); - v4l2_fill_mbus_format(&mbus_fmt, upix, f->mbus_code); + v4l2_fill_mbus_format(&mbus_fmt, spix, f->mbus_code); ret = sensor_call(cam, video, try_mbus_fmt, &mbus_fmt); v4l2_fill_pix_format(spix, &mbus_fmt); viacam_fmt_post(upix, spix);