diff options
author | Fancy Fang <chen.fang@nxp.com> | 2018-07-13 19:41:53 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 9293b45e8103ae35cc49111e1ec40594cd317b0c (patch) | |
tree | b151748c25dcfc0ff76518163d0c843dc520c20e /drivers/gpu/drm/panel | |
parent | f0e09d426c3ba79e8f30164b3e2580f9bccb298b (diff) |
MLK-18605-13 drm/panel: rm67191: enable 'video-mode' config
Try to get the 'video-mode' property from dtb to guide
the required video mode configuration. The possible video
modes are:
0. Burst mode
1. Non-burst mode with sync event
2. Non-burst mode with sync pulse
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r-- | drivers/gpu/drm/panel/panel-raydium-rm67191.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67191.c b/drivers/gpu/drm/panel/panel-raydium-rm67191.c index 74dc68f22761..940f780860c6 100644 --- a/drivers/gpu/drm/panel/panel-raydium-rm67191.c +++ b/drivers/gpu/drm/panel/panel-raydium-rm67191.c @@ -544,6 +544,7 @@ static int rad_panel_probe(struct mipi_dsi_device *dsi) struct rad_panel *panel; struct backlight_properties bl_props; int ret; + u32 video_mode; panel = devm_kzalloc(&dsi->dev, sizeof(*panel), GFP_KERNEL); if (!panel) @@ -557,6 +558,27 @@ static int rad_panel_probe(struct mipi_dsi_device *dsi) dsi->mode_flags = MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS; + ret = of_property_read_u32(np, "video-mode", &video_mode); + if (!ret) { + switch (video_mode) { + case 0: + /* burst mode */ + dsi->mode_flags |= MIPI_DSI_MODE_VIDEO_BURST; + break; + case 1: + /* non-burst mode with sync event */ + break; + case 2: + /* non-burst mode with sync pulse */ + dsi->mode_flags |= MIPI_DSI_MODE_VIDEO_SYNC_PULSE; + break; + default: + dev_warn(dev, "invalid video mode %d\n", video_mode); + break; + + } + } + ret = of_property_read_u32(np, "dsi-lanes", &dsi->lanes); if (ret < 0) { dev_err(dev, "Failed to get dsi-lanes property (%d)\n", ret); |