From febcc5d229b02890cafbdb552fe51bd3abfb4ae2 Mon Sep 17 00:00:00 2001 From: Robert Chiras Date: Wed, 28 Aug 2019 15:36:35 +0300 Subject: [PATCH 1/4] drm/panel: rm67191: Remove CLOCK_NON_CONTINUOUS flag The flag MIPI_DSI_CLOCK_NON_CONTINUOUS was wrong used in the DSI driver, so it was added to this panel, but not neccesary. So, remove this flag since it is not needed. Signed-off-by: Robert Chiras --- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67191.c b/drivers/gpu/drm/panel/panel-raydium-rm67191.c index 6a5d37006103..24bb2f566e88 100644 --- a/drivers/gpu/drm/panel/panel-raydium-rm67191.c +++ b/drivers/gpu/drm/panel/panel-raydium-rm67191.c @@ -555,8 +555,7 @@ static int rad_panel_probe(struct mipi_dsi_device *dsi) panel->dsi = dsi; dsi->format = MIPI_DSI_FMT_RGB888; - dsi->mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO | - MIPI_DSI_CLOCK_NON_CONTINUOUS; + dsi->mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO; ret = of_property_read_u32(np, "video-mode", &video_mode); if (!ret) { From 193f966dbc1ea1afb4195bfda2b772abb5330836 Mon Sep 17 00:00:00 2001 From: Liu Ying Date: Fri, 24 Nov 2017 15:34:03 +0800 Subject: [PATCH 2/4] dt-bindings: display: Add JDI TX26D202VM0BWA LCD panel bindings The JDI TX26D202VM0BWA LCD panel is a 10.1" panel with a 1920x1200 (WUXGA) resolution. The panel has dual LVDS channels. Signed-off-by: Liu Ying --- .../bindings/display/panel/jdi,tx26d202vm0bwa.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/jdi,tx26d202vm0bwa.txt diff --git a/Documentation/devicetree/bindings/display/panel/jdi,tx26d202vm0bwa.txt b/Documentation/devicetree/bindings/display/panel/jdi,tx26d202vm0bwa.txt new file mode 100644 index 000000000000..b245b4d68d0f --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/jdi,tx26d202vm0bwa.txt @@ -0,0 +1,9 @@ +Japan Display Inc. 10.1" WUXGA (1920x1200) TFT LCD panel + +The panel has dual LVDS channels. + +Required properties: +- compatible: should be "jdi,tx26d202vm0bwa" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. From 491c4a215d684a463ad3f8b9ef68d585b6654ffe Mon Sep 17 00:00:00 2001 From: Liu Ying Date: Mon, 20 Nov 2017 15:40:19 +0800 Subject: [PATCH 3/4] drm/panel: simple: Add support for JDI TX26D202VM0BWA panel This patch adds support for Japan Display Inc. 10.1" TX26D202VM0BWA WUXGA(1920x1200) TFT LCD panel with LVDS interface. The panel has dual LVDS channels. Signed-off-by: Liu Ying --- drivers/gpu/drm/panel/panel-simple.c | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 28fa6ba7b767..8632df827c96 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1824,6 +1824,42 @@ static const struct panel_desc innolux_zj070na_01p = { }, }; +static const struct display_timing jdi_tx26d202vm0bwa_timing = { + .pixelclock = { 151820000, 156720000, 159780000 }, + .hactive = { 1920, 1920, 1920 }, + .hfront_porch = { 76, 100, 112 }, + .hback_porch = { 74, 100, 112 }, + .hsync_len = { 30, 30, 30 }, + .vactive = { 1200, 1200, 1200}, + .vfront_porch = { 3, 5, 10 }, + .vback_porch = { 2, 5, 10 }, + .vsync_len = { 5, 5, 5 }, + .flags = DISPLAY_FLAGS_DE_HIGH, +}; + +static const struct panel_desc jdi_tx26d202vm0bwa = { + .timings = &jdi_tx26d202vm0bwa_timing, + .num_timings = 1, + .bpc = 8, + .size = { + .width = 217, + .height = 136, + }, + .delay = { + /* + * The panel spec recommends one second delay + * to the below items. However, it's a bit too + * long in pratice. Based on tests, it turns + * out 100 milliseconds is fine. + */ + .prepare = 100, + .enable = 100, + .unprepare = 100, + .disable = 100, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, +}; + static const struct display_timing koe_tx14d24vm1bpa_timing = { .pixelclock = { 5580000, 5850000, 6200000 }, .hactive = { 320, 320, 320 }, @@ -3237,6 +3273,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "innolux,zj070na-01p", .data = &innolux_zj070na_01p, + }, { + .compatible = "jdi,tx26d202vm0bwa", + .data = &jdi_tx26d202vm0bwa, }, { .compatible = "koe,tx14d24vm1bpa", .data = &koe_tx14d24vm1bpa, From c16eb12d0e541a2378b49a8817498b4c49c23c03 Mon Sep 17 00:00:00 2001 From: Robert Chiras Date: Wed, 27 Nov 2019 17:45:30 +0200 Subject: [PATCH 4/4] drm/panel: rm67191: Add dev_err for reset gpio Add dev_err info when the reset gpio fails, so that we have more information in dmesg. Signed-off-by: Robert Chiras --- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67191.c b/drivers/gpu/drm/panel/panel-raydium-rm67191.c index 24bb2f566e88..0ef48335af95 100644 --- a/drivers/gpu/drm/panel/panel-raydium-rm67191.c +++ b/drivers/gpu/drm/panel/panel-raydium-rm67191.c @@ -584,8 +584,11 @@ static int rad_panel_probe(struct mipi_dsi_device *dsi) } panel->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); - if (IS_ERR(panel->reset)) - return PTR_ERR(panel->reset); + if (IS_ERR(panel->reset)) { + ret = PTR_ERR(panel->reset); + dev_err(dev, "Failed to get reset gpio (%d)\n", ret); + return ret; + } memset(&bl_props, 0, sizeof(bl_props)); bl_props.type = BACKLIGHT_RAW;