Skip to content

Commit 9bede63

Browse files
committed
drm/bridge: ti-sn65dsi86: Use pm_runtime autosuspend
Let's make the bridge use autosuspend with a 500ms delay. This is in preparation for promoting DP AUX transfers to their own sub-driver so that we're not constantly powering up and down the device as we transfer all the chunks. Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.11.I4c0b4a87e4dc19e5023b4d0a21bbfa6d9c09ebd8@changeid
1 parent 5c4381e commit 9bede63

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

drivers/gpu/drm/bridge/ti-sn65dsi86.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static int status_show(struct seq_file *s, void *data)
243243
seq_printf(s, "[0x%02x] = 0x%08x\n", reg, val);
244244
}
245245

246-
pm_runtime_put(pdata->dev);
246+
pm_runtime_put_autosuspend(pdata->dev);
247247

248248
return 0;
249249
}
@@ -293,7 +293,7 @@ static int ti_sn_bridge_connector_get_modes(struct drm_connector *connector)
293293
if (!edid) {
294294
pm_runtime_get_sync(pdata->dev);
295295
edid = pdata->edid = drm_get_edid(connector, &pdata->aux.ddc);
296-
pm_runtime_put(pdata->dev);
296+
pm_runtime_put_autosuspend(pdata->dev);
297297
}
298298

299299
if (edid && drm_edid_is_valid(edid)) {
@@ -420,7 +420,7 @@ static int ti_sn_bridge_attach(struct drm_bridge *bridge,
420420
/* check if continuous dsi clock is required or not */
421421
pm_runtime_get_sync(pdata->dev);
422422
regmap_read(pdata->regmap, SN_DPPLL_SRC_REG, &val);
423-
pm_runtime_put(pdata->dev);
423+
pm_runtime_put_autosuspend(pdata->dev);
424424
if (!(val & DPPLL_CLK_SRC_DSICLK))
425425
dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS;
426426

@@ -1051,7 +1051,7 @@ static int ti_sn_bridge_gpio_get(struct gpio_chip *chip, unsigned int offset)
10511051
*/
10521052
pm_runtime_get_sync(pdata->dev);
10531053
ret = regmap_read(pdata->regmap, SN_GPIO_IO_REG, &val);
1054-
pm_runtime_put(pdata->dev);
1054+
pm_runtime_put_autosuspend(pdata->dev);
10551055

10561056
if (ret)
10571057
return ret;
@@ -1102,7 +1102,7 @@ static int ti_sn_bridge_gpio_direction_input(struct gpio_chip *chip,
11021102
* it off and when it comes back it will have lost all state, but
11031103
* that's OK because the default is input and we're now an input.
11041104
*/
1105-
pm_runtime_put(pdata->dev);
1105+
pm_runtime_put_autosuspend(pdata->dev);
11061106

11071107
return 0;
11081108
}
@@ -1128,7 +1128,7 @@ static int ti_sn_bridge_gpio_direction_output(struct gpio_chip *chip,
11281128
SN_GPIO_MUX_OUTPUT << shift);
11291129
if (ret) {
11301130
clear_bit(offset, pdata->gchip_output);
1131-
pm_runtime_put(pdata->dev);
1131+
pm_runtime_put_autosuspend(pdata->dev);
11321132
}
11331133

11341134
return ret;
@@ -1419,6 +1419,8 @@ static int ti_sn65dsi86_probe(struct i2c_client *client,
14191419
ret = devm_add_action_or_reset(dev, ti_sn65dsi86_runtime_disable, dev);
14201420
if (ret)
14211421
return ret;
1422+
pm_runtime_set_autosuspend_delay(pdata->dev, 500);
1423+
pm_runtime_use_autosuspend(pdata->dev);
14221424

14231425
ti_sn65dsi86_debugfs_init(pdata);
14241426

0 commit comments

Comments
 (0)