From patchwork Sun Aug 12 10:08:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1309461 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 1A123DF280 for ; Sun, 12 Aug 2012 10:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750828Ab2HLKI6 (ORCPT ); Sun, 12 Aug 2012 06:08:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39289 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709Ab2HLKI5 (ORCPT ); Sun, 12 Aug 2012 06:08:57 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7CA8uMO032664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 12 Aug 2012 06:08:56 -0400 Received: from [10.97.5.237] (vpn1-5-237.gru2.redhat.com [10.97.5.237]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7CA8q8A022022 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 12 Aug 2012 06:08:56 -0400 Message-ID: <502780B3.60205@redhat.com> Date: Sun, 12 Aug 2012 07:08:51 -0300 From: Mauro Carvalho Chehab User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Ezequiel Garcia CC: linux-media@vger.kernel.org Subject: Re: [PATCH] em28xx: Fix height setting on non-progressive captures References: <1344016352-20302-1-git-send-email-elezegarcia@gmail.com> In-Reply-To: <1344016352-20302-1-git-send-email-elezegarcia@gmail.com> X-Enigmail-Version: 1.4.3 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Em 03-08-2012 14:52, Ezequiel Garcia escreveu: > This was introduced on commit c2a6b54a9: > "em28xx: fix: don't do image interlacing on webcams" > It is a known bug that has already been reported several times > and confirmed by Mauro. Thanks for reminding us about that. > Tested by compilation only. > > Signed-off-by: Ezequiel Garcia > --- > Hi, > > I have no idea why this hasn't been fixed before. The reason was because that patch didn't work ;) > > See this mail for Mauro's confirmation > http://www.digipedia.pl/usenet/thread/18550/7691/#post7685 > where he requested a patch on reporter. > > I guess the patch never came in. Did some tests here with both TV and Webcam (progressive) devices. The enclosed patch fixes the issue. Regards, Mauro. [media] em28xx: Fix height setting on non-progressive captures This was introduced on commit c2a6b54a9: "em28xx: fix: don't do image interlacing on webcams" The proposed patch by Ezequiel is wrong. The right fix here is to just don't bother here if either the image is progressive or not. Reported-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index de2cb20..bed07a6 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c @@ -785,12 +785,8 @@ int em28xx_resolution_set(struct em28xx *dev) else dev->vbi_height = 18; - if (!dev->progressive) - height >>= norm_maxh(dev); - em28xx_set_outfmt(dev); - em28xx_accumulator_set(dev, 1, (width - 4) >> 2, 1, (height - 4) >> 2); /* If we don't set the start position to 2 in VBI mode, we end up