From patchwork Mon Dec 4 07:16:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huang lin X-Patchwork-Id: 10089781 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 8C0CB60327 for ; Mon, 4 Dec 2017 08:18:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E0642905E for ; Mon, 4 Dec 2017 08:18:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7174729066; Mon, 4 Dec 2017 08:18:27 +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=-4.2 required=2.0 tests=BAYES_00, 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 2A84A2905E for ; Mon, 4 Dec 2017 08:18:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 41D5D6E2FE; Mon, 4 Dec 2017 08:17:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id B82A66E2C2 for ; Mon, 4 Dec 2017 07:16:16 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id v26so7883776pfl.7 for ; Sun, 03 Dec 2017 23:16:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3Jf2lUhuAdD1CVSJ0qpwaD+mmIXNPED6rtoGXdtQpIo=; b=Q3NAFRbiaSqCQTZVqvqDwNJpTD9SMq77n4rk5PV9B92GHeXDd1bJJ1SlNYb5rGHq3/ ML45k0XpO4NSjXSVBQcmbljhkH3Qmmp/mH6LVqzryHf6hjEVffpWQ3xPCs9AWG0Y5g1E 2fHgVe3maxERoLyNtmc1lH4F0lNlarQsGkRx2fadt3ZBCuPnIH2Io56LR6K04VWaZlh6 K5nWCAg9J0yr2/u/56KKdPG25IR69UJ7AOzHcl/3O7QZzQdvdv8U4x/5oK0GSMRTA93U awIscevnlBLB8lOnL/ih7+P7dOrApWaPazXWXiQWMzn5CtxSpn6ZUmYfLHTErDVSUGHX cJDA== X-Gm-Message-State: AJaThX51HB1OXxRUGNAwLFEV88IverMfi4leEwmi+25SFeoOJrJSnQJo JCgTF1QMGKTOqhTdI7OoAAs= X-Google-Smtp-Source: AGs4zMaQnJrUZ8UQ584GoOioSjsc2wD1VK0L2Dah2QNytPFthUG4TndfD2WlDdPSHISRX8soTmswIw== X-Received: by 10.84.135.162 with SMTP id 31mr13588365plj.23.1512371776238; Sun, 03 Dec 2017 23:16:16 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id i186sm21641873pfg.178.2017.12.03.23.16.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 Dec 2017 23:16:15 -0800 (PST) From: Lin Huang To: emil.l.velikov@gmail.com, briannorris@chromium.org, thierry.reding@gmail.com, robh+dt@kernel.org Subject: [PATCH v3 2/3] drm/panel: support Innolux P097PFG panel Date: Mon, 4 Dec 2017 15:16:04 +0800 Message-Id: <1512371765-15166-2-git-send-email-hl@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512371765-15166-1-git-send-email-hl@rock-chips.com> References: <1512371765-15166-1-git-send-email-hl@rock-chips.com> X-Mailman-Approved-At: Mon, 04 Dec 2017 08:17:11 +0000 Cc: Lin Huang , airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, nickey.yang@rock-chips.com, zyw@rock-chips.com 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" X-Virus-Scanned: ClamAV using ClamSMTP Support Innolux P097PFG 9.7" 1536x2048 TFT LCD panel, it reuse the Innolux P079ZCA panel driver. Signed-off-by: Lin Huang --- drivers/gpu/drm/panel/Kconfig | 9 ++++---- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 31 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 726f3fb..429cf59 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -29,15 +29,14 @@ config DRM_PANEL_SIMPLE low power state. config DRM_PANEL_INNOLUX_P079ZCA - tristate "Innolux P079ZCA panel" + tristate "Innolux P079ZCA or P097PFG panel" depends on OF depends on DRM_MIPI_DSI depends on BACKLIGHT_CLASS_DEVICE help - Say Y here if you want to enable support for Innolux P079ZCA - TFT-LCD modules. The panel has a 1024x768 resolution and uses - 24 bit RGB per pixel. It provides a MIPI DSI interface to - the host and has a built-in LED backlight. + Say Y here if you want to enable support for Innolux P079ZCA or + Innolux P097PFG panel. They provide a MIPI DSI interface to + the host and have a built-in LED backlight. config DRM_PANEL_JDI_LT070ME05000 tristate "JDI LT070ME05000 WUXGA DSI panel" diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c index 1597744..5d690b7 100644 --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -221,6 +221,34 @@ static const struct panel_desc_dsi innolux_p079zca_panel_desc = { .lanes = 4, }; +static const struct drm_display_mode innolux_p097pfg_mode = { + .clock = 220000, + .hdisplay = 1536, + .hsync_start = 1536 + 100, + .hsync_end = 1536 + 100 + 24, + .htotal = 1536 + 100 + 24 + 100, + .vdisplay = 2048, + .vsync_start = 2048 + 18, + .vsync_end = 2048 + 18 + 2, + .vtotal = 2048 + 18 + 2 + 18, + .vrefresh = 60, +}; + +static const struct panel_desc_dsi innolux_p097pfg_panel_desc = { + .desc = { + .modes = &innolux_p097pfg_mode, + .bpc = 8, + .size = { + .width = 147, + .height = 196, + }, + }, + .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | + MIPI_DSI_MODE_LPM, + .format = MIPI_DSI_FMT_RGB888, + .lanes = 8, +}; + static int innolux_panel_get_modes(struct drm_panel *panel) { struct drm_display_mode *mode; @@ -259,6 +287,9 @@ static const struct of_device_id innolux_of_match[] = { { .compatible = "innolux,p079zca", .data = &innolux_p079zca_panel_desc }, + { .compatible = "innolux,p097pfg", + .data = &innolux_p097pfg_panel_desc + } }; MODULE_DEVICE_TABLE(of, innolux_of_match);