diff options
author | Fancy Fang <chen.fang@nxp.com> | 2018-06-13 18:22:58 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 82c05c2392b6d32bb8e691b273894725ca023f7e (patch) | |
tree | a1f290de41c58125b50b2f927a0acb646fe9206b /drivers/gpu/drm/bridge | |
parent | 2ee10513297beeef8f72fcc695fc3d389e01d408 (diff) |
MLK-18605-2 drm/bridge: sec-dsim: allow same panel can be re-attached
During the mode set procedure, some dsi client device may detach
itself first and then attach it again according to the target
display mode parameters. In this case, the dsi client device
should be allowed to be re-attached again. So this is also true
for panel device.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Diffstat (limited to 'drivers/gpu/drm/bridge')
-rw-r--r-- | drivers/gpu/drm/bridge/sec-dsim.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/bridge/sec-dsim.c b/drivers/gpu/drm/bridge/sec-dsim.c index f7f8d7e6426f..065d6b425a3e 100644 --- a/drivers/gpu/drm/bridge/sec-dsim.c +++ b/drivers/gpu/drm/bridge/sec-dsim.c @@ -272,10 +272,6 @@ static int sec_mipi_dsim_host_attach(struct mipi_dsi_host *host, struct device *dev = dsim->dev; struct drm_panel *panel; - /* Don't support multiple panels */ - if (dsim->panel) - return -EBUSY; - if (!dsi->lanes || dsi->lanes > pdata->max_data_lanes) { dev_err(dev, "invalid data lanes number\n"); return -EINVAL; @@ -299,11 +295,17 @@ static int sec_mipi_dsim_host_attach(struct mipi_dsi_host *host, return -EINVAL; } - if (!dsim->next && !dsim->panel) { + if (!dsim->next) { /* 'dsi' must be panel device */ panel = of_drm_find_panel(dsi->dev.of_node); WARN_ON(!panel); + /* Don't support multiple panels */ + if (dsim->panel && panel && dsim->panel != panel) { + dev_err(dev, "don't support multiple panels\n"); + return -EBUSY; + } + dsim->panel = panel; } |