From patchwork Mon Apr 25 13:22:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 8928101 Return-Path: X-Original-To: patchwork-linux-clk@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 04318BF29F for ; Mon, 25 Apr 2016 13:24:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 812812026F for ; Mon, 25 Apr 2016 13:24:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DACB8201F2 for ; Mon, 25 Apr 2016 13:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932299AbcDYNXQ (ORCPT ); Mon, 25 Apr 2016 09:23:16 -0400 Received: from down.free-electrons.com ([37.187.137.238]:59843 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932174AbcDYNXP (ORCPT ); Mon, 25 Apr 2016 09:23:15 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id BD8992165; Mon, 25 Apr 2016 15:23:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 56CE91817; Mon, 25 Apr 2016 15:22:58 +0200 (CEST) From: Maxime Ripard To: Mike Turquette , Stephen Boyd , David Airlie , Chen-Yu Tsai , Rob Herring , Daniel Vetter Cc: Hans de Goede , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, dri-devel@lists.freedesktop.org, Boris Brezillon , Thomas Petazzoni , Alexander Kaplan , Laurent Pinchart , Maxime Ripard Subject: [PATCH v4 08/11] drm: sun4i: tv: Add PAL output standard Date: Mon, 25 Apr 2016 15:22:49 +0200 Message-Id: <1461590572-4027-9-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1461590572-4027-1-git-send-email-maxime.ripard@free-electrons.com> References: <1461590572-4027-1-git-send-email-maxime.ripard@free-electrons.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we have support for the composite output, we can start adding new supported standards. Start with PAL, and we will add other eventually. Signed-off-by: Maxime Ripard Reviewed-by: Boris Brezillon --- drivers/gpu/drm/sun4i/sun4i_tv.c | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index 78634dfc0f77..ccf275a90132 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tv.c +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c @@ -178,7 +178,49 @@ struct sun4i_tv { struct sun4i_drv *drv; }; +struct video_levels pal_video_levels = { + .black = 252, .blank = 252, +}; + +struct burst_levels pal_burst_levels = { + .cb = 40, .cr = 40, +}; + +struct color_gains pal_color_gains = { + .cb = 224, .cr = 224, +}; + +struct resync_parameters pal_resync_parameters = { + .field = true, .line = 13, .pixel = 12, +}; + struct tv_mode tv_modes[] = { + { + .name = "PAL", + .mode = SUN4I_TVE_CFG0_RES_576i, + .chroma_freq = 0x2a098acb, + + .back_porch = 138, + .front_porch = 24, + .line_number = 625, + + .hdisplay = 720, + .hfront_porch = 3, + .hsync_len = 2, + .hback_porch = 139, + + .vdisplay = 576, + .vfront_porch = 28, + .vsync_len = 2, + .vback_porch = 19, + + .vblank_level = 252, + + .color_gains = &pal_color_gains, + .burst_levels = &pal_burst_levels, + .video_levels = &pal_video_levels, + .resync_params = &pal_resync_parameters, + }, }; static inline struct sun4i_tv *