diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2021-12-01 00:23:25 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-12-16 14:07:08 +0100 |
commit | 58ed47adcabb4ce13a60f56230074805957822fa (patch) | |
tree | 5cab63037994623082528aa19f9e4a620d489b3c /drivers/gpu/drm/tegra/gr2d.c | |
parent | drm/tegra: submit: Remove pm_runtime_enabled() checks (diff) | |
download | linux-58ed47adcabb4ce13a60f56230074805957822fa.tar.xz linux-58ed47adcabb4ce13a60f56230074805957822fa.zip |
drm/tegra: Consolidate runtime PM management of older UAPI codepath
Move runtime PM management of older UAPI code paths into the common place.
This removes boilerplate code from client drivers.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/gr2d.c')
-rw-r--r-- | drivers/gpu/drm/tegra/gr2d.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c index 2382def93923..e3bb4c99ed39 100644 --- a/drivers/gpu/drm/tegra/gr2d.c +++ b/drivers/gpu/drm/tegra/gr2d.c @@ -127,17 +127,10 @@ static int gr2d_open_channel(struct tegra_drm_client *client, struct tegra_drm_context *context) { struct gr2d *gr2d = to_gr2d(client); - int err; - - err = pm_runtime_resume_and_get(client->base.dev); - if (err) - return err; context->channel = host1x_channel_get(gr2d->channel); - if (!context->channel) { - pm_runtime_put(client->base.dev); + if (!context->channel) return -ENOMEM; - } return 0; } @@ -145,7 +138,6 @@ static int gr2d_open_channel(struct tegra_drm_client *client, static void gr2d_close_channel(struct tegra_drm_context *context) { host1x_channel_put(context->channel); - pm_runtime_put(context->client->base.dev); } static int gr2d_is_addr_reg(struct device *dev, u32 class, u32 offset) |