From patchwork Tue Mar 10 16:06:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 210692 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86225C18E5A for ; Tue, 10 Mar 2020 16:06:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B985222D9 for ; Tue, 10 Mar 2020 16:06:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ssw4HGN+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727113AbgCJQGr (ORCPT ); Tue, 10 Mar 2020 12:06:47 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:55140 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727075AbgCJQGq (ORCPT ); Tue, 10 Mar 2020 12:06:46 -0400 Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1CA485F; Tue, 10 Mar 2020 17:06:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583856404; bh=KQZ1vwcGrZ0kV6oV5/PjsdL2VHZRY637TyI8/iCBwr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ssw4HGN+qumP3XUzVYN3cvsOkEhdjoIJsj9JbJLAwb4AMrLPqoYNKSlt76Z5SJuN7 Q4uS8zPODtFDV5zUU9S0fHGQOft5bqdIozHnLesDASTp9V9ssLKEju+BUeBJw0TdBV FfCfrW0P/1MqWgo97OU1wEuQQeOFgoaqH2n/lGOg= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Steve Longerbeam , Philipp Zabel , Rui Miguel Silva Subject: [PATCH v2 08/10] media: imx: imx6-media-csi: Support clamping Y10 and Y12 to Y8 Date: Tue, 10 Mar 2020 18:06:31 +0200 Message-Id: <20200310160633.950-9-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200310160633.950-1-laurent.pinchart@ideasonboard.com> References: <20200310160633.950-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 10-bit and 12-bit greyscale input data to the CSI can be written as 8-bit data to memory. Support this. Signed-off-by: Laurent Pinchart --- drivers/staging/media/imx/imx-media-utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c index bc20fcc88267..fae981698c49 100644 --- a/drivers/staging/media/imx/imx-media-utils.c +++ b/drivers/staging/media/imx/imx-media-utils.c @@ -161,7 +161,11 @@ static const struct imx_media_pixfmt rgb_formats[] = { .bayer = true, }, { .fourcc = V4L2_PIX_FMT_GREY, - .codes = {MEDIA_BUS_FMT_Y8_1X8}, + .codes = { + MEDIA_BUS_FMT_Y8_1X8, + MEDIA_BUS_FMT_Y10_1X10, + MEDIA_BUS_FMT_Y12_1X12, + }, .cs = IPUV3_COLORSPACE_RGB, .bpp = 8, .bayer = true,