Skip to content

Commit

Permalink
drm/msm: Don't use autosuspend for display
Browse files Browse the repository at this point in the history
No functional change, as we only actually enable autosuspend for the GPU
device.  But lets not encourage thinking that autosuspend is a good idea
for anything display related.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20211215175910.1744151-1-robdclark@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
  • Loading branch information
Rob Clark committed Dec 16, 2021
1 parent c176055 commit f3d5d7c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/msm/dsi/dsi_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,7 @@ void msm_dsi_host_xfer_restore(struct mipi_dsi_host *host,
/* TODO: unvote for bus bandwidth */

cfg_hnd->ops->link_clk_disable(msm_host);
pm_runtime_put_autosuspend(&msm_host->pdev->dev);
pm_runtime_put(&msm_host->pdev->dev);
}

int msm_dsi_host_cmd_tx(struct mipi_dsi_host *host,
Expand Down Expand Up @@ -2252,7 +2252,7 @@ int msm_dsi_host_enable(struct mipi_dsi_host *host)
*/
/* if (msm_panel->mode == MSM_DSI_CMD_MODE) {
* dsi_link_clk_disable(msm_host);
* pm_runtime_put_autosuspend(&msm_host->pdev->dev);
* pm_runtime_put(&msm_host->pdev->dev);
* }
*/
msm_host->enabled = true;
Expand Down Expand Up @@ -2344,7 +2344,7 @@ int msm_dsi_host_power_on(struct mipi_dsi_host *host,

fail_disable_clk:
cfg_hnd->ops->link_clk_disable(msm_host);
pm_runtime_put_autosuspend(&msm_host->pdev->dev);
pm_runtime_put(&msm_host->pdev->dev);
fail_disable_reg:
dsi_host_regulator_disable(msm_host);
unlock_ret:
Expand All @@ -2371,7 +2371,7 @@ int msm_dsi_host_power_off(struct mipi_dsi_host *host)
pinctrl_pm_select_sleep_state(&msm_host->pdev->dev);

cfg_hnd->ops->link_clk_disable(msm_host);
pm_runtime_put_autosuspend(&msm_host->pdev->dev);
pm_runtime_put(&msm_host->pdev->dev);

dsi_host_regulator_disable(msm_host);

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ static int dsi_phy_enable_resource(struct msm_dsi_phy *phy)
static void dsi_phy_disable_resource(struct msm_dsi_phy *phy)
{
clk_disable_unprepare(phy->ahb_clk);
pm_runtime_put_autosuspend(&phy->pdev->dev);
pm_runtime_put(&phy->pdev->dev);
}

static const struct of_device_id dsi_phy_dt_match[] = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static void power_off(struct drm_bridge *bridge)
if (ret)
DRM_DEV_ERROR(dev->dev, "failed to disable pwr regulator: %d\n", ret);

pm_runtime_put_autosuspend(&hdmi->pdev->dev);
pm_runtime_put(&hdmi->pdev->dev);
}

#define AVI_IFRAME_LINE_NUMBER 1
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/msm/hdmi/hdmi_hpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void msm_hdmi_hpd_disable(struct hdmi_bridge *hdmi_bridge)
msm_hdmi_set_mode(hdmi, false);

enable_hpd_clocks(hdmi, false);
pm_runtime_put_autosuspend(dev);
pm_runtime_put(dev);

ret = gpio_config(hdmi, false);
if (ret)
Expand Down Expand Up @@ -260,7 +260,7 @@ static enum drm_connector_status detect_reg(struct hdmi *hdmi)
hpd_int_status = hdmi_read(hdmi, REG_HDMI_HPD_INT_STATUS);

enable_hpd_clocks(hdmi, false);
pm_runtime_put_autosuspend(&hdmi->pdev->dev);
pm_runtime_put(&hdmi->pdev->dev);

return (hpd_int_status & HDMI_HPD_INT_STATUS_CABLE_DETECTED) ?
connector_status_connected : connector_status_disconnected;
Expand Down

0 comments on commit f3d5d7c

Please sign in to comment.