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] [day] [month] [year] [list]
Date:	Mon, 29 Sep 2014 19:20:57 +0200
From:	Boris BREZILLON <boris.brezillon@...e-electrons.com>
To:	Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc:	David Airlie <airlied@...ux.ie>, dri-devel@...ts.freedesktop.org,
	Nicolas Ferre <nicolas.ferre@...el.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
	Andrew Victor <linux@...im.org.za>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	Thierry Reding <thierry.reding@...il.com>,
	linux-pwm@...r.kernel.org, Rob Clark <robdclark@...il.com>,
	linux-arm-kernel@...ts.infradead.org,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, Mark Yao <mark.yao@...k-chips.com>
Subject: Re: [PATCH v6 05/11] drm: add Atmel HLCDC Display Controller
 support

On Mon, 29 Sep 2014 16:44:18 +0200
Boris Brezillon <boris.brezillon@...e-electrons.com> wrote:

> From: Boris BREZILLON <boris.brezillon@...e-electrons.com>
> 
> The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e.
> at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display
> controller device.
> 
> This display controller supports at least one primary plane and might
> provide several overlays and an hardware cursor depending on the IP
> version.
> 
> At the moment, this driver only implements an RGB connector to interface
> with LCD panels, but support for other kind of external devices might be
> added later.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@...e-electrons.com>
> Reviewed-by: Rob Clark <robdclark@...il.com>
> Tested-by: Anthony Harivel <anthony.harivel@...rion.de>
> Tested-by: Ludovic Desroches <ludovic.desroches@...el.com>
> ---
>  drivers/gpu/drm/Kconfig                          |   2 +
>  drivers/gpu/drm/Makefile                         |   1 +
>  drivers/gpu/drm/atmel-hlcdc/Kconfig              |  13 +
>  drivers/gpu/drm/atmel-hlcdc/Makefile             |   7 +
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c   | 392 +++++++++++
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c     | 527 ++++++++++++++
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h     | 216 ++++++
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c  | 659 ++++++++++++++++++
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h  | 403 +++++++++++
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 443 ++++++++++++
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c  | 833 +++++++++++++++++++++++
>  11 files changed, 3496 insertions(+)
>  create mode 100644 drivers/gpu/drm/atmel-hlcdc/Kconfig
>  create mode 100644 drivers/gpu/drm/atmel-hlcdc/Makefile
>  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
>  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
>  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
>  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c
>  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h
>  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
>  create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> 
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index b066bb3..2d97f7e 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -185,6 +185,8 @@ source "drivers/gpu/drm/cirrus/Kconfig"
>  

[...]

> +
> +int atmel_hlcdc_crtc_mode_valid(struct drm_crtc *c,
> +				struct drm_display_mode *mode)
> +{
> +	struct videomode vm;
> +
> +	vm.vfront_porch = mode->vsync_start - mode->vdisplay;
> +	vm.vback_porch = mode->vtotal - mode->vsync_end;
> +	vm.vsync_len = mode->vsync_end - mode->vsync_start;
> +	vm.hfront_porch = mode->hsync_start - mode->hdisplay;
> +	vm.hback_porch = mode->htotal - mode->hsync_end;
> +	vm.hsync_len = mode->hsync_end - mode->hsync_start;
> +
> +	if (vm.hsync_len > 0x40 || vm.hsync_len < 1)
> +		return MODE_HSYNC;
> +
> +	if (vm.vsync_len > 0x40 || vm.vsync_len < 1)
> +		return MODE_VSYNC;
> +
> +	if (vm.vfront_porch > 0x40 || vm.hfront_porch < 1 ||
> +	    vm.vback_porch > 0x40 || vm.vback_porch < 0 ||
> +	    mode->hdisplay > 2048 || mode->hdisplay < 1)
> +		return MODE_H_ILLEGAL;
> +
> +	if (vm.hfront_porch > 0x200 || vm.hfront_porch < 1 ||
> +	    vm.hback_porch > 0x200 || vm.hback_porch < 1 ||
> +	    mode->hdisplay > 2048 || mode->hdisplay < 1)
> +		return MODE_V_ILLEGAL;
> +
> +	return MODE_OK;
> +}
> +

I forgot to squash the commit removing this function which a vestige
from one of my attempt to provide a common mode_valid function that can
be called from the connector mode_valid function.

-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ