diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2021-12-01 02:23:25 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-12-16 16:07:08 +0300 |
commit | 58ed47adcabb4ce13a60f56230074805957822fa (patch) | |
tree | 5cab63037994623082528aa19f9e4a620d489b3c /drivers/gpu/drm/tegra/nvdec.c | |
parent | 555ae37a5dd2a2703a83965dc26bc99a5db2ecbe (diff) | |
download | linux-58ed47adcabb4ce13a60f56230074805957822fa.tar.xz |
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/nvdec.c')
-rw-r--r-- | drivers/gpu/drm/tegra/nvdec.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/gpu/drm/tegra/nvdec.c b/drivers/gpu/drm/tegra/nvdec.c index 15f036e09e5c..79e1e88203cf 100644 --- a/drivers/gpu/drm/tegra/nvdec.c +++ b/drivers/gpu/drm/tegra/nvdec.c @@ -291,29 +291,17 @@ static int nvdec_open_channel(struct tegra_drm_client *client, struct tegra_drm_context *context) { struct nvdec *nvdec = to_nvdec(client); - int err; - - err = pm_runtime_get_sync(nvdec->dev); - if (err < 0) { - pm_runtime_put(nvdec->dev); - return err; - } context->channel = host1x_channel_get(nvdec->channel); - if (!context->channel) { - pm_runtime_put(nvdec->dev); + if (!context->channel) return -ENOMEM; - } return 0; } static void nvdec_close_channel(struct tegra_drm_context *context) { - struct nvdec *nvdec = to_nvdec(context->client); - host1x_channel_put(context->channel); - pm_runtime_put(nvdec->dev); } static const struct tegra_drm_client_ops nvdec_ops = { |