From patchwork Mon Nov 27 15:41:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 119730 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp438156qgn; Mon, 27 Nov 2017 07:42:29 -0800 (PST) X-Google-Smtp-Source: AGs4zMbRV0WPCq3V81j4gqkuFDMP6yWL5mTcHon4KT+t7DLgFz4Ry/KUMWgd+2gKa0Fk3bmw+q0V X-Received: by 10.99.126.93 with SMTP id o29mr37398521pgn.304.1511797349794; Mon, 27 Nov 2017 07:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511797349; cv=none; d=google.com; s=arc-20160816; b=X0ft8we55U+Su42/sErKIeZaghXw9yM2RyUhqTqRbOKKXq+11X2Wn7lISOpRVkqPhl WMFUq1ZAxGLY1+J0oGvH9QKDgLw3ooE8cOLFg4CFjJbzngWb7eS2cOp4mjsoIscNw/iY sM0Hy48J8Pd2gOl/4q3SGtyxk64NZ7NFMLcftIGbHMDnJPn8KyQcPi4J+XjA8b6scA1q 9UsbwzhIh97F6LW10CyvK3WxqP+kMMzVlZLUhhwQc0BNCQJHHTB066XWNkTKaFNbbAK/ dq4ynUSfxZXKefsrLGXAa+ewcTshA6g6hrLJjdUXt086NWzacnIy9pdPUko9xG98PAx8 K3FQ== 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=Hce6l0fY6iw/i/AevCWP40zJM+kHFM8N5Li9XD6tnzE=; b=Q8qO/m8wXvinTLklf6pE6Xg4824imMxMMiUT278Yqn8KljfKwokKvQk5Ybsx+HPwNz SSpvdEp5377/Io8+78ZcVBjclAAn9GDM6EK2DcjeWooXEHU7YTb/GT3oZKgwP0UJSQNE hLOqbZ4J1SNQPggVl01FBo/tXumWyy213wItr3N1jlaM0GWeEw49pNS0YE5xwqanspWO imorByCxZLT5y169Ge71m+Ws16Eg/bTAsHmaFG/T7f34kR3qNGQsLiVGr120zWWNk42u 0DgvhNa7WOs07CdZqjhn25c/ssRSGB1q5RUUe+1q2I1fLNofliNcomBHDkJK4fwUv0gZ +4IQ== 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 i87si9748104pfi.301.2017.11.27.07.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Nov 2017 07:42:29 -0800 (PST) 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 9985F6E2FB; Mon, 27 Nov 2017 15:41:57 +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 8EBE06E2F3 for ; Mon, 27 Nov 2017 15:41:55 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 241122074D; Mon, 27 Nov 2017 16:41:54 +0100 (CET) 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 (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id E63B120742; Mon, 27 Nov 2017 16:41:53 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v2 00/18] drm/sun4i: Add A83t LVDS support Date: Mon, 27 Nov 2017 16:41:24 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , 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 Changes from v1: - Added a fix for the error path handling in the TCON - Enable the TCON by default - Removed the patch that changes the channels offset but kept most of the modifications as a cleanup - Deal with the LVDS clock being able to have another PLL parent on some SoCs - Renamed the TCON compatible to TCON-TV, following the convention used on newer SoCs - Removed the hardcoded timings - Moved LVDS enable quirks to a separate function - Used clock indices define in the DT - Removed the hardcoded clock rate in the DT and moved it to the driver - Changed sun8i_mixer_planes to sun8i_mixer_ui_planes to be consistent - Added the various tags collected - Rebased on top of 4.15 Maxime Ripard (18): dt-bindings: panel: lvds: Document power-supply property drm/panel: lvds: Add support for the power-supply property dt-bindings: display: sun4i-drm: Add LVDS properties drm/sun4i: Fix error path handling drm/sun4i: Force the mixer rate at 150MHz drm/sun4i: Rename layers to UI planes drm/sun4i: sun8i: Rework the UI channels code 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 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: Reinstate the PMIC compatible 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 | 11 +++- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 62 ++++++++++++++++++- arch/arm/boot/dts/sun8i-a83t.dtsi | 99 +++++++++++++++++++++++++++++- drivers/gpu/drm/panel/panel-lvds.c | 23 +++++++- drivers/gpu/drm/sun4i/Makefile | 3 +- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 10 ++- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- drivers/gpu/drm/sun4i/sun4i_lvds.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/sun4i/sun4i_lvds.h | 18 +++++- drivers/gpu/drm/sun4i/sun4i_tcon.c | 247 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/sun4i/sun4i_tcon.h | 31 +++++++++- drivers/gpu/drm/sun4i/sun8i_layer.c | 134 +--------------------------------------- drivers/gpu/drm/sun4i/sun8i_layer.h | 36 +---------- drivers/gpu/drm/sun4i/sun8i_mixer.c | 86 ++++++++++++++----------- drivers/gpu/drm/sun4i/sun8i_mixer.h | 101 ++++++++++++++++------------- drivers/gpu/drm/sun4i/sun8i_ui.c | 136 ++++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/sun4i/sun8i_ui.h | 37 +++++++++++- 19 files changed, 968 insertions(+), 258 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: 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323