From patchwork Mon May 7 22:04:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10384861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 75C9C60159 for ; Mon, 7 May 2018 22:05:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D4B828ADC for ; Mon, 7 May 2018 22:05:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E7C428B79; Mon, 7 May 2018 22:05:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 968D728B73 for ; Mon, 7 May 2018 22:05:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 026896E3D0; Mon, 7 May 2018 22:04:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from leonov.paulk.fr (leonov.paulk.fr [185.233.101.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2DA6A6E3D0 for ; Mon, 7 May 2018 22:04:57 +0000 (UTC) Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 743D2C0808 for ; Tue, 8 May 2018 00:04:55 +0200 (CEST) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 4B96FC0D58; Tue, 8 May 2018 00:04:54 +0200 (CEST) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id ADBFBC0D51; Tue, 8 May 2018 00:04:29 +0200 (CEST) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-sunxi@googlegroups.com Subject: [PATCH v4 1/3] drm/panel: Add RGB666 variant of Innolux AT070TN90 Date: Tue, 8 May 2018 00:04:11 +0200 Message-Id: <20180507220413.21990-1-contact@paulk.fr> X-Mailer: git-send-email 2.17.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Maxime Ripard , Paul Kocialkowski , David Airlie , Chen-Yu Tsai , Rob Herring , Thierry Reding MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This adds timings for the RGB666 variant of the Innolux AT070TN90 panel, as found on the Ainol AW1 tablet. The panel also supports RGB888 output. When RGB666 mode is used instead, the two extra lanes per component are grounded. In the future, it might become necessary to introduce a dedicated device-tree property to specify the bus format to use instead of the default one for the panel. This will allow supporting different bus formats for the same panel modes. Signed-off-by: Paul Kocialkowski --- drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index cbf1ab404ee7..32e30d5a8f08 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1063,6 +1063,29 @@ static const struct panel_desc innolux_at043tn24 = { .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, }; +static const struct drm_display_mode innolux_at070tn90_mode = { + .clock = 40000, + .hdisplay = 800, + .hsync_start = 800 + 112, + .hsync_end = 800 + 112 + 1, + .htotal = 800 + 112 + 1 + 87, + .vdisplay = 480, + .vsync_start = 480 + 141, + .vsync_end = 480 + 141 + 1, + .vtotal = 480 + 141 + 1 + 38, + .vrefresh = 60, +}; + +static const struct panel_desc innolux_at070tn90 = { + .modes = &innolux_at070tn90_mode, + .num_modes = 1, + .size = { + .width = 154, + .height = 86, + }, + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, +}; + static const struct drm_display_mode innolux_at070tn92_mode = { .clock = 33333, .hdisplay = 800, @@ -2151,6 +2174,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "innolux,at043tn24", .data = &innolux_at043tn24, + }, { + .compatible = "innolux,at070tn90", + .data = &innolux_at070tn90, }, { .compatible = "innolux,at070tn92", .data = &innolux_at070tn92,