From patchwork Tue Jun 6 23:37:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 9770185 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 B77876034B for ; Tue, 6 Jun 2017 23:38:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 975C42851E for ; Tue, 6 Jun 2017 23:38:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A7C2284E4; Tue, 6 Jun 2017 23:38:14 +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 12CC2284E4 for ; Tue, 6 Jun 2017 23:38:13 +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=KGDcMLNe5pXaSM 5o+XCa0Z1uUX2TnxPqgZHtgRwNF1EorXNVvbGx7oMG4f77dcGRLxAPX9qk0V6BRECowFtf8Ym4h+X G8XhNd/bdi2ThgCoccuxZy0WOaFvtxMksFcn3kI8W6SQsOUWA00XvUeDhbzWYvxOR0VJm7xhFcbMj v/KNzpCvKe1fO4MZFR3l10T9CU1alURf13KKoHBASZqij+R4u4AwXhGtgYvVRXkDmVWRmIeKTNbw9 ayVHj5+vhJ09x7Y6UB1S9rWi7KyhVESWXvY7Tf8yzmgx7ayqwKbVkqjPHoZruw4/sZoY3LwwDV6d1 Sv6AJC//GLC3+R1iu5Dw==; 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 1dIO37-0007sj-Ue; Tue, 06 Jun 2017 23:38:09 +0000 Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dIO33-0007pY-2O for linux-arm-kernel@lists.infradead.org; Tue, 06 Jun 2017 23:38:07 +0000 Received: by mail-pf0-x22a.google.com with SMTP id 9so102840723pfj.1 for ; Tue, 06 Jun 2017 16:37: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=MYvCMc5ivxa0YGZcHxrdoT0WC67Tl6P9a/iXCeZKPp7sfbRJpMmnoYapWXIiNtKzkp rOxJkwCYI450OTTacDfRE/DWAFsapaCn/Jv3mL0yV9eo5re/91FmVavVqkNxbOmpJhgw BuVpksNk7cLmOulErTW0B0/lNs18q+zHWqSmC3N6va3eCIha3P5y3uXE4HTrZY4Vy8sS aGEmxl70CjYg6BWzJ+IlTZpfNWWAdTCX1TZEEsdIomta7Aojh6XG8s+IeLC/C5566xj4 4xQHieNDFIxBSPAopj/cP3mbeV76e1LvprVOTiODmvuDtmERhab1P5MWuASOOiEJS3eG mj2w== 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=iE9MW7Q5Ka5itBdUcFKUB5BhrGUdFQWdyKL+9bFhC+NK8hK9vXEWV8RgvvKtDrvBm0 oP82ZOmAvsQQ1P7HINMuMJf5pv0U6bfettR5QcDWuugl5MdMnwMRRBceKO2tdJYcmCHk 24ogpt39tuhuyjN/KJGhtLYTX5d7P681yDDTV4nhS0C8U1Gy5UiWAZUQ9fSzWrdsvWMr 3YAdnmoUlHjlq7DPznc7lZg8A5+XLqsrB6kilyoLpManSl6wmz50RQ/0+5Yi0MnUT+SM Co8UrZaXWDpiqeRQ8fwemBgjDse8bAnmJ5ULodGV82tDFtkAiDFeKhQu807b1UVXo/Qr 8Lpg== X-Gm-Message-State: AODbwcBjzQ9FLfvJkxuzob6JBkm2wAr+PW9OgjCbiYo11qLCjlsx8/QA e/wrOgew5oEqgNpb X-Received: by 10.84.209.236 with SMTP id y99mr24226017plh.198.1496792263640; Tue, 06 Jun 2017 16:37: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 g86sm1804649pfk.101.2017.06.06.16.37.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 16:37:43 -0700 (PDT) From: Kevin Hilman To: Hans Verkuil , Laurent Pinchart , linux-media@vger.kernel.org Subject: [PATCH v2 1/4] [media] davinci: vpif_capture: drop compliance hack Date: Tue, 6 Jun 2017 16:37:38 -0700 Message-Id: <20170606233741.26718-2-khilman@baylibre.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170606233741.26718-1-khilman@baylibre.com> References: <20170606233741.26718-1-khilman@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170606_163805_150383_3BFBAABF X-CRM114-Status: GOOD ( 11.12 ) 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: David Lechner , Sekhar Nori , Benoit Parrot , Prabhakar Lad , Patrick Titiano , linux-arm-kernel@lists.infradead.org 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);