linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lin Huang <hl@rock-chips.com>
To: emil.l.velikov@gmail.com, briannorris@chromium.org,
	thierry.reding@gmail.com, robh+dt@kernel.org
Cc: zyw@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	nickey.yang@rock-chips.com, Lin Huang <hl@rock-chips.com>
Subject: [PATCH v3 2/3] drm/panel: support Innolux P097PFG panel
Date: Mon,  4 Dec 2017 15:16:04 +0800	[thread overview]
Message-ID: <1512371765-15166-2-git-send-email-hl@rock-chips.com> (raw)
In-Reply-To: <1512371765-15166-1-git-send-email-hl@rock-chips.com>

Support Innolux P097PFG 9.7" 1536x2048 TFT LCD panel, it reuse
the Innolux P079ZCA panel driver.

Signed-off-by: Lin Huang <hl@rock-chips.com>
---
 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);
 
-- 
2.7.4

  reply	other threads:[~2017-12-04  7:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04  7:16 [PATCH v3 1/3] drm/panel: refactor INNOLUX P079ZCA panel driver Lin Huang
2017-12-04  7:16 ` Lin Huang [this message]
2017-12-04  7:16 ` [PATCH v3 3/3] dt-bindings: Add INNOLUX P097PFG panel bindings Lin Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1512371765-15166-2-git-send-email-hl@rock-chips.com \
    --to=hl@rock-chips.com \
    --cc=airlied@linux.ie \
    --cc=briannorris@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickey.yang@rock-chips.com \
    --cc=robh+dt@kernel.org \
    --cc=seanpaul@chromium.org \
    --cc=thierry.reding@gmail.com \
    --cc=zyw@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).