From patchwork Tue Oct 17 09:06:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 116033 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp4636433qgn; Tue, 17 Oct 2017 02:06:44 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDWTknfGx54lV+wPApUY4hE/KeCN9M10tyOTdvUGyr5jsFhtx8J6caHK71ullceIpik/5zU X-Received: by 10.84.208.227 with SMTP id c32mr11026374plj.91.1508231204404; Tue, 17 Oct 2017 02:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508231204; cv=none; d=google.com; s=arc-20160816; b=H8F9T9U7RMgy7tCcgfGIEfSNpkJKECTJ+drY3jLjHhkcFerDkRPJ56lx9b9+w0i2iO Xe28aKx3Xvl6iTFm9mbI/5h9Rn+iMVTgH/wXVCNm2FO60a7bx4cjsrn3uAZaHBwuQsRw 8fSx6apanoFFMRtleDDT0fHDNYOkGDrXxG7cLvXP1P9A9CjW1xtBbvSkeOH8FKDtQa5W m26zs0l7DGZZaBCOZtaNLoVUjnPiJLZtzEwntR01h7db+jT3xKPMVxbWy7+HvO21QwXo mhbJGfJQIVggvCHp34Jr+rrHU8AMQ79ckWEBbTfZdtc71a98plsoWxuLTj8JpgwjezUX WqHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=R3Tsk7wwMBbNNAXnvIjs5rDuZZIIV2I0AGPzhYx94jw=; b=I2zLX67PDrvIZ7PVEpw6LwU1EQcTxNEoswTU41saJZOoyrtcTdoGGyy1zTmKk+qOAm MMTHsAU8d2P4lNwnc+ry/SEWuXb0VYCn7OTdJhze5lPW3YhSIEBuYdn4KRKmzSNLA5/3 ujcGF2OclP3xWjZBBnk220eAay4sjsjooLFyLAdOYpxdDd1MBFXPtdD9nC+X6L370qiS +F1hv0zxPUKAwXmyDpkwMt5Mj2jYkclfEVlgkSCgOA9rNmdA5deMcXaKVJbrsb3q3yEv aKgv8XajySkgh7G8TqrAdZKJgmLw3E7nPtJBR/UKRe2YnavjTmtFWR/MoUWc7pgX6luf a0Fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id s2si5917308plk.270.2017.10.17.02.06.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 02:06:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5778A6E604; Tue, 17 Oct 2017 09:06:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 362CE6E600 for ; Tue, 17 Oct 2017 09:06:40 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id F1AA52087F; Tue, 17 Oct 2017 11:06:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 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 C78AD207B6; Tue, 17 Oct 2017 11:06:37 +0200 (CEST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH 00/23] drm/sun4i: Add A83t LVDS support Date: Tue, 17 Oct 2017 11:06:07 +0200 Message-Id: X-Mailer: git-send-email 2.14.2 Cc: Mark Rutland , Thomas Petazzoni , plaes@plaes.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Quentin Schulz , Rob Herring , Mylene Josserand , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Here is an attempt at supporting the LVDS output in our DRM driver. This has been tested on the A83T (with DE2), but since everything is basically in the TCON, it should also be usable on the older SoCs with minor modifications. This was the occasion to refactor a bunch of things. The most notable ones would be the documentation, and split of the UI layers in the mixer code, and the switch to kfifo for our endpoint parsing code in the driver that fixes an issue introduced by the switch to BFS. Let me know what you think, Maxime Maxime Ripard (23): drm/sun4i: Implement endpoint parsing using kfifo drm/sun4i: Realign Makefile padding and reorder it drm/sun4i: tcon: Make tcon_set_mux mode argument const drm/sun4i: tcon: Make tcon_get_clk_delay mode argument const drm/sun4i: tcon: Don't rely on encoders to enable the TCON drm/sun4i: tcon: Don't rely on encoders to set the TCON mode drm/sun4i: tcon: Move out the tcon0 common setup dt-bindings: panel: lvds: Document power-supply property drm/panel: lvds: Add support for the power-supply property clk: sunxi-ng: Add A83T display clocks drm/sun4i: Rename layers to UI planes drm/sun4i: sun8i: properly support UI channels drm/sun4i: Reorder and document DE2 mixer registers drm/sun4i: Create minimal multipliers and dividers drm/sun4i: Add LVDS support drm/sun4i: Add A83T support arm: dts: sun8i: a83t: Add display pipeline arm: dts: sun8i: a83t: Enable the PWM arm: dts: sun8i: a83t: Add LVDS pins group arm: dts: sun8i: a83t: Add the PWM pin group arm: dts: sun8i: a711: Add regulator support arm: dts: sun8i: a711: Enable USB OTG arm: dts: sun8i: a711: Enable the LCD Documentation/devicetree/bindings/display/panel/panel-common.txt | 6 +- Documentation/devicetree/bindings/display/panel/panel-lvds.txt | 1 +- Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 3 +- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 232 +++++++++++++++++++++++++++++++++++++++++++++++++-- arch/arm/boot/dts/sun8i-a83t.dtsi | 100 ++++++++++++++++++++++- drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 21 +++-- drivers/gpu/drm/panel/panel-lvds.c | 23 +++++- drivers/gpu/drm/sun4i/Makefile | 29 +++--- drivers/gpu/drm/sun4i/sun4i_crtc.c | 32 ++++++- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 10 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 73 +++------------- drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 1 +- drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 15 +--- drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 1 +- drivers/gpu/drm/sun4i/sun4i_lvds.c | 183 ++++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/sun4i/sun4i_lvds.h | 18 ++++- drivers/gpu/drm/sun4i/sun4i_rgb.c | 29 +------ drivers/gpu/drm/sun4i/sun4i_tcon.c | 326 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------- drivers/gpu/drm/sun4i/sun4i_tcon.h | 50 +++++++---- drivers/gpu/drm/sun4i/sun4i_tv.c | 12 +--- drivers/gpu/drm/sun4i/sun8i_layer.c | 134 +------------------------------ drivers/gpu/drm/sun4i/sun8i_layer.h | 36 +-------- drivers/gpu/drm/sun4i/sun8i_mixer.c | 81 ++++++++---------- drivers/gpu/drm/sun4i/sun8i_mixer.h | 101 ++++++++++++---------- drivers/gpu/drm/sun4i/sun8i_ui.c | 136 ++++++++++++++++++++++++++++++- drivers/gpu/drm/sun4i/sun8i_ui.h | 37 ++++++++- 26 files changed, 1212 insertions(+), 478 deletions(-) create mode 100644 drivers/gpu/drm/sun4i/sun4i_lvds.c create mode 100644 drivers/gpu/drm/sun4i/sun4i_lvds.h delete mode 100644 drivers/gpu/drm/sun4i/sun8i_layer.c delete mode 100644 drivers/gpu/drm/sun4i/sun8i_layer.h create mode 100644 drivers/gpu/drm/sun4i/sun8i_ui.c create mode 100644 drivers/gpu/drm/sun4i/sun8i_ui.h base-commit: 5ffd95d0dc16c6491631b6ca19403c96fd3db5d5 Reviewed-by: Chen-Yu Tsai Reviewed-by: Chen-Yu Tsai