drm/msm/dsi-staging: register panel with global registry
allow other device drivers to find this drm panel in global registry Change-Id: I945bdbe9d8ed85dbb20f876e72687d6363c27492 (cherry picked from commit 9fd9ee68951d477aa9be580b047adcb72eff55c3) Signed-off-by: Harpreet "Eli" Sangha <eliptus@google.com> Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
84f87add48
commit
4999d92e48
@@ -3141,6 +3141,13 @@ struct dsi_panel *dsi_panel_get(struct device *parent,
|
|||||||
pr_debug("failed to parse esd config, rc=%d\n", rc);
|
pr_debug("failed to parse esd config, rc=%d\n", rc);
|
||||||
|
|
||||||
drm_panel_init(&panel->drm_panel);
|
drm_panel_init(&panel->drm_panel);
|
||||||
|
panel->drm_panel.dev = &panel->mipi_device.dev;
|
||||||
|
panel->mipi_device.dev.of_node = of_node;
|
||||||
|
|
||||||
|
rc = drm_panel_add(&panel->drm_panel);
|
||||||
|
if (rc)
|
||||||
|
goto error;
|
||||||
|
|
||||||
mutex_init(&panel->panel_lock);
|
mutex_init(&panel->panel_lock);
|
||||||
|
|
||||||
return panel;
|
return panel;
|
||||||
@@ -3151,6 +3158,8 @@ error:
|
|||||||
|
|
||||||
void dsi_panel_put(struct dsi_panel *panel)
|
void dsi_panel_put(struct dsi_panel *panel)
|
||||||
{
|
{
|
||||||
|
drm_panel_remove(&panel->drm_panel);
|
||||||
|
|
||||||
/* free resources allocated for ESD check */
|
/* free resources allocated for ESD check */
|
||||||
dsi_panel_esd_config_deinit(&panel->esd_config);
|
dsi_panel_esd_config_deinit(&panel->esd_config);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user