From patchwork Wed Aug 19 21:02:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 7039281 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C1F5C9F372 for ; Wed, 19 Aug 2015 21:02:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D630206C0 for ; Wed, 19 Aug 2015 21:02:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7446C206A2 for ; Wed, 19 Aug 2015 21:02:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751271AbbHSVCV (ORCPT ); Wed, 19 Aug 2015 17:02:21 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:36211 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750947AbbHSVCV (ORCPT ); Wed, 19 Aug 2015 17:02:21 -0400 Received: by lagz9 with SMTP id z9so10789561lag.3 for ; Wed, 19 Aug 2015 14:02:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:mime-version:content-transfer-encoding:content-type; bh=ZDUYNfNxFyKar8b3FMpq6lKbIKt7M85b5gQYn2WU5DI=; b=dqAPKRuJS3R0H9FuphzQv7PtYPAEYXkP9qyn88uGuYHE5w7riO1ltFb8HroLvY1avo 3ZGuirwAkrnT8S0SqMRmP2Yrfn5QfAaAS4m556Nv9y4ZNuif62ePJslM7UFQ/Rn/53d0 Vh1s6V/UrEHcJJykySLrRftzTu6E/4zHxA4hNtDVTOpL0sdfiDAzbndJOiBvx6CiqFMv i5UQT6SM9yTcb1hUUS9xA8X0dwSOJY6pugSgSemScA+yNMMBc/ouLb5G2VrtUGclELB+ Rk8DBshNe7rhmHr+fdayHZrqqoAwPg7CfHvWu3Mib2//TYtDrSfvBh2CeUvlEXE0YkiF pHeA== X-Gm-Message-State: ALoCoQnRM5WdqkGC6oQ0LUU/MAUawUZQVN+8XM9kiZkcm4DHDZ4+UyGvUMqYHIviUisjN1ELN1ei X-Received: by 10.112.172.201 with SMTP id be9mr11564150lbc.39.1440018139432; Wed, 19 Aug 2015 14:02:19 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp83-237-250-51.pppoe.mtu-net.ru. [83.237.250.51]) by smtp.gmail.com with ESMTPSA id c5sm535848lbd.49.2015.08.19.14.02.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Aug 2015 14:02:18 -0700 (PDT) From: Sergei Shtylyov To: g.liakhovetski@gmx.de, mchehab@osg.samsung.com, linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH] rcar_vin: propagate querystd() error upstream Date: Thu, 20 Aug 2015 00:02:17 +0300 Message-ID: <1650569.JYNQd5Bi8T@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.9 (Linux/4.1.4-100.fc21.x86_64; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP rcar_vin_set_fmt() defaults to PAL when the subdevice's querystd() method call fails (e.g. due to I2C error). This doesn't work very well when a camera being used outputs NTSC which has different order of fields and resolution. Let us stop pretending and return the actual error (which would prevent video capture on at least Renesas Henninger/Porter board where I2C seems particularly buggy). Signed-off-by: Sergei Shtylyov --- The patch is against the 'media_tree.git' repo's 'fixes' branch. drivers/media/platform/soc_camera/rcar_vin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: media_tree/drivers/media/platform/soc_camera/rcar_vin.c =================================================================== --- media_tree.orig/drivers/media/platform/soc_camera/rcar_vin.c +++ media_tree/drivers/media/platform/soc_camera/rcar_vin.c @@ -1592,7 +1592,7 @@ static int rcar_vin_set_fmt(struct soc_c /* Query for standard if not explicitly mentioned _TB/_BT */ ret = v4l2_subdev_call(sd, video, querystd, &std); if (ret < 0) - std = V4L2_STD_625_50; + return ret; field = std & V4L2_STD_625_50 ? V4L2_FIELD_INTERLACED_TB : V4L2_FIELD_INTERLACED_BT;