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: 9763535 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 08964602F0 for ; Fri, 2 Jun 2017 21:34:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFF6B285DA for ; Fri, 2 Jun 2017 21:34:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E45F0285DC; Fri, 2 Jun 2017 21:34:46 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70A3E285DA for ; Fri, 2 Jun 2017 21:34:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbdFBVep (ORCPT ); Fri, 2 Jun 2017 17:34:45 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34333 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbdFBVeo (ORCPT ); Fri, 2 Jun 2017 17:34:44 -0400 Received: by mail-pf0-f178.google.com with SMTP id 9so57174754pfj.1 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=M9IzpXOgfYZ+1iUZEclGyKbVtsYUlkrpVKmAhLQ8uu3/sYNQAeF247yQYdFhAwvnns XMSBRfYVYfp7qtlOZtQOPgErL4SgBsi8Z5NIrEeUhhCHhYDTa4K8aa6iQFMAmI11YTNY NL/jHLJYoRc/tH1/eK7PTN02xIIEbgs2nYST2b8Bgr8s8RKIZ0lHgrCtgmwYx0AALfRV VHVgJDOZfgL74G3+3vyBi/0/lHUw8JQk3PanCKaiHAjZfGM/hLo7imjXvQrEO2kN5ASA ulVpJCRXSOhC4/PCuXRz6v8Xpx6gfaO1ck09eW4l5RR+jIkey7cOYUl5IYuDdWYNKWgZ 25sg== X-Gm-Message-State: AODbwcCFcAsocQYmLTdsvjD376yEoCkYWt0icQkizbd+7IvjfCD/l1mU Uef+9G90p6L3DkOG 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 Cc: Sekhar Nori , Patrick Titiano , linux-arm-kernel@lists.infradead.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 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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);