[RESEND PATCH v3 2/3] drm/panel: support Innolux P097PFG panel
From: Lin Huang
Date: Mon Dec 04 2017 - 02:18:09 EST
Support Innolux P097PFG 9.7" 1536x2048 TFT LCD panel, it reuse
the Innolux P079ZCA panel driver.
Signed-off-by: Lin Huang <hl@xxxxxxxxxxxxxx>
---
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