Commit ba119b65 authored by Yuri Tikhonov's avatar Yuri Tikhonov Committed by Sergei Poselenov

RM-2110 dsi: minor tunings of dsi/panel per Tom's commands

The MB1166 still doesn't work good.
Signed-off-by: default avatarYuri Tikhonov <yur@emcraft.com>
(cherry picked from commit be5ccd5b0a095f3fc93f8f3b33639965a2abaf18)
parent a32de548
......@@ -35,6 +35,7 @@
#include <linux/regmap.h>
#include <soc/imx8/sc/sci.h>
#include <video/videomode.h>
#include <linux/gpio/consumer.h>
#include "imx-drm.h"
......@@ -920,6 +921,7 @@ static int imx_nwl_dsi_probe(struct platform_device *pdev)
struct device_node *remote_node, *endpoint;
int remote_ports = 0;
struct imx_mipi_dsi *dsi;
struct gpio_desc *reset_gpio;
int ret = 0;
if (!np)
......@@ -963,6 +965,15 @@ static int imx_nwl_dsi_probe(struct platform_device *pdev)
pm_runtime_enable(dev);
reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
if (reset_gpio) {
dev_info(dev, "Reset the panel\n");
gpiod_set_value_cansleep(reset_gpio, 1);
msleep(20);
gpiod_set_value_cansleep(reset_gpio, 0);
msleep(300);
}
if (of_property_read_bool(dev->of_node, "as_bridge")) {
ret = imx_nwl_dsi_parse_of(dev, true);
if (ret)
......
......@@ -68,7 +68,7 @@ struct otm8009a {
static const struct drm_display_mode default_mode = {
#ifdef CONFIG_ARCH_FSL_IMX8MQ
.clock = 27000,
.clock = 24000,
#else
.clock = 32729,
#endif
......@@ -224,6 +224,11 @@ static int otm8009a_init_sequence(struct otm8009a *ctx)
if (ret)
return ret;
/* Tearing mode */
ret = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
if (ret)
return ret;
/* Disable CABC feature */
dcs_write_seq(ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x00);
......@@ -381,7 +386,9 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd)
*/
data[0] = MIPI_DCS_SET_DISPLAY_BRIGHTNESS;
data[1] = bd->props.brightness;
#if 0
otm8009a_dcs_write_buf(ctx, data, ARRAY_SIZE(data));
#endif
/* set Brightness Control & Backlight on */
data[1] = 0x24;
......@@ -393,7 +400,9 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd)
/* Update Brightness Control & Backlight */
data[0] = MIPI_DCS_WRITE_CONTROL_DISPLAY;
#if 0
otm8009a_dcs_write_buf(ctx, data, ARRAY_SIZE(data));
#endif
return 0;
}
......@@ -424,8 +433,13 @@ static int otm8009a_probe(struct mipi_dsi_device *dsi)
dsi->lanes = 2;
dsi->format = MIPI_DSI_FMT_RGB888;
#if 0
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_LPM;
#else
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_LPM |
MIPI_DSI_CLOCK_NON_CONTINUOUS;
#endif
drm_panel_init(&ctx->panel);
ctx->panel.dev = dev;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment