linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 09/11] drm: sun4i: tv: Add NTSC output standard
Date: Tue, 26 Apr 2016 11:59:41 +0200	[thread overview]
Message-ID: <20160426115941.14e2b0fb@bbrezillon> (raw)
In-Reply-To: <1461590572-4027-10-git-send-email-maxime.ripard@free-electrons.com>

On Mon, 25 Apr 2016 15:22:50 +0200
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> Add the settings to support the NTSC standard.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> ---
>  drivers/gpu/drm/sun4i/sun4i_tv.c | 45 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
> index ccf275a90132..bc047f923508 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_tv.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
> @@ -178,24 +178,69 @@ struct sun4i_tv {
>  	struct sun4i_drv	*drv;
>  };
>  
> +struct video_levels ntsc_video_levels = {
> +	.black = 282,	.blank = 240,
> +};
> +
>  struct video_levels pal_video_levels = {
>  	.black = 252,	.blank = 252,
>  };
>  
> +struct burst_levels ntsc_burst_levels = {
> +	.cb = 79,	.cr = 0,
> +};
> +
>  struct burst_levels pal_burst_levels = {
>  	.cb = 40,	.cr = 40,
>  };
>  
> +struct color_gains ntsc_color_gains = {
> +	.cb = 160,	.cr = 160,
> +};
> +
>  struct color_gains pal_color_gains = {
>  	.cb = 224,	.cr = 224,
>  };
>  
> +struct resync_parameters ntsc_resync_parameters = {
> +	.field = false,	.line = 14,	.pixel = 12,
> +};
> +
>  struct resync_parameters pal_resync_parameters = {
>  	.field = true,	.line = 13,	.pixel = 12,
>  };
>  
>  struct tv_mode tv_modes[] = {
>  	{
> +		.name		= "NTSC",
> +		.mode		= SUN4I_TVE_CFG0_RES_480i,
> +		.chroma_freq	= 0x21f07c1f,
> +		.yc_en		= true,
> +		.dac3_en	= true,
> +		.dac_bit25_en	= true,
> +
> +		.back_porch	= 118,
> +		.front_porch	= 32,
> +		.line_number	= 525,
> +
> +		.hdisplay	= 720,
> +		.hfront_porch	= 18,
> +		.hsync_len	= 2,
> +		.hback_porch	= 118,
> +
> +		.vdisplay	= 480,
> +		.vfront_porch	= 26,
> +		.vsync_len	= 2,
> +		.vback_porch	= 17,
> +
> +		.vblank_level	= 240,
> +
> +		.color_gains	= &ntsc_color_gains,
> +		.burst_levels	= &ntsc_burst_levels,
> +		.video_levels	= &ntsc_video_levels,
> +		.resync_params	= &ntsc_resync_parameters,
> +	},
> +	{
>  		.name		= "PAL",
>  		.mode		= SUN4I_TVE_CFG0_RES_576i,
>  		.chroma_freq	= 0x2a098acb,



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2016-04-26  9:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 13:22 [PATCH v4 00/11] drm: Add Allwinner A10 display engine support Maxime Ripard
2016-04-25 13:22 ` [PATCH v4 01/11] clk: sunxi: Add display and TCON0 clocks driver Maxime Ripard
2016-05-06 22:30   ` Stephen Boyd
2016-05-08 20:03     ` Maxime Ripard
2016-05-09 22:32       ` Stephen Boyd
2016-05-09 22:39         ` Stephen Boyd
2016-05-10  6:36           ` Maxime Ripard
2016-05-11 22:13             ` Stephen Boyd
2016-05-10 19:10           ` [linux-sunxi] " Priit Laes
2016-05-11 22:15             ` Stephen Boyd
2016-05-12  3:39               ` Priit Laes
2016-05-12  6:59                 ` Maxime Ripard
2016-05-12  8:30                   ` Maxime Ripard
2016-05-12 21:47                     ` Stephen Boyd
2016-04-25 13:22 ` [PATCH v4 02/11] ARM: sun5i: a13: Add display and TCON clocks Maxime Ripard
2016-04-25 13:22 ` [PATCH v4 03/11] drm: fb: Add seq_file definition Maxime Ripard
2016-04-25 13:22 ` [PATCH v4 04/11] drm: sun4i: Add DT bindings documentation Maxime Ripard
2016-04-28  2:37   ` Rob Herring
2016-04-25 13:22 ` [PATCH v4 05/11] drm: Add Allwinner A10 Display Engine support Maxime Ripard
2016-04-26  9:14   ` Boris Brezillon
2016-04-28  7:40     ` Maxime Ripard
2016-04-25 13:22 ` [PATCH v4 06/11] drm: sun4i: Add RGB output Maxime Ripard
2016-04-26  9:56   ` Boris Brezillon
2016-04-25 13:22 ` [PATCH v4 07/11] drm: sun4i: Add composite output Maxime Ripard
2016-04-26  9:59   ` Boris Brezillon
2016-04-25 13:22 ` [PATCH v4 08/11] drm: sun4i: tv: Add PAL output standard Maxime Ripard
2016-04-26  9:59   ` Boris Brezillon
2016-04-25 13:22 ` [PATCH v4 09/11] drm: sun4i: tv: Add NTSC " Maxime Ripard
2016-04-26  9:59   ` Boris Brezillon [this message]
2016-04-25 13:22 ` [PATCH v4 10/11] ARM: sun5i: r8: Add display blocks to the DTSI Maxime Ripard
2016-04-25 13:22 ` [PATCH v4 11/11] ARM: sun5i: chip: Enable the TV Encoder Maxime Ripard
2016-04-25 15:56 ` [PATCH v4 00/11] drm: Add Allwinner A10 display engine support Emil Velikov
2016-05-04 18:01 ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160426115941.14e2b0fb@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).