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: 41622 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGuDY-0006M4-GI; Fri, 02 Jun 2017 21:34:48 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.89/mailfrontend-6) with esmtp id 1dGuDW-0004Md-4r; Fri, 02 Jun 2017 23:34:48 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbdFBVep (ORCPT + 1 other); 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-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.6.2.212415 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1700_1799 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, DKIM_SIGNATURE 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, MULTIPLE_REAL_RCPTS 0, NO_URI_HTTPS 0, REFERENCES 0, __ANY_URI 0, __CC_NAME 0, __CC_NAME_DIFF_FROM_ACC 0, __CC_REAL_NAMES 0, __CP_MEDIA_BODY 0, __CTE 0, __FROM_DOMAIN_IN_ANY_CC2 0, __FROM_DOMAIN_IN_RCPT 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_LIST_ID 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NAME 0, __TO_NAME_DIFF_FROM_ACC 0, __TO_REAL_NAMES 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' 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);