From patchwork Thu Apr 19 10:18:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 133729 Delivered-To: patch@linaro.org Received: by 10.80.173.174 with SMTP id a43csp614134edd; Thu, 19 Apr 2018 03:18:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/RqFDX1T8z6028OtCjNvGgcIV6c+PYcvS9E+DgUJsKa5zypnn6ase3vvPiNGY9y8/RHKJO X-Received: by 10.98.55.69 with SMTP id e66mr5270750pfa.253.1524133135395; Thu, 19 Apr 2018 03:18:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524133135; cv=none; d=google.com; s=arc-20160816; b=nVQrexTkB02H0ylZTZ1fq+9LM78YQaYhS+Bb38SRR80bckIJpejx8aJmK7Ntb3MIlK hxFAwFfMFJVm8wS3ESfpXwF1Z1mCW8neDXK2CqVDHuh25q7N3BIewEA3IZEywP5LCXIQ PYPSj6HdmkV50lZiC6y/RrHQmv/QSYrYXSyWU7P3M2/88pM8YEEDTlL0Arj9dvO9xXmD R41ocmcMfRR8Z0JFRw+5BfV/KNDWTpUzWhah6MV0yBbJyGQcVOlAjIaEJw92nodXZU1h idb69qClZoqWNtIzOPx3xMPOxyGyTToDsSxXRaLEQZDpPJDO8aYBjJOMHWjUkO6rEW/l iZkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=8pAz7BwzBIQmxPnVeJD2tvstpcSv8T02ZpF0zxewmRE=; b=XXpZvWQedIUaRAj80HhdOWmUGejbTNYQBB0SFIuuwTywCLIeZdeuVz99tH3Pz3CPRA KvvcdA1R+iZ3uhDKmZW6z4XL5jEyp6BcsD+NPMtPYm1h8CUSsdOsxiEDmJJlm2CFxIuC UyJ0V2d4YGddMkFfFzWve3mYJBUJBBkEZfLgnMsBfLZpdijbOOrYiPcHweAKvOfakFNJ 7o4W7vJS9kfhNjT5TL5FYrDjNI7J0RJDc8wTPueYH07MbCohe6v0ww8yBUVDTKYuBtby 2P7qbJISvslLCEAV8upAHcR73+rltJsmjAdXV67ro7qEW2U/kBBmuUZfwwbLpV0yknKu 48/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FNX7N828; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r18si3018088pfe.168.2018.04.19.03.18.55; Thu, 19 Apr 2018 03:18:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FNX7N828; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbeDSKSw (ORCPT + 5 others); Thu, 19 Apr 2018 06:18:52 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:35265 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbeDSKSu (ORCPT ); Thu, 19 Apr 2018 06:18:50 -0400 Received: by mail-wr0-f194.google.com with SMTP id w3-v6so12520401wrg.2 for ; Thu, 19 Apr 2018 03:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8pAz7BwzBIQmxPnVeJD2tvstpcSv8T02ZpF0zxewmRE=; b=FNX7N828dhMTAVFGmyAkH7RUND2d1G5RckD8iTw45aGOFmFDTSMszCUP9TJqxJVu5s ZywVI5dcNc0mLbbH6wM9EDG4RHEPC0bWZcuyowrNFFY1EYFN3SuJ3sEUj+eeJuql5BrJ DHxtoBlg8BUlnnEoNLfAEnZFBzGhfyOostk/A= 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; bh=8pAz7BwzBIQmxPnVeJD2tvstpcSv8T02ZpF0zxewmRE=; b=KkPVlPGEPUkCMlwMOJb/uw+nnEqV1nxVAx2c2StGjOEAsXWAES7VAQwhPuSMQegc17 JeSm9akACoWAW9DvWskfN4RwRc59tgRAbWKXqjD8piMX3BMhbqnffNmkqCb7RstjY1ap eBNnSTfRIQQC40yFJSBBjspl02QD81UlD8fW427PsDlrllUjTXZHvkFT8VZ7t0FjtgX3 Zs6DQRjen969vVMq8Nxc9yk+Q+lc1sSoVUIEdXlM0PCySLQiKIoFSYXrUYRc+Oit4sx+ EOfzypG9i6Zc2We4JZg0hW/5eL34Ek9tMtLAdcOX//l6Fe5IM/4PpSBBmk7ionX5Cn15 2K0w== X-Gm-Message-State: ALQs6tAXWLk2H/DmM7deLkjpRliKIGA0k5f5MvTUDB9E/4sGKU4bEo7t 307Jk4IorZOJZ7v0AYmDSdsNCw== X-Received: by 10.28.129.148 with SMTP id c142mr4003618wmd.103.1524133128917; Thu, 19 Apr 2018 03:18:48 -0700 (PDT) Received: from arch-late.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id v66sm5220937wmd.41.2018.04.19.03.18.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 03:18:48 -0700 (PDT) From: Rui Miguel Silva To: mchehab@kernel.org, sakari.ailus@linux.intel.com, Steve Longerbeam , Philipp Zabel , Rob Herring Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, Shawn Guo , Fabio Estevam , devicetree@vger.kernel.org, Greg Kroah-Hartman , Ryan Harkin , Rui Miguel Silva Subject: [PATCH 07/15] media: staging/imx: add 10 bit bayer support Date: Thu, 19 Apr 2018 11:18:04 +0100 Message-Id: <20180419101812.30688-8-rui.silva@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180419101812.30688-1-rui.silva@linaro.org> References: <20180419101812.30688-1-rui.silva@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Some sensors can only output 10 bit bayer formats, like the OV2680. Add support for that in imx-media. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/imx-media-utils.c | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) -- 2.17.0 diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c index fab98fc0d6a0..99527daba29a 100644 --- a/drivers/staging/media/imx/imx-media-utils.c +++ b/drivers/staging/media/imx/imx-media-utils.c @@ -118,6 +118,30 @@ static const struct imx_media_pixfmt rgb_formats[] = { .cs = IPUV3_COLORSPACE_RGB, .bpp = 8, .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SBGGR10, + .codes = {MEDIA_BUS_FMT_SBGGR10_1X10}, + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 16, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGBRG10, + .codes = {MEDIA_BUS_FMT_SGBRG10_1X10}, + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 16, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SGRBG10, + .codes = {MEDIA_BUS_FMT_SGRBG10_1X10}, + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 16, + .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_SRGGB10, + .codes = {MEDIA_BUS_FMT_SRGGB10_1X10}, + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 16, + .bayer = true, }, { .fourcc = V4L2_PIX_FMT_SBGGR16, .codes = {