From patchwork Fri Jun 2 21:34:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 9763543 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C9D11602F0 for ; Fri, 2 Jun 2017 21:35:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC0F1285DA for ; Fri, 2 Jun 2017 21:35:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0E34285DC; Fri, 2 Jun 2017 21:35:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 23E53285DA for ; Fri, 2 Jun 2017 21:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MCvV+Q3qw8Z+HelFNY51CsL0uLKw+K+SnMV0py0lPIY=; b=irB1fWLmfyPHjC Z90R9gEZM1j0gkPC34exS1b+1LRj7m+4DQi92hxkJcKLy61ucUHYa6uKFT0feC18Vrl3VH/I0ehgo WfDoN0K2f+8txblFZgm0fvdCtfn1SQDtOrmj9OlV7EmaWvzbwMBMY1y8akDKlKVYr25Q3uYITwwId oxOr+fumkxNLimtyLteGzhLfFnbDWqLCrAjmLA6OlU2VHtw+2fuvTs9OJpt623tc1PpL4cmKBkfW4 Ix+hzF+DQESa/oI/TzCV57vp9IDi4FxeHCa9FvXCbAIhFYXHKrJQEx8eRaBfKGpb43ERaQI3Xa9xJ bAP3TXyKVBM1cTIUyrhQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dGuE0-00086L-Mm; Fri, 02 Jun 2017 21:35:16 +0000 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dGuDp-0006gc-24 for linux-arm-kernel@lists.infradead.org; Fri, 02 Jun 2017 21:35:07 +0000 Received: by mail-pf0-x235.google.com with SMTP id n23so57215426pfb.2 for ; Fri, 02 Jun 2017 14:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yEuKtgJuQN3UH6FifWa7fmuH3Pjur6fDr+gBUB2NU+w=; b=f5Hgtf2A2pAskoul+cooejj/Okj5406sw4m/bCMlWD7ZacZqMHx4nf8MPS5rv7bPO6 VcKEvJQ3PisGY6K0xUf5/UDZi587ZKcVqVF7xQZui+axDmvboFC/myMmJVnNnSf4BUdt +l8KgxgrohEz9/8MHK9+NnumNknAYMO21NERXLG8m2ZeMQ04uXpIneoYVET8oFFVEHdQ lU6FgysIcCK1foPdhECWJ9wdFURPJwYu/qxFVyWvNIlKEbtc5JJPl1pRFU+UFBlMaP6z M8TlZ0jMY6gTgqOnjzywKJiLl8oMKfFBRFf1+58R4CpcKUdbF45p5FxRfld55mWIWs03 Bqww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yEuKtgJuQN3UH6FifWa7fmuH3Pjur6fDr+gBUB2NU+w=; b=K5A0SH7gvBuqgCNUXct5QTnLdq3GGScGRfoHa0724r1NwrDWKxUVIiHFGIoOgrcoMk 9oD8GOBVhRBAt6l5YhLkKRYoubxoCMcZc9SdK6MuVLxXAmke3dzXp/zSnxb2rYXtfhId 2FMkZStS2XzyQ1EwT7BkhjsGQm020gvzmmYDwPy8C3cQUy9geCAXy4Cb9nYc/B7vuIiq xNudr2JUbcoJnUx1zxQJxaCCZ+0dxcOcXsCzJ7qp8V/HkS/5X+NXQBPtRqk9YRRwVWLg hGAREt2c7dkUwNnnq6FEAdhJwwFfXGxkQ9ru1YZDM8uQ8B4JBUPn4Eyx21SC55YE8G4I K2Eg== X-Gm-Message-State: AODbwcBQowOl5TXhUV9EVOvk7T5QwnDhSR6oPSibjpYZnkkK4ZGjwLXc ZnGRWF66px3YvGPu X-Received: by 10.101.75.201 with SMTP id p9mr7688452pgr.174.1496439283928; Fri, 02 Jun 2017 14:34:43 -0700 (PDT) Received: from localhost (c-98-203-232-209.hsd1.wa.comcast.net. [98.203.232.209]) by smtp.gmail.com with ESMTPSA id e124sm41408405pfc.64.2017.06.02.14.34.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jun 2017 14:34:43 -0700 (PDT) From: Kevin Hilman To: Hans Verkuil , Laurent Pinchart , linux-media@vger.kernel.org Subject: [PATCH 1/4] [media] davinci: vpif_capture: drop compliance hack Date: Fri, 2 Jun 2017 14:34:28 -0700 Message-Id: <20170602213431.10777-2-khilman@baylibre.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170602213431.10777-1-khilman@baylibre.com> References: <20170602213431.10777-1-khilman@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170602_143505_175140_1B66FC39 X-CRM114-Status: GOOD ( 10.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sekhar Nori , linux-arm-kernel@lists.infradead.org, Patrick Titiano Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Capture driver silently overrides pixel format with a hack (according to the comments) to pass v4l2 compliance tests. This isn't needed for normal functionality, and works for composite video and raw camera capture without. In addition, the hack assumes that it only supports raw capture with a single format (SBGGR8) which isn't true. VPIF can also capture 10- and 12-bit raw formats as well. Forthcoming patches will enable VPIF input with raw-camera support and has been tested with 10-bit format from the aptina,mt9v032 sensor. Any compliance failures should be fixed with a real fix. Signed-off-by: Kevin Hilman --- drivers/media/platform/davinci/vpif_capture.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index 128e92d1dd5a..fc5c7622660c 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -936,21 +936,6 @@ static int vpif_try_fmt_vid_cap(struct file *file, void *priv, struct channel_obj *ch = video_get_drvdata(vdev); struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; struct common_obj *common = &(ch->common[VPIF_VIDEO_INDEX]); - struct vpif_params *vpif_params = &ch->vpifparams; - - /* - * to supress v4l-compliance warnings silently correct - * the pixelformat - */ - if (vpif_params->iface.if_type == VPIF_IF_RAW_BAYER) { - if (pixfmt->pixelformat != V4L2_PIX_FMT_SBGGR8) - pixfmt->pixelformat = V4L2_PIX_FMT_SBGGR8; - } else { - if (pixfmt->pixelformat != V4L2_PIX_FMT_NV16) - pixfmt->pixelformat = V4L2_PIX_FMT_NV16; - } - - common->fmt.fmt.pix.pixelformat = pixfmt->pixelformat; vpif_update_std_info(ch);