lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4db76eb2-460f-c644-6dbd-370b07b2def8@microchip.com>
Date:   Wed, 9 Jan 2019 13:07:06 +0000
From:   <Eugen.Hristev@...rochip.com>
To:     <luis.oliveira@...opsys.com>, <linux-media@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC:     <joao.pinto@...opsys.com>, <festevam@...il.com>,
        <mchehab@...nel.org>, <gregkh@...uxfoundation.org>,
        <davem@...emloft.net>, <akpm@...ux-foundation.org>,
        <arnd@...db.de>, <hans.verkuil@...co.com>,
        <laurent.pinchart@...asonboard.com>, <geert@...ux-m68k.org>,
        <narmstrong@...libre.com>, <p.zabel@...gutronix.de>,
        <treding@...dia.com>, <maxime.ripard@...tlin.com>,
        <todor.tomov@...aro.org>
Subject: Re: [V3, 4/4] media: platform: dwc: Add MIPI CSI-2 controller driver



On 19.10.2018 15:52, Luis Oliveira wrote:
> Add the Synopsys MIPI CSI-2 controller driver. This
> controller driver is divided in platform dependent functions
> and core functions. It also includes a platform for future
> DesignWare drivers.
> 
> Signed-off-by: Luis Oliveira <lolivei@...opsys.com>
> ---
> Changelog
> v2-V3
> - exposed IPI settings to userspace
> - fixed headers
> 
>   MAINTAINERS                              |  11 +
>   drivers/media/platform/dwc/Kconfig       |  30 +-
>   drivers/media/platform/dwc/Makefile      |   2 +
>   drivers/media/platform/dwc/dw-csi-plat.c | 699 +++++++++++++++++++++++++++++++
>   drivers/media/platform/dwc/dw-csi-plat.h |  77 ++++
>   drivers/media/platform/dwc/dw-mipi-csi.c | 494 ++++++++++++++++++++++
>   drivers/media/platform/dwc/dw-mipi-csi.h | 202 +++++++++
>   include/media/dwc/dw-mipi-csi-pltfrm.h   | 102 +++++
>   8 files changed, 1616 insertions(+), 1 deletion(-)
>   create mode 100644 drivers/media/platform/dwc/dw-csi-plat.c
>   create mode 100644 drivers/media/platform/dwc/dw-csi-plat.h
>   create mode 100644 drivers/media/platform/dwc/dw-mipi-csi.c
>   create mode 100644 drivers/media/platform/dwc/dw-mipi-csi.h
>   create mode 100644 include/media/dwc/dw-mipi-csi-pltfrm.h
> 

[snip]

> +/* Video formats supported by the MIPI CSI-2 */
> +const struct mipi_fmt dw_mipi_csi_formats[] = {
> +	{
> +		/* RAW 8 */
> +		.code = MEDIA_BUS_FMT_SBGGR8_1X8,
> +		.depth = 8,
> +	},
> +	{
> +		/* RAW 10 */
> +		.code = MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE,
> +		.depth = 10,
> +	},

Hi Luis,

Any reason why RAW12 format is not handled here ?

Here, namely MEDIA_BUS_FMT_SBGGR12_1X12 etc.

> +	{
> +		/* RGB 565 */
> +		.code = MEDIA_BUS_FMT_RGB565_2X8_BE,
> +		.depth = 16,
> +	},
> +	{
> +		/* BGR 565 */
> +		.code = MEDIA_BUS_FMT_RGB565_2X8_LE,
> +		.depth = 16,
> +	},
> +	{
> +		/* RGB 888 */
> +		.code = MEDIA_BUS_FMT_RGB888_2X12_LE,
> +		.depth = 24,
> +	},
> +	{
> +		/* BGR 888 */
> +		.code = MEDIA_BUS_FMT_RGB888_2X12_BE,
> +		.depth = 24,
> +	},
> +};

[snip]

> +
> +void dw_mipi_csi_set_ipi_fmt(struct mipi_csi_dev *csi_dev)
> +{
> +	struct device *dev = csi_dev->dev;
> +
> +	if (csi_dev->ipi_dt)
> +		dw_mipi_csi_write(csi_dev, reg.IPI_DATA_TYPE, csi_dev->ipi_dt);
> +	else {
> +		switch (csi_dev->fmt->code) {
> +		case MEDIA_BUS_FMT_RGB565_2X8_BE:
> +		case MEDIA_BUS_FMT_RGB565_2X8_LE:
> +			dw_mipi_csi_write(csi_dev,
> +					reg.IPI_DATA_TYPE, CSI_2_RGB565);
> +			dev_dbg(dev, "DT: RGB 565");
> +			break;
> +
> +		case MEDIA_BUS_FMT_RGB888_2X12_LE:
> +		case MEDIA_BUS_FMT_RGB888_2X12_BE:
> +			dw_mipi_csi_write(csi_dev,
> +					reg.IPI_DATA_TYPE, CSI_2_RGB888);
> +			dev_dbg(dev, "DT: RGB 888");
> +			break;
> +		case MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE:
> +			dw_mipi_csi_write(csi_dev,
> +					reg.IPI_DATA_TYPE, CSI_2_RAW10);
> +			dev_dbg(dev, "DT: RAW 10");
> +			break;
> +		case MEDIA_BUS_FMT_SBGGR8_1X8:
> +			dw_mipi_csi_write(csi_dev,
> +					reg.IPI_DATA_TYPE, CSI_2_RAW8);
> +			dev_dbg(dev, "DT: RAW 8");
> +			break;

Same here, in CSI_2_RAW12 case it will default to a RGB565 case.

Thanks,

Eugen



> +		default:
> +			dw_mipi_csi_write(csi_dev,
> +					reg.IPI_DATA_TYPE, CSI_2_RGB565);
> +			dev_dbg(dev, "Error");
> +			break;
> +		}
> +	}
> +}
> +

[snip]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ